Issues enabling modem on TP-Link Deco X80-5G (not working)

Hello.

I finally decided to flash the Deco X80-5G with OpenWRT, and the system seems to work fine, except for one thing.

I can't seem to enable the 5G modem at all.

I have tried the usual methods described in https://openwrt.org/docs/guide-user/network/wan/wwan/ltedongle, with usbnet mode 0 and 2, but all I get are four usb ports that are using the option module/driver.

root@OpenWrt:/sys/bus/usb/drivers# lsusb -tv
/: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 480M
ID 1d6b:0002 Linux Foundation 2.0 root hub
|__ Port 001: Dev 002, If 0, Class=[unknown], Driver=option, 480M
ID 2c7c:0800 Quectel Wireless Solutions Co., Ltd.
|__ Port 001: Dev 002, If 1, Class=[unknown], Driver=option, 480M
ID 2c7c:0800 Quectel Wireless Solutions Co., Ltd.
|__ Port 001: Dev 002, If 2, Class=[unknown], Driver=option, 480M
ID 2c7c:0800 Quectel Wireless Solutions Co., Ltd.
|__ Port 001: Dev 002, If 3, Class=[unknown], Driver=option, 480M
ID 2c7c:0800 Quectel Wireless Solutions Co., Ltd.
/: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M
ID 1d6b:0003 Linux Foundation 3.0 root hub

If I blacklist option, they won't use any driver. I have tried adding the usb device id by running:

echo "2c7c 0800" > /sys/bus/usb/drivers/qmi_wwan/new_id

This will allow the devices to load the qmi_wwan (or qmi_wwan_q when using Qmodem) driver, and generate three cdc_wdm device (/dev/cdc_wdm0-2). These will not work, and will just hang, as assumed.

(after running the above and resetting the modem):

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=2c7c ProdID=0800 Rev= 4.14
S: Manufacturer=Quectel
S: Product=RG502Q-EA
S: SerialNumber=1d395e86
C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qmi_wwan_q
E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qmi_wwan_q
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#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qmi_wwan_q
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 have tried using mbim, but will not get even this far with it.

The only way to get the modem online, is by using modemmanager, but even then the initial connection attempt fails. If I boot the router, modemmanager brings up the modem and the connection stays for a few seconds until it fails. mmcli -m 0 will report the device status as disabling.

After modemmanager fails, I have to run mmcli -m 0 -e to get the device up and then reconnect from luci, and the connection will seemingly stay up. This is not usable, since I can't do this remotely in case of a power outage, and can't instruct any family member to ssh into the router and then connect to luci.

I have tried the latest official build of OpenWRT, I have tried professor-jonny's build from this winter (https://github.com/professor-jonny/images/tree/main/x80), I have built the latest snapshot using professor-jonny's .config (https://github.com/professor-jonny/pj_openwrt/blob/kmod_virtual_led_test/.config) and also have tried using Qmodem (https://github.com/FUjr/QModem) and the "non-generic" quectel qmi_wwan_q driver with it.

None of this provides any different results.

At this point I have no idea what I'm doing anymore and would appreciate any help. I would prefer to use qmi (or mbim), but even getting modemmanager to establish a connection on boot would be an acceptable short term solution.

Help is very welcome

Use the official OpenWrt build, follow the same instructions: Inconsistent USB enumeration (PC Engines APU) - #5 by AndrewZ

Thank you for replying.

Unfortunately I didn't get to try out ncompact's instructions, since I'm only now back on the computer.

The mbim istructions, however, do not work, since the entire /dev/cdc_wdm0 device is missing.

I have now installed a clean build of OpenWRT 25.12.4, set the modem to mbim mode and the required packages are installed. Also, modemmanager is not installed at all.

Is there something I'm missing?

Check after reboot:

Terminal ready
AT+QCFG="usbnet"

+QCFG: "usbnet",2

OK
root@OpenWrt:~# ls /dev/cdc*
ls: /dev/cdc*: No such file or directory

A list of all the modules loaded (currently qmi_wwan unloaded, which doesn't make a difference, but otherwise stock):

List of loaded modules
aquantia               28672  0
ath11k                454656  1 ath11k_ahb
ath11k_ahb             24576  0
cdc_ether              12288  1 cdc_ncm
cdc_mbim               12288  0
cdc_ncm                24576  1 cdc_mbim
cdc_wdm                20480  1 cdc_mbim
cfg80211              348160  2 ath11k,mac80211
cmac                   12288  1
compat                 12288  3 ath11k_ahb,mac80211,cfg80211
crc_ccitt              12288  1 ppp_async
crc_itu_t              12288  1 aquantia
crc32c_generic         12288  1
drbg                   24576  0
dwc3                   49152  0
dwc3_qcom              16384  0
ext4                  438272  0
geniv                  12288  1 seqiv
gpio_button_hotplug    16384  0
gpio_fan               12288  0
hmac                   12288  0
jbd2                   69632  1 ext4
jitterentropy_rng      16384  0
leds_gpio              12288  0
libcrc32c              12288  1 nf_tables
mac80211              659456  1 ath11k
mbcache                12288  1 ext4
michael_mic            12288  1
mii                    12288  1 usbnet
nf_conntrack           86016  7 nft_redir,nft_nat,nft_masq,nft_flow_offload,nft_ct,nf_nat,nf_flow_table
nf_defrag_ipv4         12288  1 nf_conntrack
nf_defrag_ipv6         16384  1 nf_conntrack
nf_flow_table          32768  2 nf_flow_table_inet,nft_flow_offload
nf_flow_table_inet     12288  0
nf_log_syslog          16384  0
nf_nat                 36864  4 nft_redir,nft_nat,nft_masq,nft_chain_nat
nf_reject_ipv4         12288  2 nft_reject_ipv4,nft_reject_inet
nf_reject_ipv6         12288  2 nft_reject_ipv6,nft_reject_inet
nf_tables             200704208 nft_fib_inet,nf_flow_table_inet,nft_reject_ipv6,nft_reject_ipv4,nft_reject_inet,nft_reject,nft_redir,nft_quota,nft_numgen,nft_nat,nft_masq,nft_log,nft_limit,nft_hash,nft_flow_offload,nft_fib_ipv6,nft_fib_ipv4,nft_fib,nft_ct,nft_chain_nat
nfnetlink              16384  1 nf_tables
nft_chain_nat          12288  2
nft_ct                 20480  4
nft_fib                12288  3 nft_fib_inet,nft_fib_ipv6,nft_fib_ipv4
nft_fib_inet           12288  0
nft_fib_ipv4           12288  1 nft_fib_inet
nft_fib_ipv6           12288  1 nft_fib_inet
nft_flow_offload       12288  0
nft_hash               12288  0
nft_limit              12288  5
nft_log                12288  0
nft_masq               12288  1
nft_nat                12288  0
nft_numgen             12288  0
nft_quota              12288  0
nft_redir              12288  0
nft_reject             12288  3 nft_reject_ipv6,nft_reject_ipv4,nft_reject_inet
nft_reject_inet        12288  2
nft_reject_ipv4        12288  0
nft_reject_ipv6        12288  0
option                 61440  0
ppp_async              16384  0
ppp_generic            36864  3 pppoe,ppp_async,pppox
pppoe                  20480  0
pppox                  12288  1 pppoe
qca_nss_dp             45056  0
qca_ssdk              868352  1 qca_nss_dp
qmi_helpers            20480  1 ath11k
qrtr                   24576  3 qrtr_smd
qrtr_smd               12288  0
seqiv                  12288  0
sha3_generic           12288  0
sha512_arm64           16384  0
sha512_generic         12288  0
slhc                   12288  1 ppp_generic
usb_wwan               16384  1 option
usbnet                 24576  3 cdc_mbim,cdc_ncm,cdc_ether
usbserial              28672  2 option,usb_wwan
xhci_hcd              131072  2 xhci_plat_hcd,xhci_pci
xhci_pci               16384  0
xhci_plat_hcd          12288  0
Installed packages

apk-mbedtls ath11k-firmware-ipq8074 attendedsysupgrade-common base-files busybox ca-bundle cgi-io dnsmasq dropbear e2fsprogs firewall4 fstools fwtool getrandom hostapd-common ipq-wifi-tplink_deco-x80-5g iw jansson4 jshn jsonfilter kernel kmod-ath kmod-ath11k kmod-ath11k-ahb kmod-cfg80211 kmod-crypto-aead kmod-crypto-ccm kmod-crypto-cmac kmod-crypto-crc32c kmod-crypto-ctr kmod-crypto-gcm kmod-crypto-geniv kmod-crypto-gf128 kmod-crypto-ghash kmod-crypto-hash kmod-crypto-hmac kmod-crypto-manager kmod-crypto-michael-mic kmod-crypto-null kmod-crypto-rng kmod-crypto-seqiv kmod-crypto-sha3 kmod-crypto-sha512 kmod-fs-ext4 kmod-gpio-button-hotplug kmod-hwmon-core kmod-hwmon-gpiofan kmod-i2c-core kmod-leds-gpio kmod-lib-crc-ccitt kmod-lib-crc-itu-t kmod-lib-crc16 kmod-lib-crc32c kmod-libphy kmod-mac80211 kmod-mii kmod-nf-conntrack kmod-nf-conntrack6 kmod-nf-flow kmod-nf-log kmod-nf-log6 kmod-nf-nat kmod-nf-reject kmod-nf-reject6 kmod-nfnetlink kmod-nft-core kmod-nft-fib kmod-nft-nat kmod-nft-offload kmod-nls-base kmod-phy-aquantia kmod-ppp kmod-pppoe kmod-pppox kmod-qca-nss-dp kmod-qca-ssdk kmod-qcom-qmi-helpers kmod-qrtr kmod-qrtr-smd kmod-slhc kmod-thermal kmod-usb-common kmod-usb-core kmod-usb-dwc3 kmod-usb-dwc3-qcom kmod-usb-net kmod-usb-net-cdc-ether kmod-usb-net-cdc-mbim kmod-usb-net-cdc-ncm kmod-usb-net-qmi-wwan kmod-usb-roles kmod-usb-serial kmod-usb-serial-option kmod-usb-serial-wwan kmod-usb-wdm kmod-usb-xhci-hcd kmod-usb3 libatomic1 libblkid1 libblobmsg-json20260213 libc libcomerr0 libe2p2 libevdev libext2fs2 libgcc1 libiwinfo-data libiwinfo20230701 libjson-c5 libjson-script20260213 liblucihttp-ucode liblucihttp0 libmbedtls21 libmnl0 libncurses6 libnftnl11 libnl-tiny1 libpthread librt libsmartcols1 libss2 libubox20260213 libubus20251202 libuci20250120 libuclient20201210 libucode20230711 libudebug libudev-zero libusb-1.0-0 libustream-mbedtls20201210 libuuid1 logd losetup luci luci-app-attendedsysupgrade luci-app-firewall luci-app-package-manager luci-base luci-lib-uqr luci-light luci-mod-admin-full luci-mod-network luci-mod-status luci-mod-system luci-proto-ipv6 luci-proto-mbim luci-proto-ppp luci-theme-bootstrap mtd nano netifd nftables-json odhcp6c odhcpd-ipv6only openwrt-keyring picocom ppp ppp-mod-pppoe procd procd-seccomp procd-ujail rpcd rpcd-mod-file rpcd-mod-iwinfo rpcd-mod-luci rpcd-mod-rpcsys rpcd-mod-rrdns rpcd-mod-ucode terminfo ubi-utils uboot-envtools ubox ubus ubusd uci uclient-fetch ucode ucode-mod-digest ucode-mod-fs ucode-mod-html ucode-mod-log ucode-mod-math ucode-mod-nl80211 ucode-mod-rtnl ucode-mod-ubus ucode-mod-uci ucode-mod-uloop uhttpd uhttpd-mod-ubus umbim urandom-seed urngd usbids usbutils usign wifi-scripts wireless-regdb wpad-basic-mbedtls wwan zlib

Please show the current output of cat /sys/kernel/debug/usb/devices

Here you go:

root@OpenWrt:~# cat /sys/kernel/debug/usb/devices


T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 6.12
S:  Manufacturer=Linux 6.12.87 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=xhci-hcd.1.auto
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 0
D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=2c7c ProdID=0800 Rev= 4.14
S:  Manufacturer=Quectel
S:  Product=RG502Q-EA
S:  SerialNumber=1d395e86
C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
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#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
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

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev= 6.12
S:  Manufacturer=Linux 6.12.87 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=xhci-hcd.1.auto
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

Let's check the modem firmware version with ati and /or at+qgmr

Ok, the reported info is:
RG502QEAAAR11A10M4G_TP_01.200.01.200

Probably TP-Link customised.

I would start from firmware upgrade to the latest generic version.

Alternatively you can switch it back to QMI, install luci-proto-qmi, etc. Make sure you do not use "IPV4V6" in the config.

Ok, I have to consider the firmware upgrade, since the modem is in a TP-Link device and I fear I would end up with an expensive non-5G wifi router :).I would assume there wouldn't necessarily be major issues changing the firmware, because the modem is connected over usb and the device is already running OpenWRT... But don't know how GPIO etc. would come into play, if at all.

QMI doesn't work as is, because of the same issue of no /dev/cdc_wdm devices being generated, unless forcing the device id for qmi_wwan (and even then not working).

Is there a way to try a similar thing with mbim? (adding the usb vendor/device id temporarily to cdc_wdm or cdc_mbim?) I have tried /sys/bus/usb/drivers/cdc_mbim and cdc_wdm and new_id under either one, but only with qmi_wwan does that do anything.

Well, I suppose I have to return to this later tonight...

No other Deco X80-5G users around, I suppose? :slight_smile:

That is fundamentally wrong as MBIM support is based on class and not on vid:pid.
Your modem has no MBIM interface and no driver will help.

Ok, thank you for clarifying. No use wasting time on that then :slight_smile:

It is supported by the current qmi_wwan driver, so it should be no need in manually adding the device.
Once you have time, switch the modem to QMI, restart it and then show the output of cat /sys/kernel/debug/usb/devices
Make sure kmod-usb-net-qmi-wwan is installed.

Ok. I switched the modem back to QMI mode, and reset it. It seems it just reloads the option driver for all usb devices related to the modem.

dmesg:

[44894.451623] usb 1-1: USB disconnect, device number 3
[44894.452013] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[44894.455888] option 1-1:1.0: device disconnected
[44894.463837] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[44894.468040] option 1-1:1.1: device disconnected
[44894.476431] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[44894.480536] option 1-1:1.2: device disconnected
[44894.488896] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[44894.493067] option 1-1:1.3: device disconnected
[44935.981619] usb 1-1: new high-speed USB device number 4 using xhci-hcd
[44936.245546] option 1-1:1.0: GSM modem (1-port) converter detected
[44936.245837] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[44936.251117] option 1-1:1.1: GSM modem (1-port) converter detected
[44936.257810] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[44936.264057] option 1-1:1.2: GSM modem (1-port) converter detected
[44936.270564] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[44936.276784] option 1-1:1.3: GSM modem (1-port) converter detected
[44936.283557] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3

devices:

root@OpenWrt:~# cat /sys/kernel/debug/usb/devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 6.12
S:  Manufacturer=Linux 6.12.87 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=xhci-hcd.1.auto
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  4 Spd=480  MxCh= 0
D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=2c7c ProdID=0800 Rev= 4.14
S:  Manufacturer=Quectel
S:  Product=RG502Q-EA
S:  SerialNumber=1d395e86
C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
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#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
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

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev= 6.12
S:  Manufacturer=Linux 6.12.87 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=xhci-hcd.1.auto
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

The results are always the same, regardless of using QMI or MBIM. The only time anything changes, is if I add the id to qmi_wwan, even though it is supported. This doesn't give me functioning devices, but the driver loads:

/dev/cdc_wdm (new_id):

root@OpenWrt:~# ls /dev/cdc* -la
crw-------    1 root     root      180, 176 Jun  8 21:00 /dev/cdc-wdm0
crw-------    1 root     root      180, 177 Jun  8 21:00 /dev/cdc-wdm1
crw-------    1 root     root      180, 178 Jun  8 21:00 /dev/cdc-wdm2

dmesg (new_id):

[45300.588368] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[45300.592193] option 1-1:1.0: device disconnected
[45300.600139] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[45300.604439] option 1-1:1.1: device disconnected
[45300.612706] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[45300.616890] option 1-1:1.2: device disconnected
[45300.625136] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[45300.629394] option 1-1:1.3: device disconnected
[45341.991399] usb 1-1: new high-speed USB device number 5 using xhci-hcd
[45342.260344] option 1-1:1.0: GSM modem (1-port) converter detected
[45342.260623] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[45342.265851] qmi_wwan 1-1:1.1: bogus CDC Union: master=0, slave=0
[45342.326112] qmi_wwan 1-1:1.1: cdc-wdm0: USB WDM device
[45342.327008] qmi_wwan 1-1:1.1 wwan0: register 'qmi_wwan' at usb-xhci-hcd.1.auto-1, WWAN/QMI device, 66:b2:46:df:fb:ed
[45342.330513] qmi_wwan 1-1:1.2: bogus CDC Union: master=0, slave=0
[45342.387209] qmi_wwan 1-1:1.2: cdc-wdm1: USB WDM device
[45342.388051] qmi_wwan 1-1:1.2 wwan1: register 'qmi_wwan' at usb-xhci-hcd.1.auto-1, WWAN/QMI device, 2e:90:88:95:c4:5a
[45342.391616] qmi_wwan 1-1:1.3: bogus CDC Union: master=0, slave=0
[45342.451018] qmi_wwan 1-1:1.1: unknown notification 32 received: index 1 len 2
[45342.451389] qmi_wwan 1-1:1.3: cdc-wdm2: USB WDM device
[45342.458935] qmi_wwan 1-1:1.3 wwan2: register 'qmi_wwan' at usb-xhci-hcd.1.auto-1, WWAN/QMI device, 0e:27:e9:3f:a0:89

devices (new_id)

root@OpenWrt:~# cat /sys/kernel/debug/usb/devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 6.12
S:  Manufacturer=Linux 6.12.87 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=xhci-hcd.1.auto
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  5 Spd=480  MxCh= 0
D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=2c7c ProdID=0800 Rev= 4.14
S:  Manufacturer=Quectel
S:  Product=RG502Q-EA
S:  SerialNumber=1d395e86
C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qmi_wwan
E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qmi_wwan
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#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=qmi_wwan
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

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 3.00 Cls=09(hub  ) Sub=00 Prot=03 MxPS= 9 #Cfgs=  1
P:  Vendor=1d6b ProdID=0003 Rev= 6.12
S:  Manufacturer=Linux 6.12.87 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=xhci-hcd.1.auto
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

No need to do this.

You don't have QMI interface as such, so no driver can attach to non-existent interface.

Interface #4 is missing for whatever reason. This is what is expected with the normal modem:

I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan

Please show the output of AT+QCFG="usbcfg"

Ok.

Here is what usbcfg prints out:

AT+QCFG="usbcfg"
+QCFG: "usbcfg",0x2C7C,0x0800,1,1,1,1,1,0,0

Then I don't understand what's going on here as all the interfaces are enabled - the 5th parameter is your <net>, QMI or MBIM, depending on other configuration command.

Went reading around the quectel pdf for the 500 series...

AT+QCFG="data_interface"
+QCFG: "data_interface",1,0

:person_facepalming:

For that one person stumbling around in five years. Read the above ^ :smiley:

Did
AT+QCFG="data_interface",0,0

Now I get:

dmesg:

[ 1774.483290] usb 1-1: USB disconnect, device number 2
[ 1774.483677] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[ 1774.487631] option 1-1:1.0: device disconnected
[ 1774.495612] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[ 1774.499735] option 1-1:1.1: device disconnected
[ 1774.508012] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[ 1774.512206] option 1-1:1.2: device disconnected
[ 1774.520481] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[ 1774.524647] option 1-1:1.3: device disconnected
[ 1785.477417] usb 1-1: new high-speed USB device number 3 using xhci-hcd
[ 1785.760678] option 1-1:1.0: GSM modem (1-port) converter detected
[ 1785.760994] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 1785.766237] option 1-1:1.1: GSM modem (1-port) converter detected
[ 1785.773018] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 1785.779147] option 1-1:1.2: GSM modem (1-port) converter detected
[ 1785.785716] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[ 1785.791931] option 1-1:1.3: GSM modem (1-port) converter detected
[ 1785.798612] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
[ 1785.855794] qmi_wwan 1-1:1.4: cdc-wdm0: USB WDM device
[ 1785.856721] qmi_wwan 1-1:1.4 wwan0: register 'qmi_wwan' at usb-xhci-hcd.1.auto-1, WWAN/QMI device, 7e:b3:07:19:78:e8

cat /sys/kernel/debug/usb/devices

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=2c7c ProdID=0800 Rev= 4.14
S:  Manufacturer=Quectel
S:  Product=RG502Q-EA
S:  SerialNumber=1d395e86
C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
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#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
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#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E:  Ad=88(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

and:

root@OpenWrt:~# ls /dev/cdc-wdm0
/dev/cdc-wdm0

Thank you, AndrewZ. This would have probably taken a lot longer alone.

edit: Still wondering why they set it up like that. Maybe worth compiling OpenWRT with pcie support for the modem :thinking:

Edit the page to add information to help others avoid the problems you're experiencing:

Will do that. Still having issues establishing a connection, but when everything works, I'll add the necessary info.