No CDC device for qmi modem

I'm using a Dual Gigabit Ethernet 5G/4G Mini-Computer with a CM4 and a SIM7600G-H-M.2 SIMCom which as far as I can see works in qmi mode by default. I have Openwrt 23.05.5 installed and have followed the instructions in the openwrt guide.

https://openwrt.org/docs/guide-user/network/wan/wwan/ltedongle

The problem is that rather than being able to access it through a cdc device it is only available as a usb device.

It is not possible to change the mode as AT+QCFG is not supported but that should not matter as it is by default in qmi mode.

How can I create a cdc device for it?

As noted on the page you mentioned:

  • check the details about USB devices detected by the system by running cat /sys/kernel/debug/usb/devices on the console:

cdc stands for (usb) communications device class,.

It is picking up the device, and is accessible through ttyUSB2 which I have tested with minicom, but cdc-wdm0 is not present. Below is an excerpt from the log.

T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1e0e ProdID=9011 Rev= 3.18
S:  Manufacturer=SimTech, Incorporated
S:  Product=SimTech, Incorporated
S:  SerialNumber=0123456789ABCDEF
C:* #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA
A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=ff Driver=(none)
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=87(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=89(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 6 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=8b(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Only one data interface is active at the time, cdc_ether will attach but work only in ECM mode.

There is no "qmi modem" at this moment of time. With the current modem configuration you will need to follow
https://openwrt.org/docs/guide-user/network/wan/wwan/ethernetoverusb_rndis

1 Like

That's funny. Just when I thought simcom couldn't make their firmware more broken. Those people are insane.

I must admit that I had to re-read the usb 2.0 "engineering change notice" introducing the interface association descriptor to see if that's actually a valid config.

The spec says

The interface association descriptor includes function class, subclass and protocol fields. The values in these fields can be the same as the interface class, subclass and protocol values from any one of the associated interfaces. The preferred implementation, for existing device classes, is to use the interface class, subclass and protocol field values from the first interface in the list of associated interfaces.

So I guess you can claim that it doesn't explicitly forbid the above. But that's only because no one thought of the possibility. The author clearly assumed that the interface association would be identified by the class, subclass and protocol from one of the associated interfaces. There's just no reason to do anything else. It's schizophrenic.

I found that if I used Modem Manager it connected the modem using ppp, so not exactly what I wanted, but it works now.

You can switch your modem to MBIM with AT+CUSBPIDSWITCH=9003,1,1
and then follow https://openwrt.org/docs/guide-user/network/wan/wwan/ltedongle
Don't forget to completely remove ModemManager.