Huawei E3372 not getting ipv4 through wwan_4 interface

I have the following issue setting up a LTE usb stick Huawei E3372 on a GLinet Brume 2 device with OpenWRT 21.02.

The stick seems to be working and connecting but doesnt get a ipv4. I have the exact same issue as this person posted years ago here:

Device is running on wwan0 but I get this 3 times and then nothing:

wwan_4 (2390): udhcpc: sending discover
wwan_4 (2390): udhcpc: sending discover
wwan_4 (2390): udhcpc: sending discover

Anyone maybe have a clue whats going on?

/etc/config/network

config interface 'wwan'
option proto 'ncm'
option ifname 'wwan0'
option metric '40'
option delegate '0'
option disabled '0'
option mode 'preferlte'
option password 'tm'
option username 'telekom'
option delay '20'
option ipv6 '0'
option dialnumber '*99#'
option pdptype 'IPV4'
option apn 'internet.telekom'
option device '/dev/ttyUSB1'

dmesg

[ 7528.856860] usb 1-1.4: new high-speed USB device number 9 using xhci-mtk
[ 7529.053639] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[ 7529.075395] scsi host0: usb-storage 1-1.4:1.0
[ 7529.192736] usb 1-1.4: USB disconnect, device number 9
[ 7529.888661] usb 1-1.4: new high-speed USB device number 10 using xhci-mtk
[ 7530.113262] option 1-1.4:1.0: GSM modem (1-port) converter detected
[ 7530.119765] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB0
[ 7530.127097] option 1-1.4:1.1: GSM modem (1-port) converter detected
[ 7530.133611] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB1
[ 7530.246981] huawei_cdc_ncm 1-1.4:1.2: MAC-Address: 00:1e:10:1f:00:00
[ 7530.253344] huawei_cdc_ncm 1-1.4:1.2: setting rx_max = 16384
[ 7530.266135] huawei_cdc_ncm 1-1.4:1.2: NDP will be placed at end of frame for this device.
[ 7530.274458] huawei_cdc_ncm 1-1.4:1.2: cdc-wdm0: USB WDM device
[ 7530.280855] huawei_cdc_ncm 1-1.4:1.2 wwan0: register 'huawei_cdc_ncm' at usb-11200000.xhci-1.4, Huawei CDC NCM device, 00:1e:10:1f:00:00
[ 7530.293556] usb-storage 1-1.4:1.3: USB Mass Storage device detected
[ 7530.300146] scsi host0: usb-storage 1-1.4:1.3
[ 7530.305101] usb-storage 1-1.4:1.4: USB Mass Storage device detected
[ 7530.311680] scsi host1: usb-storage 1-1.4:1.4
[ 7531.362761] scsi 1:0:0:0: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
[ 7531.372085] scsi 0:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
[ 7531.382701] sd 1:0:0:0: Power-on or device reset occurred
[ 7531.398006] sd 1:0:0:0: [sda] Attached SCSI removable disk

lsusb

Bus 001 Device 010: ID 12d1:1506 HUAWEI_MOBILE HUAWEI_MOBILE
Bus 001 Device 002: ID 05e3:0610 GenesysLogic USB2.1 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux 5.4.211 xhci-hcd xHCI Host Controller
Bus 002 Device 002: ID 05e3:0626 GenesysLogic USB3.1 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux 5.4.211 xhci-hcd xHCI Host Controller

logread

Thu Jan 25 03:07:31 2024 daemon.notice netifd: wwan (3039): sending -> AT
Thu Jan 25 03:07:31 2024 daemon.notice netifd: wwan (3039): sending -> ATZ
Thu Jan 25 03:07:32 2024 daemon.notice netifd: wwan (3039): sending -> ATQ0
Thu Jan 25 03:07:33 2024 daemon.notice netifd: wwan (3039): sending -> ATV1
Thu Jan 25 03:07:33 2024 daemon.notice netifd: wwan (3039): sending -> ATE1
Thu Jan 25 03:07:34 2024 daemon.notice netifd: wwan (3039): sending -> ATS0=0
Thu Jan 25 03:07:34 2024 daemon.notice netifd: wwan (3039): sending -> AT+CGDCONT=1,"IP","internet.telekom"
Thu Jan 25 03:07:35 2024 daemon.notice netifd: wwan (3039): Configuring modem
Thu Jan 25 03:07:35 2024 daemon.notice netifd: wwan (3039): Setting mode
Thu Jan 25 03:07:36 2024 daemon.notice netifd: wwan (3039): sending -> AT^SYSCFGEX="030201",3fffffff,2,4,7fffffffffffffff,,
Thu Jan 25 03:07:37 2024 daemon.notice netifd: wwan (3039): Starting network wwan
Thu Jan 25 03:07:37 2024 daemon.notice netifd: wwan (3039): Connecting modem
Thu Jan 25 03:07:37 2024 daemon.notice netifd: wwan (3039): sending -> AT^NDISDUP=1,1,"internet.telekom","telekom","tm"
Thu Jan 25 03:07:38 2024 daemon.notice netifd: wwan (3039): Setting up wwan0
Thu Jan 25 03:07:38 2024 daemon.notice netifd: Interface 'wwan' is now up
Thu Jan 25 03:07:38 2024 daemon.notice netifd: Network device 'wwan0' link is up
Thu Jan 25 03:07:38 2024 daemon.notice netifd: Network alias 'wwan0' link is up
Thu Jan 25 03:07:38 2024 daemon.notice netifd: Interface 'wwan_4' is enabled
Thu Jan 25 03:07:38 2024 daemon.notice netifd: Interface 'wwan_4' has link connectivity
Thu Jan 25 03:07:38 2024 daemon.notice netifd: Interface 'wwan_4' is setting up now
Thu Jan 25 03:07:38 2024 daemon.notice netifd: wwan_4 (4242): udhcpc: started, v1.33.2
Thu Jan 25 03:07:38 2024 user.notice firewall: Reloading firewall due to ifup of wwan (wwan0)
Thu Jan 25 03:07:38 2024 daemon.notice netifd: wwan_4 (4242): udhcpc: sending discover
Thu Jan 25 03:07:40 2024 daemon.info avahi-daemon[5525]: Joining mDNS multicast group on interface wwan0.IPv6 with address fe80::21e:HIDDEN:0.
Thu Jan 25 03:07:40 2024 daemon.info avahi-daemon[5525]: New relevant interface wwan0.IPv6 for mDNS.
Thu Jan 25 03:07:40 2024 daemon.info avahi-daemon[5525]: Registering new address record for fe80::21e:HIDDEN:0 on wwan0.*.
Thu Jan 25 03:07:41 2024 daemon.notice netifd: wwan_4 (4242): udhcpc: sending discover
Thu Jan 25 03:07:44 2024 daemon.notice netifd: wwan_4 (4242): udhcpc: sending discover

ifconfig

wwan0 Link encap:Ethernet HWaddr 00:1E:10:1F:00:00
inet6 addr: fe80::21e:HIDDEN:0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:15212 (14.8 KiB)

Is EOL, you should upgrade.
If you're running gl.inets "openwrt", ask them, or install proper Openwrt.

I dont need nonsense answers. If you had taken 2 minutes and followed the above link: Huawei E3372 on TL-WDR3600

You had seen in a few seconds, it worked for the person who posed it 6 years ago on OpenWrt (18.06-SNAPSHOT r6909) running on a x86, but then not working with the exact same issue on a tl-wdr3600.

so what ?

do you really think 18.06 and 21.02 are identical ?

I just ran into the same issue on stock OpenWrt 23.05.2 on x86 think client with the same modem.
Turns out all the guides are wrong, and for this modem to work one needs to install some extra packages for Huawei CDC: https://openwrt.org/docs/guide-user/network/wan/wwan/ethernetoverusb_ncm

1 Like

Sad to see your post comes a bit too late. I bricked my E3372 in the desperate try to re flash it back to router mode from modem mode, and it was non functional anymore and had to throw it in the trash and bought a 2nd standalone LTE router for 50Eur with Openwrt : / Nothing I tried got it to work and like you said I think all guides were wrong, really sad. What you said with CDC though didnt work for me too I think I had tried that guide too, also didnt work. It would just never get a ipv4 through DHCP and would be stuck.

Yup, that's another part of what I had to debug today. For whatever reason it is not clear which ttyUSB you need to use. In my case on ttyUSB1 was exactly as you described - connected but no DHCP. On ttyUSB0 it just worked. I got this tip from a friend who had his exactly the other way around.

This is my config. And by the way, E3372 is a general model number. Mine is exactly E3372H-153 as written on the sticker.

config interface 'lte'
        option proto 'ncm'
        option device '/dev/ttyUSB0'
        option pdptype 'IP'
        option ipv6 'auto'
        option apn 'internet'
        option username 'internet'
        option password 'internet'

Don't think ttyUSB, think USB interfaces and their numbers.
Check with cat /sys/kernel/debug/usb/devices

Does your ISP support v4 over the air? More and more LTE is becoming v6 only, particularly with Telekom / T-Mobile.

Yes, in my case I have IPv4 (in fact they have different APN for v4 and v6)

As for ttyUSB:

[ 1733.197877] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB0
[ 1733.198920] usb 1-1.4: GSM modem (1-port) converter now attached to ttyUSB1
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/9p, 480M
    |__ Port 1: Dev 2, If 0, Class=, Driver=hub/4p, 480M
        |__ Port 3: Dev 4, If 0, Class=, Driver=usbfs, 12M
        |__ Port 4: Dev 12, If 4, Class=, Driver=usb-storage, 480M
        |__ Port 4: Dev 12, If 2, Class=, Driver=huawei_cdc_ncm, 480M
        |__ Port 4: Dev 12, If 0, Class=, Driver=option, 480M
        |__ Port 4: Dev 12, If 3, Class=, Driver=usb-storage, 480M
        |__ Port 4: Dev 12, If 1, Class=, Driver=option, 480M
T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=02 Dev#= 12 Spd=480  MxCh= 0
D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=12d1 ProdID=1506 Rev= 1.02
S:  Manufacturer=HUAWEI_MOBILE
S:  Product=HUAWEI_MOBILE
C:* #Ifs= 5 Cfg#= 1 Atr=80 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=02 Prot=12 Driver=option
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=01 Driver=option
E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:  If#= 2 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=02 Prot=16 Driver=huawei_cdc_ncm
E:  Ad=86(I) Atr=03(Int.) MxPS=  16 Ivl=2ms
I:* If#= 2 Alt= 1 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=16 Driver=huawei_cdc_ncm
E:  Ad=86(I) Atr=03(Int.) MxPS=  16 Ivl=2ms
E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=125us
I:* If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=125us

Idk how it maps to what becomes "first' and "second" tty as reported via dev. But this single modem exposes two of them, both accept AT commands and only one of them gets IP address on <name>_4 interface, other one never does.

ifstatus lte_4
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": true,
	"uptime": 5909,
	"l3_device": "wwan0",
	"proto": "dhcp",
	"device": "wwan0",
	"updated": [
		"addresses",
		"routes",
		"data"
	],

And so on... on the other tty this interface was created but never got into "up" state. It was stuck like this:

ifstatus lte_4
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": true,
	"uptime": 5909,
	"l3_device": "wwan0",
	"proto": "dhcp",
	"device": "wwan0",
	"updated": [
		"addresses",
		"routes",
		"data"
	],

This is what they call "4G PCUI", in the absence of other serial devices it will be visible to the OS as the 1st tty port - /dev/ttyUSB0 (for the modem referenced above).

The interface numbering in the example above is a bit abnormal, usually the interfaces are sorted by Protocol, so "Prot=01" comes before "Prot=12" and the working command port is the 2nd one or /dev/ttyUSB1.

You get the IP address(es) from cdc_ncm interface (/dev/cdc-wdm0), not from /dev/ttyUSBx.

Believe me, I tried over 2 weeks, everything, it didnt matter if you used ttyUSB0, ttyUSB1 or the CDWM device, none were working, all were stuck at getting DHCP ipv4, and then the modem randomly entered buggy state if you tried to switch between ttyUSB0 and ttyUSB1 and wouldnt work anymore, until you disconnected it from usb and reconnected. Of course my ISP supports IPv4... Deutsche Telekom in Germany with internet.telekom APN. The E3372 is just trash in modem mode, at least under OpenWRT, it seems it works fine normally under Ubuntu. It was just a pain and nothing I tried worked. In the end I bricked it trying to flash it back into router mode and threw it away and got another cheap 4g router for 50Eur, this one, which also runs OpenWRT btw, but it is locked so you cant ssh connect or install any packages: https://www.cudy.com/products/lt400-outdoor-1-0 .