OpenWrt Forum Archive

Topic: qmi, mbim, ncm, rndis

The content of this topic has been archived on 13 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I'm trying to follow https://openwrt.org/docs/guide-user/net … 3gdongle?s[]=usb&s[]=modem for setting up Internet access via a USB modem and am immediately presented with three options:-

qmi and mbim, see How To Use LTE modem in QMI mode for WAN connection
ncm, see How To Use LTE modem in NCM mode for WAN connection
rndis, see How To Use LTE modem in RNDIS mode for WAN connection


Unfortunately I don't know which I want or how to choose.

Any guidance would be appreciated.

Plug the modem into a full Linux desktop or laptop.   Confirm that it can connect to the Internet, and check dmesg to see which driver(s) it uses.

This will save a lot of headache trying to get the modem working on OpenWrt.

(Last edited by mk24 on 18 Mar 2018, 14:05)

I've booted up Arch Linux to a command prompt, and have a choice of four USB modems.

What program should I try to connect to the Internet with?

The one I've plugged in at the moment is attached to ttyUSB3, ttyUSB4, ttyUSB5

lsusb tells me it's a

12d1:1001 Huawei Technologies E161/E169/E620/E800 HSDPA Modem.

Using Minicom on a different system ATI showed it was a Model K3520.

Another modem I just tried shows it is attached to ttyUSB3, ttyUSB4, ttyUSB5, but in addition dmesg says:-

usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver rndis_host
usbcore: registered new interface driver rndis_wlan

lsusb says
12d1:1c05 Huawei Technologies Broadband stick (modem on)

Under minicom ATI shows
Model: E173

Using a Hilink Huawei E3372....

Dnesg:-

usb 2-1.2: new high-speed USB device number 11 using ehci-pci
usb 2-1.2: New USB device found, idVendor=12d1, idProduct=14dc
usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.2: Product: HUAWEI_MOBILE
usb 2-1.2: Manufacturer: HUAWEI_MOBILE
cdc_ether 2-1.2:1.0 eth0: register 'cdc_ether' at usb-0000:00:1d.0-1.2, CDC Ethernet Device, c:5b:8f:27:9a:64
usb-storage 2-1.2:1.2: USB Mass Storage device detected
scsi host6: usb-storage 2-1.2:1.2
cdc_ether 2-1.2:1.0 enp0s29u1u2: renamed from eth0
scsi 6:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
sd 6:0:0:0: Power-on or device reset occurred
sd 6:0:0:0: [sdb] Attached SCSI removable disk
sd 6:0:0:0: [sdb] 62521344 512-byte logical blocks: (32.0 GB/29.8 GiB)
sd 6:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdb: sdb1 sdb2

lsusb says:
011: ID 12d1:14dc Huawei Technologies Co., Ltd. E33372 LTE/UMTS/GSM HiLink Modem/Networkcard

ip a shows these entries which I'm not familiar with, which may be related to this modem:

3: wlp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 8c:70:5a:64:e5:dc brd ff:ff:ff:ff:ff:ff
4: wwp0s29u1u4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
    link/ether f2:13:8c:df:ff:22 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::8374:fc45:50e8:e529/64 scope link 
       valid_lft forever preferred_lft forever
7: enp0s29u1u2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 0c:5b:8f:27:9a:64 brd ff:ff:ff:ff:ff:ff
    inet 192.168.3.10/24 brd 192.168.3.255 scope global noprefixroute enp0s29u1u2
       valid_lft forever preferred_lft forever
    inet6 fe80::5d63:365c:6034:add5/64 scope link 
       valid_lft forever preferred_lft forever

(Last edited by balanga on 18 Mar 2018, 18:00)

It's a RNDIS device then.

These don't work by creating /dev/ttyUSB ports.  Instead you get an Ethernet-like port tied into the kernel's networking system.  I believe that under the new naming system, it's the wwp port.  OpenWrt will name it usb0.

Install kmod-usb-net-rndis and plug in the modem.  You should see a usb0 port with ifconfig -a.  Then edit your networks to link usb0 to a WAN.  Generally you can start with the default configuration and just change the WAN physical settings from the Ethernet port to usb0.

The discussion might have continued from here.