Page 1 of 1

Huawei E3372 LTE Modem (HiLink) does not work in M7

PostPosted: Dec 7th, '19, 19:11
by mackowiakp
I have been trying to launch Huawei E3372 LTE USB Modem (exact model: E3372s-153 HiLink type) for a few hours. Unlike a normal modem, it presents itself as a network card. So no /dev/ttyUSBxx device is created. Modem is additionally equipped in SD memory card slot.
Such modem has two IP address (unchangeable): 192.168.8.100 - as interface address and 192.168.8.1 - for WEB based configuration.
It works correctly with OpenWRT based router (just plug&play). Below output of ifconfig from router (Part about this interface):

Code: Select all
eth1      Link encap:Ethernet  HWaddr 0C:5B:8F:27:9A:64 
          inet addr:192.168.8.100  Bcast:192.168.8.255  Mask:255.255.255.0
          inet6 addr: fe80::e5b:8fff:fe27:9a64/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1751 errors:0 dropped:0 overruns:0 frame:0
          TX packets:294 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:728346 (711.2 KiB)  TX bytes:23442 (22.8 KiB)


OpenWRT use usb_modeswitch and hotplug instead udev rules.

When modem is connected to M7, the output from ifcofig is as follows:

Code: Select all
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.2  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::dacb:8aff:fe9a:3cc6  prefixlen 64  scopeid 0x20<link>
        ether d8:cb:8a:9a:3c:c6  txqueuelen 1000  (Ethernet)
        RX packets 11206  bytes 6301403 (6.0 MiB)
        RX errors 0  dropped 465  overruns 0  frame 0
        TX packets 10664  bytes 1537343 (1.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xfb200000-fb220000 

enp0s20u3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::e5b:8fff:fe27:9a64  prefixlen 64  scopeid 0x20<link>
        ether 0c:5b:8f:27:9a:64  txqueuelen 1000  (Ethernet)
        RX packets 46  bytes 19367 (18.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 21  bytes 4175 (4.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 236  bytes 13464 (13.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 236  bytes 13464 (13.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp0s20u6u2: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether e4:be:ed:67:ea:78  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


So modem is present as an interface, but no IP address assigned.

And output from dmesg after plug-in modem to USB port:

Code: Select all
[  832.114621] usb 2-3: new high-speed USB device number 11 using xhci_hcd
[  832.241351] usb 2-3: New USB device found, idVendor=12d1, idProduct=1f01, bcdDevice= 1.02
[  832.241355] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  832.241357] usb 2-3: Product: HUAWEI_MOBILE
[  832.241359] usb 2-3: Manufacturer: HUAWEI_MOBILE
[  832.241360] usb 2-3: SerialNumber: 0123456789ABCDEF
[  832.242744] usb-storage 2-3:1.0: USB Mass Storage device detected
[  832.242876] scsi host6: usb-storage 2-3:1.0
[  832.804015] usb 2-3: USB disconnect, device number 11
[  833.247678] usb 2-3: new high-speed USB device number 12 using xhci_hcd
[  833.374260] usb 2-3: New USB device found, idVendor=12d1, idProduct=14dc, bcdDevice= 1.02
[  833.374264] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  833.374266] usb 2-3: Product: HUAWEI_MOBILE
[  833.374267] usb 2-3: Manufacturer: HUAWEI_MOBILE
[  833.379351] cdc_ether 2-3:1.0 eth0: register 'cdc_ether' at usb-0000:00:14.0-3, CDC Ethernet Device, 0c:5b:8f:27:9a:64
[  833.379634] usb-storage 2-3:1.2: USB Mass Storage device detected
[  833.379745] scsi host6: usb-storage 2-3:1.2
[  833.396256] cdc_ether 2-3:1.0 enp0s20u3: renamed from eth0
[  834.400346] scsi 6:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[  834.400706] sd 6:0:0:0: Power-on or device reset occurred
[  834.401434] sd 6:0:0:0: [sdc] 15126528 512-byte logical blocks: (7.74 GB/7.21 GiB)
[  834.401594] sd 6:0:0:0: [sdc] Write Protect is off
[  834.401595] sd 6:0:0:0: [sdc] Mode Sense: 0f 00 00 00
[  834.401745] sd 6:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[  834.404548]  sdc: sdc1
[  834.405435] sd 6:0:0:0: [sdc] Attached SCSI removable disk
[  855.692777] net-fw DROP IN=eno1 OUT= MAC=d8:cb:8a:9a:3c:c6:54:a0:50:cc:bf:02:08:00 SRC=34.215.61.249 DST=192.168.0.2 LEN=40 TOS=0x00 PREC=0x00 TTL=37 ID=0 DF PROTO=TCP SPT=443 DPT=55288 WINDOW=0 RES=0x00 RST URGP=0


What to do to make the modem working?

Re: Huawei E3372 LTE Modem (HiLink) does not work in M7

PostPosted: Dec 8th, '19, 03:48
by doktor5000
Have you tried usb_modeswitch manually ?

Re: Huawei E3372 LTE Modem (HiLink) does not work in M7

PostPosted: Dec 8th, '19, 04:30
by mackowiakp
No. So what usb_modeswitch You suggest?

Below lsusb output.

Code: Select all
Bus 002 Device 010: ID 12d1:14dc Huawei Technologies Co., Ltd. E33372 LTE/UMTS/GSM HiLink Modem/Networkcard


NB. There is generic usb_modeswitch definition for Huawei modem in /usr/lib/udev/rules.d/40-usb_modeswitch.rules.

Edit 1:

Outpui from usb_modeswitch - still the same:

Code: Select all
[root@Piotr ~]# /usr/sbin/usb_modeswitch -W -J -v 12d1 -p 14dc
Take all parameters from the command line


 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.5.2 (C) Josua Dietze 2017
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x14dc
HuaweiNewMode=1

Look for default devices ...
  found USB ID 8087:8002
  found USB ID 1d6b:0002
  found USB ID 1d6b:0003
  found USB ID 1d6b:0002
  found USB ID 8087:800a
  found USB ID 1d6b:0002
  found USB ID 1d6b:0003
  found USB ID 0a12:0001
  found USB ID 0bda:8176
  found USB ID 05e3:0608
  found USB ID 046d:c31c
  found USB ID 12d1:14dc
   vendor ID matched
   product ID matched
  found USB ID 067b:2303
  found USB ID 1d6b:0002
 Found devices in default mode (1)
Access device 008 on bus 002
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
 with class 2
Error: can't use storage command in MessageContent with interface 0; interface class is 2, expected 8. Abort

Re: Huawei E3372 LTE Modem (HiLink) does not work in M7

PostPosted: Dec 8th, '19, 10:40
by mackowiakp
Partially solved. I just enter command:

Code: Select all
[root@Piotr network-scripts]# ifup ifcfg-enp0s20u3       

Determining IP information for enp0s20u3... done.


It created itself file /etc/sysconfig/network-scripts/ifcfg-enp0s20u3, with content:

Code: Select all
[root@Piotr network-scripts]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s20u3
DEVICE=enp0s20u3
BOOTPROTO=dhcp
ONBOOT=yes


So ifconfig output for that interface looks correctly and all works OK.

Code: Select all
enp0s20u3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.8.100  netmask 255.255.255.0  broadcast 192.168.8.255
        inet6 fe80::e5b:8fff:fe27:9a64  prefixlen 64  scopeid 0x20<link>
        ether 0c:5b:8f:27:9a:64  txqueuelen 1000  (Ethernet)
        RX packets 121  bytes 52081 (50.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 43  bytes 9278 (9.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


But two problems. First - it does not initialise itself during boot, although ONBOOT=yes option is present in cfg file. Running manually "ifup enp0s20u3" starts interface.
Second problem - no self initialisation during hot plug modem to USB, although "HOTPLUG=yes" option is present in cfg file So again running manually "ifup enp0s20u3" starts interface.

What to do to get it working as in OpenWRT?

Re: Huawei E3372 LTE Modem (HiLink) does not work in M7

PostPosted: Jan 12th, '20, 18:17
by wintpe
take a look at
/etc/usb_modeswitch.conf
to me it looks like you have an option in there that might help
custom config files are supposed to go in /etc/usb_modeswitch.d
although that currently does not exist on my system.
man /etc/usb_modeswitch.conf
may have more info

and

https://draisberghof.de/usb_modeswitch/

regards peter