What's new

Cannot mount SD card on USB 4G modem

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

GeeM

New Around Here
Dear SNB community,

I recently discovered the power of AsusWRT Merlin and I want to benefit from some extended features such as Diversion.

I tried to install it with a simple USB thumb drive and it worked perfectly. However, with my USB 4G modem (configured in failover mode in case my main broadband goes down), that means both of my USB ports are used. I would like to keep one USB port available for a USB printer.

I found there is a SD card reader built-in my USB 4G modem (Huawei E3276) which would, in theory, make it ideal for me as I can have my USB 4G modem and an external storage all in one USB port. I inserted a 4GB micro-SD card into the 4G modem but it shows as "Unmounted".

When I connect to the admin interface, it seems both devices (4G modem and SD card) are recognized:
62796aa8bdec12079aa810d91cd0429543f2f5eb.png


Although I am very beginner in Linux commands, I found some commands on the internet and and it seems my devices are correctly recognized:
Code:
Every 2s: dmesg | tail -20                                 

sd 3:0:0:0: [sda] Assuming drive cache: write through
sd 3:0:0:0: [sda] Attached SCSI removable disk
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for GSM modem (1-port)
option 1-2:1.0: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
option 1-2:1.1: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
option 1-2:1.2: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB2
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems

gro disabled

gro disabled
br0: received packet on eth1 with own address as source address


Any idea how to get my SD card mounted and use both the SD card AND the 4G modem together (ie.: Diversion on the SD card and the 4G modem as a backup WAN connection)?

Thank you for your help :)
 
Make sure the card is formatted in FAT32, NTFS or ext3/ext4. exFAT is not supported.
 
Dear SNB community,

I recently discovered the power of AsusWRT Merlin and I want to benefit from some extended features such as Diversion.

I tried to install it with a simple USB thumb drive and it worked perfectly. However, with my USB 4G modem (configured in failover mode in case my main broadband goes down), that means both of my USB ports are used. I would like to keep one USB port available for a USB printer.

I found there is a SD card reader built-in my USB 4G modem (Huawei E3276) which would, in theory, make it ideal for me as I can have my USB 4G modem and an external storage all in one USB port. I inserted a 4GB micro-SD card into the 4G modem but it shows as "Unmounted".

When I connect to the admin interface, it seems both devices (4G modem and SD card) are recognized:
62796aa8bdec12079aa810d91cd0429543f2f5eb.png


Although I am very beginner in Linux commands, I found some commands on the internet and and it seems my devices are correctly recognized:
Code:
Every 2s: dmesg | tail -20                                

sd 3:0:0:0: [sda] Assuming drive cache: write through
sd 3:0:0:0: [sda] Attached SCSI removable disk
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for GSM modem (1-port)
option 1-2:1.0: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
option 1-2:1.1: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
option 1-2:1.2: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB2
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems

gro disabled

gro disabled
br0: received packet on eth1 with own address as source address


Any idea how to get my SD card mounted and use both the SD card AND the 4G modem together (ie.: Diversion on the SD card and the 4G modem as a backup WAN connection)?

Thank you for your help :)

This looks like an interesting project!

I would install amtm to the jffs partition and see if you can format the SD card using the built-in amtm option.

https://diversion.ch/amtm.html

I would recommend using Ext4 with journalling enabled. After that is successfully created and the router has rebooted, enable the disk checking utility.

Finally, create a swap file (I always use the maximum 2GB option). Your router and SD card should be ready to use for all available scripts. :)
 
Make sure the card is formatted in FAT32, NTFS or ext3/ext4. exFAT is not supported.
The SD card was formatted in ext4 using minitool partition. Interestingly, I managed to get it working and install Diversion on it once after disabling the 4G modem. But now that swtiched back to the 4G modem, the SD card still seems to be detected but cannot be mounted for some reasons...


This looks like an interesting project!

I would install amtm to the jffs partition and see if you can format the SD card using the built-in amtm option.

https://diversion.ch/amtm.html

I would recommend using Ext4 with journalling enabled. After that is successfully created and the router has rebooted, enable the disk checking utility.

Finally, create a swap file (I always use the maximum 2GB option). Your router and SD card should be ready to use for all available scripts. :)

Thanks for your advice, I will have to learn how to do that :D I will check it out and let you know ;)
 
Possible that this kind of device is simply not compatible.
 
Possible that this kind of device is simply not compatible.

That's what I was thinking - Huawei modems fall broadly into two categories - "normal" and HiLink... the way to tell is HiLink has a webserver in the modem, where when plugged into Windows, you go to the modem webpage to configure, and they are pretty problematic with Linux in general...

(I try to avoid Huawei modems for linux because of these odd behaviors - that being said, they're good modems for Windows, and available at a very good price)

Huawei first starts up as a USB Mass Storage Device, which is flash on the modem, with windows connectivity software installer,

modeswitch should flip it over into USB Modem mode (usually three endpoints - ttyusb0 for diag, ttyusb1 for the AT command interface, and then a cdc-wdm0 which is the binary driver level data interface (either QMI for qualcomm chipsets, or mbim for other chips).

modeswitch can disable the other storage endpoint (the card reader), really depends on the Huawei firmware there.

I've been doing a fair amount of integration work lately on OpenWRT working on Telit and uBlox (Lara) modems, which are modules, not USB stick type modems - and it's been an interesting learning experience.
 
(I try to avoid Huawei modems for linux because of these odd behaviors - that being said, they're good modems for Windows, and available at a very good price)

Asus's compatibility list has a fairly long list of Huawei devices (which makes sense since Asus is Taiwanese), however I don't think they focus on the added functions such as card readers, probably only on the modem side of things.
 
Asus's compatibility list has a fairly long list of Huawei devices (which makes sense since Asus is Taiwanese), however I don't think they focus on the added functions such as card readers, probably only on the modem side of things.

Yes...

Modem support isn't easy stuff - and some vendors do a better job than others - Asus does better than most here...

It's getting a bit easier these days with modern kernels - QMI and MBIM solve a lot of problems, and the USB forum's work on CDC-WDM have standardized support at the driver level - still, there's implementation details, and some gaps that need to be covered...

https://github.com/torvalds/linux/blob/master/drivers/usb/class/cdc-wdm.c

ModemManager is pretty darn slick, but it's a bit large for embedded linux, as it also needs to pull in some dependencies that can make things tight for small flash platforms. I was able to squeeze it down to fit into a 16 meg NOR flash with 4.9 kernel, but not much room for anything else..
 
Make sure the card is formatted in FAT32, NTFS or ext3/ext4. exFAT is not supported.
same problem

Huawei E173
internal CD-ROM emulation
internal SD card reader

SD card ext3 formatted

after start router define sg0 and sg1 devices and sda
but not automount

when try in telnet fdisk /dev/sda and quit then /dev/sda1 automounted

but after reboot again not automount :(
 
Try typing the following and seeing if it automounts the card. If that works you could probably put it in a services-start script.
Code:
hotplug2
 
Try typing the following and seeing if it automounts the card. If that works you could probably put it in a services-start script.
Code:
hotplug2
hotplug2 not help
even become poor

after hotplug2 disappear CD-ROM emulation
was sg0 (CD-ROM) and sg1 (SD Card) - become sg0 (SD Card) and now after reboot /dev/sda1 always present.
but not automount even after fdisk /dev/sda :(
 
Physically unplug the Huawei, wait 5 seconds and then plug it back in. Then issue the following commands, what output do you get?

Code:
grep -E "\ sd|\ scsi" /tmp/syslog.log

cat /proc/partitions
 
I'm in a shock!!!

my Huawei E173s some times after power off or reconnect show in lsusb
12d1:1c0b
than

hotplug2
echo -e "p\nq" | fdisk /dev/sda
SD card automount, but modem not recognized :(

sometimes 12d1:1c05 than modem recognized, but SD card not automount any way.

what and where change 12d1:1c0b to 12d1:1c05 !?!?!?!
 
find how switch Huawei from 12d1:1c0b to 12d1:1c05 by usb_modeswitch

usb_modeswitch -c 12d1:1c0b

where 12d1:1c0b contain:

Code:
########################################################
# Huawei E173s

DefaultVendor= 0x12d1
DefaultProduct= 0x1c0b

TargetVendor= 0x12d1
TargetProduct= 0x1c05

CheckSuccess=20

MessageEndpoint= 0x0f
MessageContent= "55534243123456780000000000000011062000000100000000000000000000"

but cannot understand WHY when in 12d1:1c05 (usb modem mode) automount of SD card not want work in any way?

and if manualy mount to /tmp/mnt/ASUSWARE then any try to Enable/Disable asusware apps or Upgrade than receive error "cannot mount USB drive" :(
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top