Activation Codes and Methods, Hardware Details, Sniffing
Post Reply
vthielen2
Posts: 2
Joined: 06 Apr 2021, 16:59

switching Huawei E8372 to 'stick mode' (for ppp use)

Post by vthielen2 » 06 Apr 2021, 17:21

I am working on a raspberry pi trying to get a Huawei E8372 modem to show up as a good old ppp connection, because I need direct access to the network IP address (so no NAT in between)
The fact that it is slower doesn't bother me that much.
I just installed the last version of usb_modeswitch (2.6.0)

When I plug in the modem, it first (very briefly) shows up (using lsusb) as 12d1:1f01 (mass storage mode) and the immediately changes to 12d1:14db, even though I disabled usb_modeswitch in its conf file ('DisableSwitching=1' in /etc/usb_modeswitch.conf).

From what I see on the internet, I should get it in '1f01' mode before I can switch it to 'ppp' mode, is that correct? How can I do that?

Supposing I get it in the '1f01' mass storage mode: how can I switch it to 'ppp/stick' mode, where I can access it through the /dev/ttyUSB ?

Thanks for any help!

vthielen2
Posts: 2
Joined: 06 Apr 2021, 16:59

Re: switching Huawei E8372 to 'stick mode' (for ppp use)

Post by vthielen2 » 07 Apr 2021, 09:42

when I run "journalctl -f" and plug in the stick I get (among others):

Apr 07 09:26:58 Test11 kernel: usb 1-1.4: new high-speed USB device number 117 using dwc_otg
Apr 07 09:26:59 Test11 kernel: usb 1-1.4: New USB device found, idVendor=12d1, idProduct=1f01
Apr 07 09:26:59 Test11 kernel: usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 07 09:26:59 Test11 kernel: usb 1-1.4: Product: HUAWEI_MOBILE
Apr 07 09:26:59 Test11 kernel: usb 1-1.4: Manufacturer: HUAWEI_MOBILE
Apr 07 09:26:59 Test11 kernel: usb 1-1.4: SerialNumber: 0123456789ABCDEF
Apr 07 09:26:59 Test11 kernel: usb-storage 1-1.4:1.0: USB Mass Storage device detected
Apr 07 09:26:59 Test11 kernel: scsi host0: usb-storage 1-1.4:1.0
Apr 07 09:26:59 Test11 mtp-probe[30384]: checking bus 1, device 117: "/sys/devices/platform/soc/20980000.usb/usb1/1-1/1-1.4"
Apr 07 09:26:59 Test11 liblogging-stdlog[235]: action 'action 6' resumed (module 'builtin:omfile') [v8.24.0 try http://www.rsyslog.com/e/2359 ]
Apr 07 09:26:59 Test11 liblogging-stdlog[235]: action 'action 6' resumed (module 'builtin:omfile') [v8.24.0 try http://www.rsyslog.com/e/2359 ]
Apr 07 09:26:59 Test11 liblogging-stdlog[235]: action 'action 6' resumed (module 'builtin:omfile') [v8.24.0 try http://www.rsyslog.com/e/2359 ]
Apr 07 09:26:59 Test11 liblogging-stdlog[235]: action 'action 6' resumed (module 'builtin:omfile') [v8.24.0 try http://www.rsyslog.com/e/2359 ]
Apr 07 09:26:59 Test11 liblogging-stdlog[235]: action 'action 6' resumed (module 'builtin:omfile') [v8.24.0 try http://www.rsyslog.com/e/2359 ]
Apr 07 09:26:59 Test11 liblogging-stdlog[235]: action 'action 6' resumed (module 'builtin:omfile') [v8.24.0 try http://www.rsyslog.com/e/2359 ]
Apr 07 09:26:59 Test11 liblogging-stdlog[235]: action 'action 6' resumed (module 'builtin:omfile') [v8.24.0 try http://www.rsyslog.com/e/2359 ]
Apr 07 09:26:59 Test11 liblogging-stdlog[235]: action 'action 6' resumed (module 'builtin:omfile') [v8.24.0 try http://www.rsyslog.com/e/2359 ]
Apr 07 09:26:59 Test11 liblogging-stdlog[235]: action 'action 6' resumed (module 'builtin:omfile') [v8.24.0 try http://www.rsyslog.com/e/2359 ]
Apr 07 09:26:59 Test11 liblogging-stdlog[235]: action 'action 6' resumed (module 'builtin:omfile') [v8.24.0 try http://www.rsyslog.com/e/2359 ]
Apr 07 09:26:59 Test11 liblogging-stdlog[235]: action 'action 6' suspended, next retry is Wed Apr 7 09:27:29 2021 [v8.24.0 try http://www.rsyslog.com/e/2007 ]
Apr 07 09:26:59 Test11 mtp-probe[30384]: bus: 1, device: 117 was not an MTP device
Apr 07 09:26:59 Test11 systemd[1]: Starting USB_ModeSwitch_1-1.4:1.0...
Apr 07 09:27:00 Test11 kernel: usb 1-1.4: reset high-speed USB device number 117 using dwc_otg
Apr 07 09:27:00 Test11 kernel: usb 1-1.4: device firmware changed
Apr 07 09:27:00 Test11 kernel: usb 1-1.4: USB disconnect, device number 117
Apr 07 09:27:00 Test11 usb_modeswitch_dispatcher[30392]: couldn't open "/sys/bus/usb/devices/1-1.4/devnum": no such file or directory
Apr 07 09:27:00 Test11 usb_modeswitch_dispatcher[30392]: while executing
Apr 07 09:27:00 Test11 usb_modeswitch_dispatcher[30392]: "open $dir/$attr r"
Apr 07 09:27:00 Test11 usb_modeswitch_dispatcher[30392]: invoked from within
Apr 07 09:27:00 Test11 usb_modeswitch_dispatcher[30392]: "if [file exists $dir/$attr] {
Apr 07 09:27:00 Test11 usb_modeswitch_dispatcher[30392]: set rc [open $dir/$attr r]
Apr 07 09:27:00 Test11 usb_modeswitch_dispatcher[30392]: set usb($attr) [string trim [read -nonewline $rc]]
Apr 07 09:27:00 Test11 usb_modeswitch_dispatcher[30392]: close $rc
Apr 07 09:27:00 Test11 usb_modeswitch_dispatcher[30392]: } else {
Apr 07 09:27:00 Test11 usb_modeswitch_dispatcher[30392]: set usb($attr)..."
Apr 07 09:27:00 Test11 usb_modeswitch_dispatcher[30392]: (procedure "ReadUSBAttrs" line 13)
Apr 07 09:27:00 Test11 usb_modeswitch_dispatcher[30392]: invoked from within
Apr 07 09:27:00 Test11 usb_modeswitch_dispatcher[30392]: "ReadUSBAttrs $devdir"
Apr 07 09:27:00 Test11 usb_modeswitch_dispatcher[30392]: (procedure "Main" line 125)
Apr 07 09:27:00 Test11 usb_modeswitch_dispatcher[30392]: invoked from within
Apr 07 09:27:00 Test11 usb_modeswitch_dispatcher[30392]: "Main $argv $argc"
Apr 07 09:27:01 Test11 kernel: usb 1-1.4: new high-speed USB device number 118 using dwc_otg
Apr 07 09:27:01 Test11 usb_modeswitch_dispatcher[30392]: (file "/usr/sbin/usb_modeswitch_dispatcher" line 1031)
Apr 07 09:27:00 Test11 systemd[1]: usb_modeswitch@1-1.4:1.0.service: Main process exited, code=exited, status=1/FAILURE
Apr 07 09:27:00 Test11 systemd[1]: Failed to start USB_ModeSwitch_1-1.4:1.0.
Apr 07 09:27:01 Test11 systemd[1]: usb_modeswitch@1-1.4:1.0.service: Unit entered failed state.
Apr 07 09:27:01 Test11 kernel: usb 1-1.4: New USB device found, idVendor=12d1, idProduct=14db
Apr 07 09:27:01 Test11 kernel: usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Apr 07 09:27:01 Test11 kernel: usb 1-1.4: Product: HUAWEI_MOBILE
Apr 07 09:27:01 Test11 kernel: usb 1-1.4: Manufacturer: HUAWEI_MOBILE
Apr 07 09:27:01 Test11 systemd[1]: usb_modeswitch@1-1.4:1.0.service: Failed with result 'exit-code'.
Apr 07 09:27:01 Test11 kernel: cdc_ether 1-1.4:1.0 eth1: register 'cdc_ether' at usb-20980000.usb-1.4, CDC Ethernet Device, 00:1e:10:1f:00:00
Apr 07 09:27:01 Test11 mtp-probe[30402]: checking bus 1, device 118: "/sys/devices/platform/soc/20980000.usb/usb1/1-1/1-1.4"

ValdikSS
Posts: 4
Joined: 12 Apr 2021, 22:53

Re: switching Huawei E8372 to 'stick mode' (for ppp use)

Post by ValdikSS » 12 Apr 2021, 23:05

vthielen2 wrote: 06 Apr 2021, 17:21 immediately changes to 12d1:14db, even though I disabled usb_modeswitch in its conf file ('DisableSwitching=1' in /etc/usb_modeswitch.conf).
Do you have a modem of a newer modification, like E8372h-320 or -820 with firmware 10.x.x.x?
E3372-320, E8372-320 and other newer modems with firmware version 10.x.x.x try to automatically detect PC operating system (Linux/macOS or Windows) and switch the mode accordingly. This is done by detecting USB Get Max LUN request from the operating system to device's CD-ROM.

Automatic switching creates race condition, complicating operating system-driven switching to other modes (NCM, for example).

To prevent this behaviour on Linux (for example, on the router running OpenWRT), one should set SINGLE_LUN quirk for usb-storage module.

Code: Select all

# cat /etc/modprobe.d/huawei-noprobe.conf

options usb-storage quirks=12d1:1f01:s
To switch to a regular old PPP mode, use "55534243123456780000000000000011063000000100000000000000000000" string.
For newer NCM mode use --huawei-alt-mode

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: switching Huawei E8372 to 'stick mode' (for ppp use)

Post by Josh » 17 Apr 2021, 14:06

That's great information, thanks!!!

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: switching Huawei E8372 to 'stick mode' (for ppp use)

Post by Josh » 17 Apr 2021, 14:10

Is there a way to detect these new modems/firmwares, apart from the USB ID?

Post Reply