I have a rather unknown Huawei LTE Router Based on mt7621AT soc, known as B5318-42 CPE.
it has a detachable LTE modem module, the module is (you guesses right) B5318-42.
the modem module interfaces with the router using USB 3.0 using Mezzanine (IEEE 1386) connector.
4.841598] xhci-mtk 1e1c0000.xhci: supply vbus not found, using dummy regulator
[ 4.849311] xhci-mtk 1e1c0000.xhci: supply vusb33 not found, using dummy regulator
[ 4.857128] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[ 4.862461] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 1
[ 4.883318] xhci-mtk 1e1c0000.xhci: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000290010
[ 4.892490] xhci-mtk 1e1c0000.xhci: irq 21, io mem 0x1e1c0000
[ 4.899555] hub 1-0:1.0: USB hub found
[ 4.903479] hub 1-0:1.0: 2 ports detected
[ 4.908109] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[ 4.913492] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2
[ 4.920976] xhci-mtk 1e1c0000.xhci: Host supports USB 3.0 SuperSpeed
[ 4.927541] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 4.936544] hub 2-0:1.0: USB hub found
[ 4.940434] hub 2-0:1.0: 1 port detected
[ 4.996387] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 5.023613] init: - preinit -
[ 5.364697] **usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci-mtk**
[ 5.568758] random: procd: uninitialized urandom read (4 bytes read)
[ 6.697280] random: jshn: uninitialized urandom read (4 bytes read)
[ 6.904427] random: jshn: uninitialized urandom read (4 bytes read)
[ 6.979771] random: jshn: uninitialized urandom read (4 bytes read)
[ 7.231163] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
[ 7.239552] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
modem data:
Manufacturer: huawei
Model: B5318-42
Revision: 21.297.07.19.00
IMEI: 860943030360820
+GCAP: +CGSM,+DS,+ES
the modem is sim unlocked and datalocked:
AT^SIMLOCK?
^SIMLOCK:0
OK
AT^DATALOCK?
^DATALOCK:1
OK
anyway I can connect to the internet using my simcard which is from another vendor (ISP) using the OEM firmware but not using openwrt !.
the modem works in NCM mode but fails to assign IP address to wwan0 ?
and I don't know how solve the issue.
Sun Oct 9 00:11:06 2022 daemon.notice netifd: Interface 'NCM' is now down
Sun Oct 9 00:11:06 2022 daemon.notice netifd: Interface 'NCM' is setting up now
Sun Oct 9 00:11:08 2022 daemon.notice netifd: NCM (8772): sending -> AT
Sun Oct 9 00:11:09 2022 daemon.notice netifd: NCM (8772): sending -> ATZ
Sun Oct 9 00:11:10 2022 daemon.notice netifd: NCM (8772): sending -> ATQ0
Sun Oct 9 00:11:10 2022 daemon.notice netifd: NCM (8772): sending -> ATV1
Sun Oct 9 00:11:11 2022 daemon.notice netifd: NCM (8772): sending -> ATE1
Sun Oct 9 00:11:12 2022 daemon.notice netifd: NCM (8772): sending -> ATS0=0
Sun Oct 9 00:11:12 2022 daemon.notice netifd: NCM (8772): sending -> AT+CGDCONT=1,"IP","net"
Sun Oct 9 00:11:13 2022 daemon.notice netifd: NCM (8772): Configuring modem
Sun Oct 9 00:11:13 2022 daemon.notice netifd: NCM (8772): Setting mode
Sun Oct 9 00:11:14 2022 daemon.notice netifd: NCM (8772): sending -> AT^SYSCFGEX="030201",3fffffff,2,4,7fffffffffffffff,,
Sun Oct 9 00:11:15 2022 daemon.notice netifd: NCM (8772): Starting network NCM
Sun Oct 9 00:11:15 2022 daemon.notice netifd: NCM (8772): Connecting modem
Sun Oct 9 00:11:16 2022 daemon.notice netifd: NCM (8772): sending -> AT^NDISDUP=1,1,"net"
Sun Oct 9 00:11:16 2022 daemon.notice netifd: NCM (8772): Setting up wwan0
Sun Oct 9 00:11:16 2022 daemon.notice netifd: Interface 'NCM' is now up
Sun Oct 9 00:11:16 2022 daemon.notice netifd: Network device 'wwan0' link is up
Sun Oct 9 00:11:16 2022 daemon.notice netifd: Network alias 'wwan0' link is up
Sun Oct 9 00:11:17 2022 daemon.notice netifd: Interface 'NCM_4' is enabled
Sun Oct 9 00:11:17 2022 daemon.notice netifd: Interface 'NCM_4' has link connectivity
Sun Oct 9 00:11:17 2022 daemon.notice netifd: Interface 'NCM_4' is setting up now
Sun Oct 9 00:11:17 2022 daemon.notice netifd: NCM_4 (8905): udhcpc: started, v1.35.0
Sun Oct 9 00:11:17 2022 user.notice firewall: Reloading firewall due to ifup of NCM (wwan0)
Sun Oct 9 00:11:17 2022 daemon.notice netifd: NCM_4 (8905): udhcpc: broadcasting discover
Sun Oct 9 00:11:20 2022 daemon.notice netifd: NCM_4 (8905): udhcpc: broadcasting discover
Sun Oct 9 00:11:23 2022 daemon.notice netifd: NCM_4 (8905): udhcpc: broadcasting discover
Sun Oct 9 00:12:31 2022 daemon.notice netifd: NCM (9002): Stopping network NCM
Sun Oct 9 00:12:31 2022 daemon.notice netifd: NCM_4 (8905): udhcpc: received SIGTERM
Sun Oct 9 00:12:31 2022 daemon.notice netifd: NCM_4 (8905): udhcpc: entering released state
Sun Oct 9 00:12:31 2022 daemon.notice netifd: NCM_4 (8905): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "NCM_4" } (Permission denied)
1- As you can see the dhcpc never got an ipaddress , why? (this is the problem I believe since it is the last step in ncm protcol if I am correct)
2- permission denied, why?
when I checked the modem, found it connected to my ISP and has a public ip address:
AT+CGPADDR
+CGPADDR: 1,"10.132.244.213" //the ip address from my isp
USB initialization Log:
[ 18.570916] usbcore: registered new interface driver kaweth
[ 18.603833] usbcore: registered new interface driver lan78xx
[ 18.674025] usbcore: registered new interface driver r8152
[ 18.681599] usbcore: registered new interface driver rtl8150
[ 18.724550] usbcore: registered new interface driver usb-storage
[ 18.764451] usbcore: registered new interface driver usbserial_generic
[ 18.771240] usbserial: USB Serial support registered for generic
[ 18.786115] usbcore: registered new interface driver aqc111
[ 18.807954] usbcore: registered new interface driver asix
[ 18.823506] usbcore: registered new interface driver ax88179_178a
[ 18.831514] usbcore: registered new interface driver cdc_eem
[ 18.839366] usbcore: registered new interface driver cdc_ether
[ 18.856642] usbcore: registered new interface driver cdc_ncm
[ 18.863895] usbcore: registered new interface driver cdc_subset
[ 19.002282] huawei_cdc_ncm 2-1:1.0: MAC-Address: 00:1e:10:1f:00:00
[ 19.008565] huawei_cdc_ncm 2-1:1.0: setting rx_max = 16384
[ 19.019729] huawei_cdc_ncm 2-1:1.0: NDP will be placed at end of frame for this device.
[ 19.028139] huawei_cdc_ncm 2-1:1.0: cdc-wdm0: USB WDM device
[ 19.035393] huawei_cdc_ncm 2-1:1.0 wwan0: register 'huawei_cdc_ncm' at usb-1e1c0000.xhci-1, Huawei CDC NCM device, 00:1e:10:1f:00:00
[ 19.152276] huawei_cdc_ncm 2-1:1.1: MAC-Address: 00:1e:10:1f:00:00
[ 19.158663] huawei_cdc_ncm 2-1:1.1: setting rx_max = 16384
[ 19.169758] huawei_cdc_ncm 2-1:1.1: NDP will be placed at end of frame for this device.
[ 19.178118] huawei_cdc_ncm 2-1:1.1: cdc-wdm1: USB WDM device
[ 19.185267] huawei_cdc_ncm 2-1:1.1 wwan1: register 'huawei_cdc_ncm' at usb-1e1c0000.xhci-1, Huawei CDC NCM device, 00:1e:10:1f:00:00
[ 19.302230] huawei_cdc_ncm 2-1:1.2: MAC-Address: 00:1e:10:1f:00:00
[ 19.308581] huawei_cdc_ncm 2-1:1.2: setting rx_max = 16384
[ 19.319648] huawei_cdc_ncm 2-1:1.2: NDP will be placed at end of frame for this device.
[ 19.328000] huawei_cdc_ncm 2-1:1.2: cdc-wdm2: USB WDM device
[ 19.335413] huawei_cdc_ncm 2-1:1.2 wwan2: register 'huawei_cdc_ncm' at usb-1e1c0000.xhci-1, Huawei CDC NCM device, 00:1e:10:1f:00:00
[ 19.452207] huawei_cdc_ncm 2-1:1.3: MAC-Address: 00:1e:10:1f:00:00
[ 19.458530] huawei_cdc_ncm 2-1:1.3: setting rx_max = 16384
[ 19.469744] huawei_cdc_ncm 2-1:1.3: NDP will be placed at end of frame for this device.
[ 19.478078] huawei_cdc_ncm 2-1:1.3: cdc-wdm3: USB WDM device
[ 19.485204] huawei_cdc_ncm 2-1:1.3 wwan3: register 'huawei_cdc_ncm' at usb-1e1c0000.xhci-1, Huawei CDC NCM device, 00:1e:10:1f:00:00
[ 19.497623] usbcore: registered new interface driver huawei_cdc_ncm
[ 19.506105] usbcore: registered new interface driver kalmia
[ 19.708167] mt7621-pci 1e140000.pcie: bus=1 slot=0 irq=23
[ 19.713694] pci 0000:00:00.0: enabling device (0006 -> 0007)
[ 19.719368] mt7603e 0000:01:00.0: enabling device (0000 -> 0002)
[ 19.725598] mt7603e 0000:01:00.0: ASIC revision: 76030010
[ 20.764810] mt7603e 0000:01:00.0: Firmware Version: ap_pcie
[ 20.770415] mt7603e 0000:01:00.0: Build Time: 20160107100755
[ 20.813151] mt7603e 0000:01:00.0: firmware init done
[ 20.998982] mt7621-pci 1e140000.pcie: bus=2 slot=1 irq=24
[ 21.004515] pci 0000:00:01.0: enabling device (0006 -> 0007)
[ 21.010192] mt76x2e 0000:02:00.0: enabling device (0000 -> 0002)
[ 21.016624] mt76x2e 0000:02:00.0: ASIC revision: 76120044
[ 21.704449] mt76x2e 0000:02:00.0: ROM patch build: 20141115060606a
[ 21.718646] mt76x2e 0000:02:00.0: Firmware Version: 0.0.00
[ 21.724294] mt76x2e 0000:02:00.0: Build: 1
[ 21.728417] mt76x2e 0000:02:00.0: Build Time: 201607111443____
[ 21.753190] mt76x2e 0000:02:00.0: Firmware running!
[ 21.831787] usbcore: registered new interface driver pl2303
[ 21.837657] usbserial: USB Serial support registered for pl2303
[ 21.847183] PPP generic driver version 2.4.2
[ 21.855016] NET: Registered protocol family 24
[ 21.874481] usbcore: registered new interface driver qmi_wwan
[ 21.884615] usbcore: registered new interface driver rndis_host
[ 21.901209] usbcore: registered new interface driver ti_usb_3410_5052
[ 21.907957] usbserial: USB Serial support registered for TI USB 3410 1 port adapter
[ 21.915893] usbserial: USB Serial support registered for TI USB 5052 2 port adapter
[ 21.932113] usbcore: registered new interface driver cdc_mbim
[ 21.940581] usbcore: registered new interface driver ipw
[ 21.946189] usbserial: USB Serial support registered for IPWireless converter
[ 21.968672] usbcore: registered new interface driver option
[ 21.974523] usbserial: USB Serial support registered for GSM modem (1-port)
[ 21.982186] option 2-1:1.4: GSM modem (1-port) converter detected
[ 21.988698] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 21.995954] option 2-1:1.5: GSM modem (1-port) converter detected
[ 22.002502] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 22.009848] option 2-1:1.6: GSM modem (1-port) converter detected
[ 22.016671] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB2
[ 22.024088] option 2-1:1.7: GSM modem (1-port) converter detected
[ 22.030832] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB3
The modem responds on ttyUSB0 not cdc_wdm0
but wwan0 is registrted on cdc_wdm0 which might be a problem (I really don't know).
USB listing:
root@OpenWrt:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux 5.10.138 xhci-hcd xHCI Host Controller
Bus 002 Device 002: ID 12d1:1506 HUAWEI_MOBILE HUAWEI_MOBILE
Bus 002 Device 001: ID 1d6b:0003 Linux 5.10.138 xhci-hcd xHCI Host Controller
root@OpenWrt:~# lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-mtk/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=, Driver=huawei_cdc_ncm, 5000M
|__ Port 1: Dev 2, If 1, Class=, Driver=huawei_cdc_ncm, 5000M
|__ Port 1: Dev 2, If 2, Class=, Driver=huawei_cdc_ncm, 5000M
|__ Port 1: Dev 2, If 3, Class=, Driver=huawei_cdc_ncm, 5000M
|__ Port 1: Dev 2, If 4, Class=, Driver=option, 5000M
|__ Port 1: Dev 2, If 5, Class=, Driver=option, 5000M
|__ Port 1: Dev 2, If 6, Class=, Driver=option, 5000M
|__ Port 1: Dev 2, If 7, Class=, Driver=option, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-mtk/2p, 480M
root@OpenWrt:~#
Thank you.