Huawei E3372 does not working in 19.07

I have a Sagem F@ST2704V2 8/16 Flash/RAM router. I had OpenWRT ver 17 installed on it earlier. Then I have a Huawei e3372 HiLink LTE modem connected to the router's USB port. In this version (17.04) everything was working fine. The lsusb command on Linux shows:

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

Now I changed the version of OpenWRT 19.04 and the GSM/LTE connection stopped working. It is also not visible as a disk, an SD card installed in the slot of this LTE module. After connecting this modem to the USB port, the system logs show:

...

Sun Jul 19 07:12:49 2020 kern.info kernel: [4588.523728] usb 1-1: new high-speed USB device number 7 using ehci-platform

...

Additionally, the files /sys/devices/platform/ehci-platform/usb1 also show correctly:

root @ Bioama-1: /sys/devices/platform/ehci-platform/usb1/ 1-1 # cat idVendor
12d1
root @ Bioama-1:/sys/devices/platform/ehci-platform/usb1 /1-1 # cat idProduct
14dc

usb_modeswitch is installed using the same procedure as I did in version 17.04. A probable cause is that there is no definition for the device 12d1: 14dc in the file /etc/usb-mode.json.
So what should the correct entry for this device look like in usb-mode.json? Or maybe the reason for the failure is something else? What else can I check?

AFAIK 12d1:14dc is "ethernet" mode so usb_modeswitch did convert from default default mass storage device mode 12d1:1f01

do you have necessary modules installed for "ethernet" mode? opkg install kmod-usb-net-cdc-ether

I haven't. So just install kmod-usb-net-cdc-ether, power off/on but still both modem port and SD card is not listed in /dev dir.

root@Bioama-1:~# ls /dev/
bus                 mtd1                mtdblock1           pts
console             mtd1ro              mtdblock2           random
cpu_dma_latency     mtd2                mtdblock3           shm
full                mtd2ro              mtdblock4           tty
gpiochip0           mtd3                mtdblock5           ttyS0
hwrng               mtd3ro              network_latency     urandom
kmsg                mtd4                network_throughput  watchdog
log                 mtd4ro              null                zero
memory_bandwidth    mtd5                port
mtd0                mtd5ro              ppp
mtd0ro              mtdblock0           ptmx

What else I have to do?

i dont know if it shows up in /dev it's an ethernet interface, try logread | grep ethernet or ifconfig or check in luci when creating new interface, if you already have eth0 you should have eth1 also with huawey in hilink mode.

also if dongle is in ethernet mode i dont know if you can access cd and/or sd card.

It is not listed in ifconfig output:

root@Bioama-1:~# ifconfig
br-admin  Link encap:Ethernet  HWaddr 7C:03:D8:85:51:47  
          inet6 addr: fe80::7e03:d8ff:fe85:5147/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:816 (816.0 B)

br-lan    Link encap:Ethernet  HWaddr 7C:03:D8:85:51:47  
          inet addr:192.168.0.221  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::7e03:d8ff:fe85:5147/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4049 errors:0 dropped:488 overruns:0 frame:0
          TX packets:643 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:500311 (488.5 KiB)  TX bytes:91870 (89.7 KiB)

eth0      Link encap:Ethernet  HWaddr 7C:03:D8:85:51:47  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4180 errors:0 dropped:22 overruns:0 frame:0
          TX packets:664 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:596327 (582.3 KiB)  TX bytes:97997 (95.7 KiB)

eth0.1    Link encap:Ethernet  HWaddr 7C:03:D8:85:51:47  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4049 errors:0 dropped:0 overruns:0 frame:0
          TX packets:643 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:500311 (488.5 KiB)  TX bytes:91870 (89.7 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:72 errors:0 dropped:0 overruns:0 frame:0
          TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5223 (5.1 KiB)  TX bytes:5223 (5.1 KiB)

wlan0     Link encap:Ethernet  HWaddr 7C:03:D8:85:51:47  
          inet6 addr: fe80::7e03:d8ff:fe85:5147/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3065 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:516807 (504.6 KiB)

Notice that all interfaces have the same MAC address. So it is the same device. But the most strange think is that SD card is not listed too in /dev dir

And output from log:

root@Bioama-1:~# logread | grep ethernet
root@Bioama-1:~#
Nothing.

what does lsusb say?

When I connect dongle to "ordinary" Linux (Mageia 7) lsusb shows:

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

for sd card you need correct modules like opkg install kmod-usb-storage

we need to know from openwrt but you can try from linux box in usb_modeswitch.conf DisableSwitching=1 unplug/replug and usb_modeswitch -v 0x12d1 -p 0x1f01 -n -I -M 55534243123456780000000000000011063000000100010000000000000000 you should read in log something like cdc_ncm 1-2:1.3: MAC-Address: 00:1e:10:1f:00:00 cdc_ncm 1-2:1.3 wwan0: register 'cdc_ncm' at usb-0000:02:03.0-2, Mobile Broadband Network Device, 00:1e:10:1f:00:00 usbcore: registered new interface driver cdc_ncm usbcore: registered new interface driver cdc_wdm usbcore: registered new interface driver cdc_mbim cdc_ncm 1-2:1.3 wwx001e101f0000: renamed from wwan0

if this works on linux box you should replicate in openwrt https://openwrt.org/docs/guide-user/network/wan/wwan/ethernetoverusb_ncm

I thnk that default OpenWRT image has no all repos. Look for outputs below:

root@Bioama-1:~# opkg install kmod-usb-storage
Unknown package 'kmod-usb-storage'.
Collected errors:
 * opkg_install_cmd: Cannot install package kmod-usb-storage.
root@Bioama-1:~# usb_modeswitch -v 0x12d1 -p 0x1f01 -n -I -M 555342431234567800000000000
00011063000000100010000000000000000
-ash: usb_modeswitch: not found
root@Bioama-1:~# opkg list|grep usb_modeswitch
root@Bioama-1:~# opkg install usb_modeswitch
Unknown package 'usb_modeswitch'.
Collected errors:
 * opkg_install_cmd: Cannot install package usb_modeswitch.
root@Bioama-1:~# cd /
root@Bioama-1:/# du -a|grep usb_modeswitch
root@Bioama-1:/# lsusb
-ash: lsusb: not found

But thereis command usbmode

opkg update
opkg install kmod-usb-storage kmod-usb-net-cdc-ether comgt-ncm kmod-usb-net-huawei-cdc-ncm usb-modeswitch 

then unplug dongle.. reboot.. logread -f re-plug dongle

OK there is the output:

Mon Jul 20 10:41:14 2020 kern.info kernel: [  120.055667] usb-storage 1-1:1.0: USB Mass Storage device detected
Mon Jul 20 10:41:14 2020 kern.info kernel: [  120.076204] scsi host0: usb-storage 1-1:1.0
Mon Jul 20 10:41:15 2020 kern.info kernel: [  120.923313] usb 1-1: USB disconnect, device number 2
Mon Jul 20 10:41:15 2020 kern.info kernel: [  121.408178] usb 1-1: new high-speed USB device number 3 using ehci-platform
Mon Jul 20 10:41:15 2020 kern.info kernel: [  121.585356] cdc_ether 1-1:1.0 eth1: register 'cdc_ether' at usb-ehci-platform-1, CDC Ethernet Device, 0c:5b:8f:27:9a:64
Mon Jul 20 10:41:15 2020 kern.info kernel: [  121.648715] usb-storage 1-1:1.2: USB Mass Storage device detected
Mon Jul 20 10:41:15 2020 kern.info kernel: [  121.692202] scsi host0: usb-storage 1-1:1.2
Mon Jul 20 10:41:16 2020 kern.notice kernel: [  122.726090] scsi 0:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
Mon Jul 20 10:41:16 2020 kern.notice kernel: [  122.745334] sd 0:0:0:0: [sda] 15126528 512-byte logical blocks: (7.74 GB/7.21 GiB)
Mon Jul 20 10:41:16 2020 kern.notice kernel: [  122.772214] sd 0:0:0:0: [sda] Write Protect is off
Mon Jul 20 10:41:16 2020 kern.debug kernel: [  122.777172] sd 0:0:0:0: [sda] Mode Sense: 0f 00 00 00
Mon Jul 20 10:41:16 2020 kern.notice kernel: [  122.824226] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Mon Jul 20 10:41:17 2020 kern.info kernel: [  122.877113]  sda: sda1 sda2 sda3
Mon Jul 20 10:41:17 2020 kern.notice kernel: [  122.908051] sd 0:0:0:0: [sda] Attached SCSI removable disk

So now I can see SD card partitions. But Ethernet is not present in /dev dir. But output shows that such device is registred:

Mon Jul 20 10:41:15 2020 kern.info kernel: [  121.585356] cdc_ether 1-1:1.0 eth1: register 'cdc_ether' at usb-ehci-platform-1, CDC Ethernet Device, 0c:5b:8f:27:9a:64

But ifconfig still not shows eth1.

progress :smiley:

try to add connection from luci and use eth1? or manually from /etc/config/network

config interface 'wan2'
        option ifname 'eth1'
        option proto 'dhcp'

YEP!!! THX very, very much. Now I can see both SD card and LTE modem as eth1 !
Thanks again ! When You will be in my country, double beer for You !

you can remove this to save space if needed

remember to install file system package for your sd card like opkg install kmod-fs-ext4

i also suggest you to google for "how to convert 3372 from hilink to stick mode" this will avoid double nat, then you can follow this to setup https://openwrt.org/docs/guide-user/network/wan/wwan/ethernetoverusb_ncm

edit: and dont forget to fix your network for new interface like firewall settings and so on..

cheers :beers:

Hmm another problem:

root@Bioama-1:/etc# opkg install kmod-fs-ext4
Unknown package 'kmod-fs-ext4'.
Collected errors:
 * opkg_install_cmd: Cannot install package kmod-fs-ext4
opkg update
opkg install kmod-fs-ext4

don't forget to fix your firewall for new interface

Oh, yes. I forgot that now default gateway is LTE port, not wired ethernet. So I have to pkug SIM card. Shame...

don't forget firewall add new connection to wan zone :smiley:

/etc/config/firewall
config zone
        option name 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        option network 'wan wan6 **wan2**' <--- or your chosen name

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.