Openwrt with Quectel modem in disable state

Hello everyone,

This my first installation OpenWrt, I'm trying to use OpenWrt with Raspberry Pi4 CM4 with Ultra Board which have 5G modem module (Quectel RM500U-CNV).
I have installed Openwrt (openwrt-23.05.5-bcm27xx-bcm2711-rpi-4-ext4-factory.img) and flashed it to eMMC of the CM4 successfully and can login to Luci UI.
I followed the official openwrt guide to use the module in MBIM mode, installed all recommended packages (kmod, luci-mbim,etc...). When configuring new interface, device is present (/dev/cdc-wdm0) and everything should be fine.
However, the module is not connecting to internet giving errors: sometimes (NO_REGISTRATION) other time (PIN CODE REJECTED).
When issue command mmcli -m 0, I get this:

root@OpenWrt:~# mmcli -m 0
  --------------------------------
  General  |                 path: /org/freedesktop/ModemManager1/Modem/0
           |            device id: 
  --------------------------------
  Hardware |         manufacturer: Quectel
           |                model: RM500U-CNV
           |    firmware revision: sprd
           |         h/w revision: UDX710_modem
           |            supported: gsm-umts, lte, 5gnr
           |              current: gsm-umts, lte, 5gnr
           |         equipment id:
  --------------------------------
  System   |               device: /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/0000:02:01.0/0000:03:00.0/usb2/2-1
           |              drivers: cdc_mbim, option1
           |               plugin: quectel
           |         primary port: cdc-wdm0
           |                ports: cdc-wdm0 (mbim), ttyUSB2 (at), ttyUSB3 (at), wwan0 (net)
  --------------------------------
  Status   |       unlock retries: sim-pin (3)
           |                state: disabled
           |          power state: low
  --------------------------------
  Modes    |            supported: allowed: 2g, 3g, 4g, 5g; preferred: none
           |              current: allowed: 2g, 3g, 4g, 5g; preferred: none
  --------------------------------
  IP       |            supported: ipv4, ipv6, ipv4v6
  --------------------------------
  3GPP     |                 imei:
  --------------------------------
  3GPP EPS | ue mode of operation: ps-2
  --------------------------------
  SIM      |     primary sim path: /org/freedesktop/ModemManager1/SIM/0

I'm really think that:
state: disabled
power state: low
are the problem.

Also worth mentioning that there is LED (blue) in the Ultra Board beside the SIM slot that before was lighting blue, but suddenly now it's not on at all.

Does anyone encountered problem similar or have experience with changing the state to enable and power settings for this mode.

Any help will be appreciated.

Uninstall MM, show the output of cat /sys/kernel/debug/usb/devices
Post a link to Ultra Board technical description.

hi AndrewZ,

Thanks for replying...

I have un-installed ModemManager MM, and below is the output of
cat /sys/kernel/debug/usb/devices

Regarding the modem technical sheet, I can't find one, I just bought it from AliExpress, here is the link to the item on AliExpress if it will help:

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= 5.15
S:  Manufacturer=Linux 5.15.167 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:03:00.0
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= 4
D:  Ver= 2.10 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=2109 ProdID=3431 Rev= 4.20
S:  Product=USB2.0 Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=5000 MxCh= 4
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= 5.15
S:  Manufacturer=Linux 5.15.167 xhci-hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:03:00.0
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=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=5000 MxCh= 0
D:  Ver= 3.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
P:  Vendor=2c7c ProdID=0900 Rev= 4.04
S:  Manufacturer=Quectel
S:  Product=RM500U-CNV
S:  SerialNumber=0123456789ABCDEF
C:* #Ifs= 7 Cfg#= 1 Atr=c0 MxPwr=504mA
A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
E:  Ad=82(I) Atr=03(Int.) MxPS=  16 Ivl=32ms
I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=83(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=84(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=85(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=86(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=05(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=87(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=06(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
root@OpenWrt:~#

Your AT command port should be on If#= 4 (/dev/ttyUSB2)
Use a terminal app like picocom to query the modem:

ATI
AT+CFUN?
AT+CPIN?
AT+CEREG?
AT+CGDCONT?
AT+CGPADDR
AT+QCFG="ethernet"

Try to find the board pinout from the seller or manufacturer, you might need this information in the future.

I have connected to modem using picocom /dev/ttyUSB2 and run the AT commands you mentioned (below is the output for the commands), but still facing the same issue, also below is the system log.

AT+CFUN?
+CFUN: 0

OK
AT+CPIN?
+CPIN: READY

OK
AT+CEREG?
+CEREG: 0,0

OK
AT+CGDCONT?
+CGDCONT: ,"","",

OK
AT+CGPADDR
+CGPADDR: ,""

OK
AT+QCFG="ethernet"
+QCFG: "ethernet",1

OK

System log:

Sat Feb  8 15:26:17 2025 daemon.notice netifd: Interface 'wwan' is setting up now
Sat Feb  8 15:26:17 2025 daemon.notice netifd: wwan (2801): mbim[2801] Reading capabilities
Sat Feb  8 15:26:17 2025 daemon.notice netifd: wwan (2801):   devicetype: 0002 - removable
Sat Feb  8 15:26:17 2025 daemon.notice netifd: wwan (2801):   cellularclass: 0001
Sat Feb  8 15:26:17 2025 daemon.notice netifd: wwan (2801):   voiceclass: 0001 - no-voice
Sat Feb  8 15:26:17 2025 daemon.notice netifd: wwan (2801):   simclass: 0002
Sat Feb  8 15:26:17 2025 daemon.notice netifd: wwan (2801):   dataclass: 8000003B
Sat Feb  8 15:26:17 2025 daemon.notice netifd: wwan (2801):   smscaps: 0003
Sat Feb  8 15:26:17 2025 daemon.notice netifd: wwan (2801):   controlcaps: 0003
Sat Feb  8 15:26:17 2025 daemon.notice netifd: wwan (2801):   maxsessions: 0008
Sat Feb  8 15:26:17 2025 daemon.notice netifd: wwan (2801):   deviceid: 869955060220683
Sat Feb  8 15:26:17 2025 daemon.notice netifd: wwan (2801):   firmwareinfo: sprd
Sat Feb  8 15:26:17 2025 daemon.notice netifd: wwan (2801):   hardwareinfo: UDX710_modem
Sat Feb  8 15:26:17 2025 daemon.notice netifd: wwan (2801): mbim[2801] Checking pin
Sat Feb  8 15:26:17 2025 daemon.notice netifd: wwan (2801): Pin Unlocked
Sat Feb  8 15:26:17 2025 daemon.notice netifd: wwan (2801): mbim[2801] Checking subscriber
Sat Feb  8 15:26:18 2025 daemon.notice netifd: wwan (2801):   readystate: 0001 - initialized
Sat Feb  8 15:26:18 2025 daemon.notice netifd: wwan (2801):   simiccid: 89966421211104185042
Sat Feb  8 15:26:18 2025 daemon.notice netifd: wwan (2801):   subscriberid: 420034210418504
Sat Feb  8 15:26:18 2025 daemon.notice netifd: wwan (2801): mbim[2801] Register with network
Sat Feb  8 15:26:18 2025 daemon.warn odhcpd[1141]: No default route present, overriding ra_lifetime!
Sat Feb  8 15:24:38 2025 daemon.notice netifd: wwan (1965):   nwerror: 0000 - unknown
Sat Feb  8 15:24:38 2025 daemon.notice netifd: wwan (1965):   registerstate: 0001 - deregistered
Sat Feb  8 15:24:38 2025 daemon.notice netifd: wwan (1965):   registermode: 0001 - automatic
Sat Feb  8 15:24:38 2025 daemon.notice netifd: wwan (1965):   availabledataclasses: 0000 - (null)
Sat Feb  8 15:24:38 2025 daemon.notice netifd: wwan (1965):   currentcellularclass: 0001 - gsm
Sat Feb  8 15:24:38 2025 daemon.notice netifd: wwan (1965):   provider_id:
Sat Feb  8 15:24:38 2025 daemon.notice netifd: wwan (1965):   provider_name:
Sat Feb  8 15:24:38 2025 daemon.notice netifd: wwan (1965):   roamingtext:
Sat Feb  8 15:24:38 2025 daemon.notice netifd: wwan (1965): mbim[1965] Subscriber registration failed (code 1)
Sat Feb  8 15:24:38 2025 user.notice root: mbim bringup failed, retry in 15s

This looks like either no LTE signal is available or the LTE network is rejecting your connection. Have you tested that the SIM works to reach the Internet if you place it in a phone? Do you have antennas connected to the modem card?

Yes SIM card is working on phone, and also I tried with different SIM but the same result.
2 antennas connected to the modem.
As you can see from the log the SIM register and immediately de-register again.
I think something with the modem mode or power, because from the output of mmcli before I delete it, the state was disabled and power is low, but I don't know how to toggle the modem mode or these stuff.

I changed modem mode to ECM using AT command:
AT+QCFG="usbnet",1
AT+CFUN=1,1
And everything start working fine and connected to the internet, even the blue indicator I mentioned earlier start to work :wink:

But internet speed is very very slow compare to when use the same SIM in phone.

Is modem mode ECM causing this internet slowness?

Does MBIM is better? and what is wrong with MBIM that make it not connecting to internet but ECM does?

Any AT commands to query the 5G/LTE signal status RSI? and to see which technology being used by the modem (5G,LTE,WCDMA,...)

Check below ping to openwrt.org is very slow and the time value is very high.

root@OpenWrt:~# ping openwrt.org

PING openwrt.org (64.226.122.113): 56 data bytes

64 bytes from 64.226.122.113: seq=0 ttl=46 time=137.936 ms

64 bytes from 64.226.122.113: seq=1 ttl=46 time=123.825 ms

64 bytes from 64.226.122.113: seq=2 ttl=46 time=139.999 ms

64 bytes from 64.226.122.113: seq=3 ttl=46 time=6133.560 ms

64 bytes from 64.226.122.113: seq=4 ttl=46 time=5133.405 ms

64 bytes from 64.226.122.113: seq=5 ttl=46 time=4139.174 ms

64 bytes from 64.226.122.113: seq=6 ttl=46 time=3242.350 ms

64 bytes from 64.226.122.113: seq=7 ttl=46 time=2262.632 ms

64 bytes from 64.226.122.113: seq=8 ttl=46 time=1262.530 ms

64 bytes from 64.226.122.113: seq=9 ttl=46 time=279.866 ms

64 bytes from 64.226.122.113: seq=10 ttl=46 time=131.850 ms

--- openwrt.org ping statistics ---

29 packets transmitted, 25 packets received, 1 duplicates, 13% packet loss

round-trip min/avg/max = 117.243/1211.675/6133.560 ms

Please see Fumbling With OpenWrt and RM500U-CN - #2 by AndrewZ and below.
In addition to that send once AT+QCFG="ethernet",0

1 Like

Much appreciate the support, it's working now using ECM and following the link and configuration you provided.
However the speed still very slow, and when I check using AT+QENG="servingcell" It seems always prefer and connect to WCDMA while there is coverage for LTE and 5G in my area, Do you think this is ISP related coverage issue or there is some configuration can do to optimize and enhance to prefer LTE and 5G?

AT+QENG="servingcell"
+QENG: "servingcell","CONNECT","WCDMA",420,03,86C,734791,3000,3,-96,-34,0,6,4

Let's check a few things:

ATI
AT+QENG="neighbourcell"
AT+QNWPREFCFG="mode_pref"
AT+QNWPREFCFG="lte_band"
AT+QNWPREFCFG="nr5g_band"

Here is the output for above AT commands:

ATI
Quectel
RM500U-CNV
Revision: RM500UCNVAAR03A07M2G

OK
AT+QENG="neighbourcell"
+QENG: "neighbourcell intra","LTE",1850,7,-23,-23,7,1,-11,-,-,-,-

OK
AT+QNWPREFCFG="mode_pref"
+QNWPREFCFG: "mode_pref",AUTO

OK
AT+QNWPREFCFG="lte_band"
+QNWPREFCFG: "lte_band",1:3:5:8:34:38:39:40:41

OK
AT+QNWPREFCFG="nr5g_band"
+QNWPREFCFG: "nr5g_band",1:3:5:8:28:41:77:78:79

OK

Ask Quectel if there is an update available.

You can exclude WCDMA with AT+QNWPREFCFG="mode_pref",NR5G:LTE
and reset the band list with AT+QNWPREFCFG="all_band_reset"

Make sure you have proper antenna(s) attached, ANT0 is your main antenna, but better ask Quectel to share "RM500U-CN Hardware Design" document.

1 Like

I have exclude WCDMA as instructed with AT+QNWPREFCFG="mode_pref",NR5G:LTE , and now is connecting to LTE but not stable (CONN,NOCONN), when I tried with different ISP SIM is connecting to LTE but not 5G and speed still slow.

So, I guess will go with the option to try and upgrade the firmware from Quectel.
If anyone have instruction on how to upgrade the modem firmware and the upgraded package will be much of a help for me :sweat_smile:

Really appreciate the support, many thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.