How to use usb.modeswtich to turn my 4G dongle from mass storage mode to modem mode?
Running Ubuntu 20.04.2 LTS
My Huawei E3372 4G Dongle is not working correctly with Ubuntu. When I plug it in, I can see the driver.exe
file is available (I installed wine so that I could run the .exe file) and it seems to install properly.
I still cant see my connection though and when using lsusb
I notice that the device is recognised but is in 'Mass Storage Mode'.
I understand that usb.modeswitch can help me change this but I don't understand what I am supposed to do after reading conflicting information.
I can't find an up-to-date answer for my Ubuntu version
I am a complete linux and ubuntu noob, but I can follow instructions.. I just can't find a working solution to this problem online. Everything I try doesn't really seem to work.
Thanks
Update #1
Such a helpful community member @heynnema , thanks for this
It is a different modem but the exact same model, Huawei E3372h lsusb output:
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 008 Device 004: ID 03f0:3841 HP, Inc
Bus 008 Device 005: ID 1a2c:2124 China Resource Semico Co., Ltd
Bus 008 Device 017: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
Bus 008 Device 019: ID 12d1:14db Huawei Technologies Co., Ltd. E353/E3131
Bus 008 Device 016: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 008 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub""
The rules. file contains the following only:
# Huawei E3372
ATTR{idVendor}=="12d1", ATTR{idProduct}=="14db",
RUN+="usb_modeswitch '/%k'"
Update #2
# Huawei E3372
ATTR{idVendor}=="12d1", ATTR{idProduct}=="14db", RUN+="usb_modeswitch '/%k'"
If we look at /lib/udev/rules.d/40-usb_modeswitch.rules, we see the following rules for Huawei comm devices...
# Generic entry for most Huawei devices, excluding Android phones
ATTRS{idVendor}=="12d1", ATTRS{manufacturer}!="Android", ATTR{bInterfaceNumber}=="00", ATTR{bInterfaceClass}=="08", RUN+="usb_modeswitch '%b/%k'"
# Huawei ME909u-521 (MBIM, dummy config)
ATTR{idVendor}=="12d1", ATTR{idProduct}=="1573", RUN+="usb_modeswitch '/%k'"
# Huawei ME906, ME909 (MBIM, dummy config)
ATTR{idVendor}=="12d1", ATTR{idProduct}=="15c1", RUN+="usb_modeswitch '/%k'"
Your particular Huawei E3372 device is not being seen.
With the Huawei device inserted to your USB port, do lsusb | grep -i 12d1
and you'll find output that includes 12d1:xxxx
, and it's the xxxx number that we care about.
Note: If xxxx is either 1573 or 15c1 then stop here. Your system should already recognize your Huawei device.
We need to create a new .rules file in /etc/udev/rules.d/41-huawei_e3372.rules that contains:
# Huawei E3372
ATTR{idVendor}=="12d1", ATTR{idProduct}=="xxxx", RUN+="usb_modeswitch '/%k'"
And changing the xxxx to the number we got from the prior lsusb
command.
The file should look like this when you're done...
-rw-r--r-- 1 root root 42K Apr 2 15:46 41-huawei_e3372.rules
Note: chmod
or chown
if required.
You probably need to reboot, but if you just try to remove/insert the Huawei device, it may see it without a reboot. You're done.
Note: see man usb_modeswitch_dispatcher
for more info.