Mbim and PIN CODE ERROR

I am running the X3000 and wanted to try mbim, instead if qmi.
qmi works fine with the config below.

But for mbim, I am getting the error

PINCODE rejected

even if there is no sim in the sim slot.

Is this ISSUE still up to date?

@swvalenti194 hmm, RM520N is not cap with mbim mode, it could be used as QMI mode.

You might want to answer: “Use Modemmanager, that works”,
then I say: “okay, but is the modem manager using proprietary qmi or does it use mbim only?”

Best regards,
Frood

root@OpenWrt:~# cat /sys/kernel/debug/usb/devices 
T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 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=0801 Rev= 5.04
S:  Manufacturer=Quectel
S:  Product=RM520N-GL
S:  SerialNumber=b8x44x2
logread
Fri Oct 31 15:20:57 2025 daemon.notice netifd: Interface '5G_MODEM' is now down
Fri Oct 31 15:20:57 2025 daemon.notice netifd: Interface '5G_MODEM' is setting up now
Fri Oct 31 15:20:57 2025 daemon.notice netifd: 5G_MODEM (5075): mbim[5075] Reading capabilities
Fri Oct 31 15:20:58 2025 daemon.warn odhcpd[1995]: No default route present, overriding ra_lifetime to 0!
Fri Oct 31 15:21:12 2025 daemon.notice netifd: 5G_MODEM (5075): ERROR: mbim message timeout
Fri Oct 31 15:21:12 2025 daemon.notice netifd: 5G_MODEM (5075): mbim[5075] Failed to read modem caps
Fri Oct 31 15:21:27 2025 daemon.notice netifd: 5G_MODEM (5075): ERROR: mbim message timeout
Fri Oct 31 15:21:27 2025 user.notice root: mbim bringup failed, retry in 15s
Fri Oct 31 15:21:42 2025 daemon.notice netifd: 5G_MODEM (5177): mbim[5177] Stopping network
Fri Oct 31 15:21:42 2025 daemon.notice netifd: 5G_MODEM (5177): Command failed: ubus call network.interface notify_proto { "action": 0, "link-up": false, "keep": false, "interface": "5G_MODEM" } (Permission denied)
Fri Oct 31 15:21:42 2025 daemon.notice netifd: Interface '5G_MODEM' is now down
Fri Oct 31 15:21:42 2025 daemon.notice netifd: Interface '5G_MODEM' is setting up now
Fri Oct 31 15:21:42 2025 daemon.notice netifd: 5G_MODEM (5185): mbim[5185] Reading capabilities
Fri Oct 31 15:21:43 2025 daemon.warn odhcpd[1995]: No default route present, overriding ra_lifetime to 0!
root@OpenWrt:~# lsmod | grep -E 'wwan|mhi'
cdc_wdm                20480  3 cdc_mbim,qmi_wwan
qmi_wwan               28672  0 
usb_wwan               16384  1 option
usbcore               180224 15 option,cdc_mbim,usb_wwan,qmi_wwan,cdc_ncm,cdc_ether,usbserial,usbnet,cdc_wdm,usb_storage,xhci_plat_hcd,xhci_pci,xhci_mtk_hcd,xhci_hcd
usbnet                 24576  4 cdc_mbim,qmi_wwan,cdc_ncm,cdc_ether
usbserial              24576  2 option,usb_wwan
cat /etc/config/network

config interface '5G_MODEM'
	option proto 'qmi'
	option device '/dev/cdc-wdm0'
	option apn 'internet.telekom'
	option pincode '0717'
	option auth 'pap'
	option username 'telekom'
	option password 'pm'
	option pdptype 'ipv4'
	option peerdns '0'
	option sourcefilter '0'
	option delegate '0'



config interface '5G_MODEM'
	option proto 'mbim'
	option device '/dev/cdc-wdm0'
	option apn 'internet.telekom'
	option pincode '0007'
	option auth 'pap'
	option username 'telekom'
	option password 'pm'
	option pdptype 'ipv4'

Please show the complete output, up to the next blank line.

Here we go:

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 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=0801 Rev= 5.04
S:  Manufacturer=Quectel
S:  Product=RM520N-GL
S:  SerialNumber=b8e44d2
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=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=40 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

You need to switch it to MBIM first. Please follow

2 Likes

WOW. Thanks!!

I know this page in my memory. It was open in this browser session, but I skipped that part.
It works like a charm! That was extremely fast and super good help.

Let’s see how it performs, this is the first time I try mbim, and I hope it is more stable than qmi.
On some devices, device is in qmi mode connected, IP is retrieved, but sometimes (after 5 or 20 days) somehow it is frozen / stalled. No idea why, noting in the logs. Let’s see if mbim works better.

So far it feels better :slight_smile: and faster.

Also, the question about “How do you know what was wrong, just by looking at the /sys/kernel/debug/usb/devices ?” is answered by:

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 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=0801 Rev= 5.04
S:  Manufacturer=Quectel
S:  Product=RM520N-GL
S:  SerialNumber=b8e44f2
C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA
A:  FirstIf#= 8 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=40 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#= 8 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
E:  Ad=88(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
I:  If#= 9 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I:* If#= 9 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Just look at the syslog :slight_smile: So much more info with mbim!

Fri Oct 31 16:33:01 2025 daemon.notice netifd: Interface '5G_MODEM' is setting up now
Fri Oct 31 16:33:01 2025 daemon.notice netifd: 5G_MODEM (3425): mbim[3425] Reading capabilities
Fri Oct 31 16:33:01 2025 daemon.notice netifd: 5G_MODEM (3425):   devicetype: 0001 - embedded
Fri Oct 31 16:33:01 2025 daemon.notice netifd: 5G_MODEM (3425):   cellularclass: 0001
Fri Oct 31 16:33:01 2025 daemon.notice netifd: 5G_MODEM (3425):   voiceclass: 0001 - no-voice
Fri Oct 31 16:33:01 2025 daemon.notice netifd: 5G_MODEM (3425):   simclass: 0002
Fri Oct 31 16:33:01 2025 daemon.notice netifd: 5G_MODEM (3425):   dataclass: 8000003C
Fri Oct 31 16:33:01 2025 daemon.notice netifd: 5G_MODEM (3425):   smscaps: 0003
Fri Oct 31 16:33:01 2025 daemon.notice netifd: 5G_MODEM (3425):   controlcaps: 0001
Fri Oct 31 16:33:01 2025 daemon.notice netifd: 5G_MODEM (3425):   maxsessions: 000F
Fri Oct 31 16:33:01 2025 daemon.notice netifd: 5G_MODEM (3425):   deviceid: 016442112233449
Fri Oct 31 16:33:01 2025 daemon.notice netifd: 5G_MODEM (3425):   firmwareinfo: RM520NGLAAR03A03M4G
Fri Oct 31 16:33:01 2025 daemon.notice netifd: 5G_MODEM (3425):   hardwareinfo: RM520N-GL
Fri Oct 31 16:33:01 2025 daemon.notice netifd: 5G_MODEM (3425): mbim[3425] Sending pin
Fri Oct 31 16:33:02 2025 daemon.warn odhcpd[1993]: No default route present, overriding ra_lifetime to 0!
Fri Oct 31 16:33:04 2025 daemon.notice netifd: 5G_MODEM (3425): Pin Unlocked
Fri Oct 31 16:33:04 2025 daemon.notice netifd: 5G_MODEM (3425): mbim[3425] Checking pin
Fri Oct 31 16:33:04 2025 daemon.notice netifd: 5G_MODEM (3425): required pin: 3 - pin2
Fri Oct 31 16:33:04 2025 daemon.notice netifd: 5G_MODEM (3425): remaining attempts: 1
Fri Oct 31 16:33:04 2025 daemon.notice netifd: 5G_MODEM (3425): mbim[3425] Checking subscriber
Fri Oct 31 16:33:04 2025 daemon.notice netifd: 5G_MODEM (3425):   readystate: 0001 - initialized
Fri Oct 31 16:33:04 2025 daemon.notice netifd: 5G_MODEM (3425):   simiccid: 99999990002025999999
Fri Oct 31 16:33:04 2025 daemon.notice netifd: 5G_MODEM (3425):   subscriberid: 999999999999999
Fri Oct 31 16:33:04 2025 daemon.notice netifd: 5G_MODEM (3425):   number: +490071234567
Fri Oct 31 16:33:04 2025 daemon.notice netifd: 5G_MODEM (3425): mbim[3425] Register with network
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   nwerror: 0000 - unknown
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   registerstate: 0003 - home
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   registermode: 0001 - automatic
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   availabledataclasses: 80000020 - (null)
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   currentcellularclass: 0001 - gsm
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   provider_id: 26201
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   provider_name: Telekom.de
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   roamingtext: (null)
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425): mbim[3425] Registered in home mode
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425): mbim[3425] Attach to network
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   nwerror: 0000 - unknown
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   packetservicestate: 0002 - attached
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   uplinkspeed: 1497000000
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   downlinkspeed: 3951000000
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425): mbim[3425] Connect to network
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   sessionid: 0
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   activationstate: 0001 - activated
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   voicecallstate: 0000 - none
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   nwerror: 0000 - unknown
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   iptype: 0001 - ipv4
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425): mbim[3425] Connected
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425): mbim[3425] Setting up wwan0
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   ipv4address: 10.299.128.52/30
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   ipv4gateway: 10.299.128.51
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   ipv4mtu: 1500
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   ipv4dnsserver: 10.71.12.210
Fri Oct 31 16:33:05 2025 daemon.notice netifd: 5G_MODEM (3425):   ipv4dnsserver: 10.71.12.211

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