MT300N and Huawei E3372h-607 stick mode (non hilink mode)

Hello,

I have a Huawei E3372h-607 in stick mode which i am trying to use with NCM driver. I have verified that the device works on a linux system. The device is running firmware 2.264.

Router I guess is V1,

[    0.000000] Linux version 3.18.27 (alzhao@alzhao-ubuntu) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r47065) ) #10 Mon Nov 13 19:06:57 HKT 2017
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620N ver:2 eco:6
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is GL-MT300N

On MT300N, the device is reported as,

[  126.890000] usb 1-1: new high-speed USB device number 2 using ehci-platform
[  127.040000] usb 1-1: no of_node; not parsing pinctrl DT
[  127.070000] option 1-1:1.0: no of_node; not parsing pinctrl DT
[  127.080000] option 1-1:1.0: GSM modem (1-port) converter detected
[  127.080000] option1 ttyUSB0: no of_node; not parsing pinctrl DT
[  127.090000] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[  127.100000] option 1-1:1.1: no of_node; not parsing pinctrl DT
[  127.110000] option 1-1:1.1: GSM modem (1-port) converter detected
[  127.110000] option1 ttyUSB1: no of_node; not parsing pinctrl DT
[  127.120000] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[  127.140000] huawei_cdc_ncm 1-1:1.2: no of_node; not parsing pinctrl DT
[  127.200000] huawei_cdc_ncm 1-1:1.2: MAC-Address: 00:1e:10:1f:00:00
[  127.200000] huawei_cdc_ncm 1-1:1.2: setting rx_max = 16384
[  127.220000] huawei_cdc_ncm 1-1:1.2: cdc-wdm0: USB WDM device
[  127.220000] huawei_cdc_ncm 1-1:1.2 wwan0: register 'huawei_cdc_ncm' at usb-101c0000.ehci-1, Huawei CDC NCM device, 00:1e:10:1f:00:00
[  127.240000] huawei_cdc_ncm 1-1:1.2 wwan0: kevent 12 may have been dropped

The network is defined as,

 config interface 'modem'
        option country 'country71'
        option sp 'isp4'
        option service 'umts'
        option dialnum '*99#'
        option apn 'giffgaff.com'
        option username 'giffgaff'
        option metric '40'
        option proto 'qmi'
        option ifname 'wwan0'
        option device '/dev/cdc-wdm0'
        option password 'password'

Unfortunately, the device never connects to the internet. I tried to use the /dev/ttyUSB0 with the following config,

config interface 'modem'
        option country 'country71'
        option sp 'isp4'
        option service 'umts'
        option dialnum '*99#'
        option apn 'giffgaff.com'
        option username 'giffgaff'
        option metric '40'
        option password 'password'
        option proto '3g'
        option ifname '3g-modem'
        option device '/dev/ttyUSB0'

It was able to connect in this mode,

Sat Jul 21 22:15:33 2018 daemon.notice netifd: Interface 'modem' is setting up now
Sat Jul 21 22:15:35 2018 daemon.notice netifd: modem (10677): Trying to set mode
Sat Jul 21 22:15:37 2018 daemon.notice pppd[10723]: pppd 2.4.7 started by root, uid 0
Sat Jul 21 22:15:38 2018 local2.info chat[10807]: abort on (BUSY)
Sat Jul 21 22:15:38 2018 local2.info chat[10807]: abort on (NO CARRIER)
Sat Jul 21 22:15:38 2018 local2.info chat[10807]: abort on (ERROR)
Sat Jul 21 22:15:38 2018 local2.info chat[10807]: report (CONNECT)
Sat Jul 21 22:15:38 2018 local2.info chat[10807]: timeout set to 10 seconds
Sat Jul 21 22:15:38 2018 local2.info chat[10807]: send (AT&F^M)
Sat Jul 21 22:15:38 2018 local2.info chat[10807]: expect (OK)
Sat Jul 21 22:15:38 2018 local2.info chat[10807]: ^M
Sat Jul 21 22:15:38 2018 local2.info chat[10807]: OK
Sat Jul 21 22:15:38 2018 local2.info chat[10807]:  -- got it
Sat Jul 21 22:15:38 2018 local2.info chat[10807]: send (ATE1^M)
Sat Jul 21 22:15:38 2018 local2.info chat[10807]: expect (OK)
Sat Jul 21 22:15:38 2018 local2.info chat[10807]: ^M
Sat Jul 21 22:15:38 2018 local2.info chat[10807]: ^M
Sat Jul 21 22:15:38 2018 local2.info chat[10807]: OK
Sat Jul 21 22:15:38 2018 local2.info chat[10807]:  -- got it
Sat Jul 21 22:15:38 2018 local2.info chat[10807]: send (AT+CGDCONT=1,"IP","giffgaff.com"^M)
Sat Jul 21 22:15:39 2018 local2.info chat[10807]: timeout set to 30 seconds
Sat Jul 21 22:15:39 2018 local2.info chat[10807]: expect (OK)
Sat Jul 21 22:15:39 2018 local2.info chat[10807]: ^M
Sat Jul 21 22:15:39 2018 local2.info chat[10807]: AT+CGDCONT=1,"IP","giffgaff.com"^M^M
Sat Jul 21 22:15:39 2018 local2.info chat[10807]: OK
Sat Jul 21 22:15:39 2018 local2.info chat[10807]:  -- got it
Sat Jul 21 22:15:39 2018 local2.info chat[10807]: send (ATD*99***1#^M)
Sat Jul 21 22:15:39 2018 local2.info chat[10807]: expect (CONNECT)
Sat Jul 21 22:15:39 2018 local2.info chat[10807]: ^M
Sat Jul 21 22:15:39 2018 local2.info chat[10807]: ATD*99***1#^M^M
Sat Jul 21 22:15:39 2018 local2.info chat[10807]: CONNECT
Sat Jul 21 22:15:39 2018 local2.info chat[10807]:  -- got it
Sat Jul 21 22:15:39 2018 local2.info chat[10807]: send ( ^M)
Sat Jul 21 22:15:39 2018 daemon.info pppd[10723]: Serial connection established.
Sat Jul 21 22:15:39 2018 daemon.info pppd[10723]: Using interface 3g-modem
Sat Jul 21 22:15:39 2018 daemon.notice pppd[10723]: Connect: 3g-modem <--> /dev/ttyUSB0
Sat Jul 21 22:15:39 2018 kern.info kernel: [  516.330000] 3g-modem: renamed from ppp0
Sat Jul 21 22:15:40 2018 daemon.info pppd[10723]: CHAP authentication succeeded: Welcome!!
Sat Jul 21 22:15:40 2018 daemon.notice pppd[10723]: CHAP authentication succeeded
Sat Jul 21 22:15:41 2018 daemon.warn pppd[10723]: Could not determine remote IP address: defaulting to 10.64.64.64
Sat Jul 21 22:15:41 2018 daemon.notice pppd[10723]: local  IP address 10.146.249.5
Sat Jul 21 22:15:41 2018 daemon.notice pppd[10723]: remote IP address 10.64.64.64

On linux desktop i am able to use NCM mode using,

$echo -e "AT^NDISDUP=1,1,\"giffgfaff.com\"\r" > /dev/ttyUSB1
$dhclient wwan0

The same trick doesnt work on MT300N

root@GL-MT300N:~# echo -e "AT^NDISDUP=1,1,\"giffgaff.com\"\r" > /dev/ttyUSB1
root@GL-MT300N:~# udhcpc -f wwan0
udhcpc (v1.24.1) started
Sending discover...
Sending discover...
Sending discover...

How can we use the NCM mode on this device?

I updated the firmware to Lede testing 2.27. Modified the network manually to following (using ssh),

config interface 'modem'   
        option service 'umts'
        option apn 'giffgaff.com'
        option metric '40'       
        option country 'country71'
        option sp 'isp4'          
        option dialnum '*99#'     
        option username 'giffgaff'
        option password 'passowrd'
        option proto 'ncm'        
        option ifname 'wwan0'     
        option device '/dev/ttyUSB1'

The device now comes up,

Sun Jul 22 02:23:12 2018 daemon.notice netifd: Interface 'modem' is setting up now
Sun Jul 22 02:23:14 2018 daemon.notice netifd: modem (2347): sending -> AT
Sun Jul 22 02:23:15 2018 daemon.notice netifd: modem (2347): sending -> ATZ
Sun Jul 22 02:23:15 2018 daemon.notice netifd: modem (2347): sending -> ATQ0
Sun Jul 22 02:23:16 2018 daemon.notice netifd: modem (2347): sending -> ATV1
Sun Jul 22 02:23:17 2018 daemon.notice netifd: modem (2347): sending -> ATE1
Sun Jul 22 02:23:17 2018 daemon.notice netifd: modem (2347): sending -> ATS0=0
Sun Jul 22 02:23:18 2018 daemon.notice netifd: modem (2347): sending -> AT+CGDCONT=1,"IP","giffgaff.com"
Sun Jul 22 02:23:19 2018 daemon.notice netifd: modem (2347): Starting network modem
Sun Jul 22 02:23:19 2018 daemon.notice netifd: modem (2347): sending -> AT^NDISDUP=1,1,"giffgaff.com","giffgaff","passowrd"
Sun Jul 22 02:23:20 2018 daemon.notice netifd: modem (2347): Setting up wwan0
Sun Jul 22 02:23:20 2018 daemon.notice netifd: Interface 'modem' is now up
Sun Jul 22 02:23:20 2018 daemon.notice netifd: Network device 'wwan0' link is up
Sun Jul 22 02:23:20 2018 daemon.notice netifd: Network alias 'wwan0' link is up
Sun Jul 22 02:23:20 2018 daemon.notice netifd: Interface 'modem_4' is enabled
Sun Jul 22 02:23:20 2018 daemon.notice netifd: Interface 'modem_4' has link connectivity 
Sun Jul 22 02:23:20 2018 daemon.notice netifd: Interface 'modem_4' is setting up now
Sun Jul 22 02:23:20 2018 daemon.notice netifd: modem (2347): Command failed: Unknown error
Sun Jul 22 02:23:21 2018 daemon.notice netifd: modem_4 (2396): udhcpc: started, v1.25.1
Sun Jul 22 02:23:21 2018 daemon.notice netifd: modem_4 (2396): udhcpc: sending discover
Sun Jul 22 02:23:21 2018 daemon.info odhcpd[1220]: Using a RA lifetime of 0 seconds on br-lan
Sun Jul 22 02:23:24 2018 daemon.notice netifd: modem_4 (2396): udhcpc: sending discover
Sun Jul 22 02:23:24 2018 daemon.notice netifd: modem_4 (2396): udhcpc: sending select for 10.147.143.192
Sun Jul 22 02:23:24 2018 daemon.notice netifd: modem_4 (2396): udhcpc: lease of 10.147.143.192 obtained, lease time 518400
Sun Jul 22 02:23:24 2018 daemon.notice netifd: Interface 'modem_4' is now up

I saw you changed from USB0 to USB1.

Is this the problem?

For NCM mode, /dev/cdc-wdm0 should be changed to /dev/ttyUSB1 and proto should be ‘ncm’ instead of ‘qmi’.

I know this is an old thread, but I’m stuck in the same spot, able to connect a Huawei MS2372h-517 via the 3g protocol, but when I try to switch to NCM, I can’t seem to get a connection. For me, I get AT commands timing out on ttyUSB0 and ttyUSB1, but they seem to communicate on ttyUSB2:

Wed Nov 14 01:44:59 2018 daemon.notice netifd: Interface 'tethering' is enabled
Wed Nov 14 01:44:59 2018 daemon.notice netifd: Interface 'lan' is enabled
Wed Nov 14 01:44:59 2018 daemon.notice netifd: Interface 'lan' is setting up now
Wed Nov 14 01:44:59 2018 daemon.notice netifd: Interface 'lan' is now up
Wed Nov 14 01:45:00 2018 daemon.notice procd: /etc/init.d/network: brctl: bridge br-lan: Resource busy
Wed Nov 14 01:45:00 2018 daemon.notice procd: /etc/init.d/network: mt7628(mt7628): enable failed
Wed Nov 14 01:45:01 2018 daemon.notice netifd: Interface 'loopback' is enabled
Wed Nov 14 01:45:01 2018 daemon.notice netifd: Interface 'loopback' is setting up now
Wed Nov 14 01:45:01 2018 daemon.notice netifd: Interface 'loopback' is now up
Wed Nov 14 01:45:01 2018 daemon.notice netifd: Interface 'modem' is setting up now
Wed Nov 14 01:45:01 2018 daemon.notice netifd: Interface 'wan' is enabled
Wed Nov 14 01:45:01 2018 daemon.notice netifd: Interface 'wan6' is enabled
Wed Nov 14 01:45:01 2018 daemon.notice netifd: bridge 'br-lan' link is up
Wed Nov 14 01:45:01 2018 user.notice firewall: Reloading firewall due to ifup of lan (br-lan)
Wed Nov 14 01:45:01 2018 daemon.notice netifd: Interface 'lan' has link connectivity 
Wed Nov 14 01:45:01 2018 daemon.notice netifd: Network device 'eth0' link is up
Wed Nov 14 01:45:01 2018 daemon.notice netifd: Interface 'tethering' has link connectivity 
Wed Nov 14 01:45:01 2018 daemon.notice netifd: Interface 'tethering' is setting up now
Wed Nov 14 01:45:01 2018 daemon.notice netifd: VLAN 'eth0.1' link is up
Wed Nov 14 01:45:01 2018 daemon.notice netifd: Network device 'ra0' link is up
Wed Nov 14 01:45:02 2018 daemon.notice netifd: Network device 'lo' link is up
Wed Nov 14 01:45:02 2018 daemon.notice netifd: Interface 'loopback' has link connectivity 
Wed Nov 14 01:45:02 2018 daemon.notice netifd: VLAN 'eth0.2' link is up
Wed Nov 14 01:45:02 2018 daemon.notice netifd: Interface 'wan' has link connectivity 
Wed Nov 14 01:45:02 2018 daemon.notice netifd: Interface 'wan' is setting up now
Wed Nov 14 01:45:02 2018 daemon.notice netifd: Interface 'wan6' has link connectivity 
Wed Nov 14 01:45:02 2018 daemon.notice netifd: Interface 'wan6' is setting up now
Wed Nov 14 01:45:02 2018 daemon.notice netifd: tethering (2308): udhcpc: started, v1.25.1
Wed Nov 14 01:45:02 2018 daemon.err openvpn[1599]: RESOLVE: Cannot resolve host address: mothership.thervitguy.com:1194 (Try again)
Wed Nov 14 01:45:02 2018 daemon.warn openvpn[1599]: Could not determine IPv4/IPv6 protocol
Wed Nov 14 01:45:02 2018 daemon.notice openvpn[1599]: SIGUSR1[soft,init_instance] received, process restarting
Wed Nov 14 01:45:02 2018 daemon.notice openvpn[1599]: Restart pause, 60 second(s)
Wed Nov 14 01:45:02 2018 daemon.notice netifd: wan (2317): udhcpc: started, v1.25.1
Wed Nov 14 01:45:03 2018 daemon.notice netifd: wan (2317): udhcpc: sending discover
Wed Nov 14 01:45:03 2018 daemon.notice netifd: tethering (2308): udhcpc: sending discover
Wed Nov 14 01:45:04 2018 daemon.err insmod: module is already loaded - xt_multiport
Wed Nov 14 01:45:04 2018 daemon.err insmod: module is already loaded - xt_connmark
Wed Nov 14 01:45:04 2018 daemon.err insmod: module is already loaded - xt_comment
Wed Nov 14 01:45:04 2018 daemon.err insmod: module is already loaded - xt_length
Wed Nov 14 01:45:06 2018 daemon.notice netifd: modem (2249): sending -> AT
Wed Nov 14 01:45:06 2018 daemon.notice netifd: wan (2317): udhcpc: sending discover
Wed Nov 14 01:45:07 2018 daemon.notice netifd: tethering (2308): udhcpc: sending discover
Wed Nov 14 01:45:07 2018 daemon.notice netifd: modem (2249): sending -> ATZ
Wed Nov 14 01:45:07 2018 daemon.notice procd: /etc/rc.d/S90startvpn: OpenVPN already started... Exiting. - JAB
Wed Nov 14 01:45:07 2018 daemon.notice netifd: modem (2249): sending -> ATQ0
Wed Nov 14 01:45:07 2018 daemon.info dnsmasq[2686]: started, version 2.78 cachesize 150
Wed Nov 14 01:45:07 2018 daemon.info dnsmasq[2686]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID loop-detect inotify
Wed Nov 14 01:45:07 2018 daemon.info dnsmasq-dhcp[2686]: DHCP, IP range 10.29.71.100 -- 10.29.71.249, lease time 12h
Wed Nov 14 01:45:07 2018 daemon.info dnsmasq[2686]: using nameserver 8.8.4.4#53
Wed Nov 14 01:45:07 2018 daemon.info dnsmasq[2686]: using nameserver 8.8.8.8#53
Wed Nov 14 01:45:07 2018 daemon.info dnsmasq[2686]: using local addresses only for domain RVITclient.lan
Wed Nov 14 01:45:07 2018 daemon.warn dnsmasq[2686]: no servers found in /tmp/resolv.conf.auto, will retry
Wed Nov 14 01:45:07 2018 daemon.info dnsmasq[2686]: read /etc/hosts - 4 addresses
Wed Nov 14 01:45:07 2018 daemon.info dnsmasq[2686]: read /tmp/hosts/dhcp.cfg02411c - 3 addresses
Wed Nov 14 01:45:07 2018 daemon.info dnsmasq-dhcp[2686]: read /etc/ethers - 0 addresses
Wed Nov 14 01:45:08 2018 daemon.notice procd: /etc/rc.d/S96led: setting up led wifi
Wed Nov 14 01:45:08 2018 daemon.notice procd: /etc/rc.d/S96led: setting up led vpn
Wed Nov 14 01:45:08 2018 daemon.notice netifd: modem (2249): sending -> ATV1
Wed Nov 14 01:45:09 2018 daemon.notice netifd: modem (2249): sending -> ATE1
Wed Nov 14 01:45:09 2018 daemon.notice netifd: wan (2317): udhcpc: sending discover
Wed Nov 14 01:45:09 2018 daemon.notice procd: /etc/rc.d/S99ss-server: 
Wed Nov 14 01:45:09 2018 daemon.notice netifd: modem (2249): sending -> ATS0=0
Wed Nov 14 01:45:09 2018 daemon.info procd: - init complete -
Wed Nov 14 01:45:09 2018 daemon.notice netifd: tethering (2308): udhcpc: sending discover
Wed Nov 14 01:45:10 2018 daemon.notice netifd: modem (2249): sending -> AT+CGDCONT=1,"IP","fast.tmobile.com"
Wed Nov 14 01:45:11 2018 daemon.notice netifd: modem (2249): Starting network modem
Wed Nov 14 01:45:11 2018 daemon.notice netifd: modem (2249): sending -> AT^NDISDUP=1,1,"fast.tmobile.com"
Wed Nov 14 01:45:12 2018 daemon.notice netifd: modem (2249): Setting up wwan0
Wed Nov 14 01:45:12 2018 daemon.notice netifd: Interface 'modem' is now up
Wed Nov 14 01:45:12 2018 daemon.notice netifd: Network device 'wwan0' link is up
Wed Nov 14 01:45:12 2018 daemon.notice netifd: Network alias 'wwan0' link is up
Wed Nov 14 01:45:12 2018 daemon.notice netifd: Interface 'modem_4' is enabled
Wed Nov 14 01:45:12 2018 daemon.notice netifd: Interface 'modem_4' has link connectivity 
Wed Nov 14 01:45:12 2018 daemon.notice netifd: Interface 'modem_4' is setting up now
Wed Nov 14 01:45:12 2018 daemon.notice netifd: modem (2249): Command failed: Unknown error
Wed Nov 14 01:45:12 2018 daemon.notice netifd: modem_4 (2855): udhcpc: started, v1.25.1
Wed Nov 14 01:45:12 2018 daemon.notice netifd: modem_4 (2855): udhcpc: sending discover
Wed Nov 14 01:45:15 2018 daemon.notice netifd: modem_4 (2855): udhcpc: sending discover
Wed Nov 14 01:45:18 2018 daemon.notice netifd: modem_4 (2855): udhcpc: sending discover
Wed Nov 14 01:45:23 2018 user.warn mwan3: Could not find gateway for interface modem (wwan0)
Wed Nov 14 01:45:23 2018 user.notice firewall: Reloading firewall due to ifup of modem (wwan0)

I flashed Rooter on it and it working great with that dongle.

If all solutions in this post don’t solve your problem, read my post with the alternative details instructions for do it the trick and solve the problem: