Quectel RM520N-GL cannot start on ubuntu

Hello, i am trying to run RM520N-GLAP pcie only module on ubuntu 20.04. Installed latest drivers without any problems but modem cannot start. I tested that module on windows 10 and there was no problems, module worked fine.

On ubuntu i can see this module as 01:00.0 Unassigned class [ff00]: Qualcomm Device 0308
I cannot see any modem in modemmanager.

wan@wan-FUTRO-S940:~/Quectel_Linux_PCIE_MHI_Driver_V1.3.7/pcie_mhi$ lsmod | grep mhi
pcie_mhi              204800  0
mhi_net                16384  0
mhi_wwan_ctrl          20480  0
wwan                   20480  1 mhi_wwan_ctrl
mhi_pci_generic        24576  0
mhi                    98304  3 mhi_wwan_ctrl,mhi_net,mhi_pci_generic


wan@wan-FUTRO-S940:~/Quectel_Linux_PCIE_MHI_Driver_V1.3.7/pcie_mhi$ dmesg | grep mhi
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.15.0-122-generic root=UUID=f8cc7d7a-1cae-4b55-9a21-cc2552d38f9a ro ... mhi_timeout=60 quiet splash pcie_aspm=off vt.handoff=7
[    0.046570] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.15.0-122-generic root=UUID=f8cc7d7a-1cae-4b55-9a21-cc2552d38f9a ro ... mhi_timeout=60 quiet splash pcie_aspm=off vt.handoff=7
[    0.046882] Unknown kernel command line parameters "splash BOOT_IMAGE=/boot/vmlinuz-5.15.0-122-generic mhi_timeout=60", will be passed to user space.
[    0.960604]     mhi_timeout=60
[    1.198272] mhi-pci-generic 0000:01:00.0: BAR 0: assigned [mem 0xa1201000-0xa1201fff 64bit]
[    1.198297] mhi-pci-generic 0000:01:00.0: enabling device (0000 -> 0002)
[    1.198381] mhi-pci-generic 0000:01:00.0: using shared MSI
[    1.199606] mhi mhi0: Requested to power ON
[    1.199732] mhi mhi0: Power on setup success
[    1.520896] mhi mhi0: Wait for device to enter SBL or Mission mode
[   25.504897] mhi mhi0: Did not enter M0 state, MHI state: M3, PM state: M3->M0
[   25.504911] mhi_wwan_ctrl: probe of mhi0_DIAG failed with error -5
[   25.505048] mhi-pci-generic 0000:01:00.0: failed to resume device: -5
[   25.505191] mhi-pci-generic 0000:01:00.0: device recovery started
[   25.505248] mhi_wwan_ctrl: probe of mhi0_MBIM failed with error -5
[   25.505279] mhi_wwan_ctrl: probe of mhi0_QMI failed with error -5
[   25.505956] mhi mhi0: Requested to power ON
[   25.506115] mhi mhi0: Power on setup success
[   26.947570] pcie_mhi: loading out-of-tree module taints kernel.
[   26.947739] pcie_mhi: module verification failed: signature and/or required key missing - tainting kernel
[   26.954676] mhi_init Quectel_Linux_PCIE_MHI_Driver_V1.3.7
[   33.697243] mhi-pci-generic 0000:01:00.0: reset
[   35.832982] mhi mhi0: Requested to power ON
[   47.380707] mhi mhi0: Failed to reset MHI due to syserr state
[   47.380717] mhi-pci-generic 0000:01:00.0: failed to power up MHI controller

1 Like

Maybe you can remove the mhi-pci-generic from the OS.

Its better now, I can see new interfaces rmnet_mhi0 and rmnet_mhi0.1, but still cannot see any modems and make connection.

wan@wan-FUTRO-S940:~$ dmesg | grep mhi
[   18.936831] pcie_mhi: loading out-of-tree module taints kernel.
[   18.936994] pcie_mhi: module verification failed: signature and/or required key missing - tainting kernel
[   18.942407] mhi_init Quectel_Linux_PCIE_MHI_Driver_V1.3.7
[   18.942504] mhi_pci_probe pci_dev->name = 0000:01:00.0, domain=0, bus=1, slot=0, vendor=17CB, device=0308
[   18.943250] [I][mhi0][mhi_arch_set_bus_request] Setting bus request to index 1
[   18.943262] mhi_q 0000:01:00.0: BAR 0: assigned [mem 0xa1201000-0xa1201fff 64bit]
[   18.943284] mhi_q 0000:01:00.0: enabling device (0000 -> 0002)
[   18.943378] [I][mhi0][mhi_init_pci_dev] msi_required = 4, msi_allocated = 1, msi_irq = 129
[   18.943389] [I][mhi0][mhi_power_up] dev_state:RESET
[   18.943391] [I][mhi0][mhi_async_power_up] Requested to power on
[   18.943424] [I][mhi0][mhi_alloc_coherent] size = 98304, dma_handle = 106dc0000
[   18.943427] [I][mhi0][mhi_init_dev_ctxt] mhi_ctxt->ctrl_seg = 000000000d7f43de
[   18.945225] [I][mhi0][mhi_async_power_up] dev_state:RESET ee:PASS THRU
[   18.945252] [I][mhi0][mhi_async_power_up] Power on setup success
[   18.945268] [I][mhi0][mhi_pci_show_link] LnkCap:	Speed 8GT/s, Width x2
[   18.945270] [I][mhi0][mhi_pci_show_link] LnkSta:	Speed 5GT/s, Width x1
[   18.945272] [I][mhi0][mhi_pci_probe] Return successful
[   18.960804] [I][mhi0][mhi_pm_st_worker] Transition to state:READY
[   18.960816] [I][mhi0][mhi_pm_st_worker] INVALID_EE -> AMSS
[   18.960818] [I][mhi0][mhi_ready_state_transition] Waiting to enter READY state
[   18.960822] [I][mhi0][mhi_ready_state_transition] Device in READY State
[   18.960824] [I][mhi0][mhi_tryset_pm_state] Transition to pm state from:POR to:POR
[   18.960827] [I][mhi0][mhi_init_mmio] Initializing MMIO
[   18.960831] [I][mhi0][mhi_init_mmio] CHDBOFF:0x300
[   18.960836] [I][mhi0][mhi_init_mmio] ERDBOFF:0x700
[   18.960838] [I][mhi0][mhi_init_mmio] Programming all MMIO values.
[   19.037696] [I][mhi0][mhi_dump_tre] carl_ev evt_state_change mhistate=2
[   19.037704] [I][mhi0][mhi_process_ctrl_ev_ring] MHI state change event to state:M0
[   19.037707] [I][mhi0][mhi_pm_m0_transition] Entered With State:READY PM_STATE:POR
[   19.037709] [I][mhi0][mhi_tryset_pm_state] Transition to pm state from:POR to:M0
[   19.037720] [I][mhi0][mhi_dump_tre] carl_ev evt_ee_state execenv=2
[   19.037721] [I][mhi0][mhi_process_ctrl_ev_ring] MHI EE received event:AMSS
[   19.037730] [I][mhi0][mhi_pm_st_worker] Transition to state:MISSION MODE
[   19.037737] [I][mhi0][mhi_pm_st_worker] INVALID_EE -> AMSS
[   19.037738] [I][mhi0][mhi_pm_mission_mode_transition] Processing Mission Mode Transition
[   19.037746] [I][mhi0][mhi_init_timesync] TIME OFFS:0xa20
[   19.041676] [I][mhi0][mhi_pm_mission_mode_transition] Adding new devices
[   19.075222] [I][mhi0][mhi_dtr_probe] Enter for DTR control channel
[   19.075230] [I][mhi0][__mhi_prepare_channel] Entered: preparing channel:18
[   19.077207] [I][mhi0][mhi_dump_tre] carl_ev evt_cmd_comp code=1, type=33
[   19.077220] [I][mhi0][__mhi_prepare_channel] Chan:18 successfully moved to start state
[   19.077223] [I][mhi0][__mhi_prepare_channel] Entered: preparing channel:19
[   19.080059] [I][mhi0][mhi_dump_tre] carl_ev evt_cmd_comp code=1, type=33
[   19.080070] [I][mhi0][__mhi_prepare_channel] Chan:19 successfully moved to start state
[   19.080083] [I][mhi0][mhi_dtr_probe] Exit with ret:0
[   19.122009] [I][mhi_netdev_enable_iface] Prepare the channels for transfer
[   19.122058] [I][mhi0][__mhi_prepare_channel] Entered: preparing channel:100
[   19.128918] [I][mhi0][mhi_dump_tre] carl_ev evt_cmd_comp code=1, type=33
[   19.128933] [I][mhi0][__mhi_prepare_channel] Chan:100 successfully moved to start state
[   19.128936] [I][mhi0][__mhi_prepare_channel] Entered: preparing channel:101
[   19.136444] [I][mhi0][mhi_dump_tre] carl_ev evt_cmd_comp code=1, type=33
[   19.136461] [I][mhi0][__mhi_prepare_channel] Chan:101 successfully moved to start state
[   19.140129] [I][mhi_netdev_enable_iface] Exited.
[   19.140461] rmnet_vnd_register_device(rmnet_mhi0.1)=0
[   19.140495] [I][mhi0][mhi_pm_mission_mode_transition] Exit with ret:0
[  217.780951] [I][mhi_netdev_open] Opened net dev interface
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 4c:52:62:30:58:b5 brd ff:ff:ff:ff:ff:ff
    altname enp2s0
3: rmnet_mhi0: <NO-CARRIER,NOARP,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/none 
4: rmnet_mhi0.1: <NO-CARRIER,NOARP,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether 02:50:f4:00:00:01 brd ff:ff:ff:ff:ff:ff

$ sudo systemctl status ModemManager
â—Ź ModemManager.service - Modem Manager
     Loaded: loaded (/lib/systemd/system/ModemManager.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2024-10-10 09:20:34 CEST; 3min 36s ago
   Main PID: 681 (ModemManager)
      Tasks: 3 (limit: 9175)
     Memory: 7.2M
     CGroup: /system.slice/ModemManager.service
             └─681 /usr/sbin/ModemManager

paĹş 10 09:20:34 wan-FUTRO-S940 systemd[1]: Starting Modem Manager...
paĹş 10 09:20:34 wan-FUTRO-S940 ModemManager[681]: <info>  ModemManager (version 1.18.6) starting in system bus...
paĹş 10 09:20:34 wan-FUTRO-S940 systemd[1]: Started Modem Manager.
paĹş 10 09:20:37 wan-FUTRO-S940 ModemManager[681]: <info>  [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:13.0/0000:01:00.0': not supported by any plugin
paĹş 10 09:20:37 wan-FUTRO-S940 ModemManager[681]: <info>  [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:13.2/0000:02:00.0': not supported by any plugin

$ mmcli --list-modems
No modems were found

You could set up data connection with the Quectel ConnectManager.
Please use the quectel-CM.

Still having troubles:

wan@wan-FUTRO-S940:~/quectel-CM$ sudo ./quectel-CM -s internet /dev/mhi_QMI0
[10-11_09:10:17:359] QConnectManager_Linux_V1.6.1
[10-11_09:10:17:360] network interface '' or qmidev '' is not exist
[10-11_09:10:17:360] netcard driver = pcie_mhi, driver version = V1.3.7
[10-11_09:10:17:360] qmap_mode = 1, qmap_version = 9, qmap_size = 15360, muxid = 0x81, qmap_netcard = rmnet_mhi0.1
[10-11_09:10:17:360] Modem works in QMI mode
[10-11_09:10:17:387] cdc_wdm_fd = 7
[10-11_09:10:17:403] Get clientWDS = 14
[10-11_09:10:17:407] Get clientDMS = 1
[10-11_09:10:17:412] Get clientNAS = 3
[10-11_09:10:17:416] Get clientUIM = 1
[10-11_09:10:17:419] Get clientWDA = 1
[10-11_09:10:17:423] requestBaseBandVersion RM520NGLAPR01A01M4G
[10-11_09:10:17:425] qmap_settings.rx_urb_size = 15360
[10-11_09:10:17:425] qmap_settings.ul_data_aggregation_max_datagrams  = 11
[10-11_09:10:17:425] qmap_settings.ul_data_aggregation_max_size       = 8192
[10-11_09:10:17:426] qmap_settings.dl_minimum_padding                 = 0
[10-11_09:10:17:441] requestGetSIMStatus SIMStatus: SIM_READY
[10-11_09:10:17:445] requestGetProfile[1] internet//dev/mhi_QMI0//0/IPV4
[10-11_09:10:17:445] requestSetProfile[1] internet//dev/mhi_QMI0//0/IPV4
[10-11_09:10:17:445] no need to set skip the rest
[10-11_09:10:17:448] requestRegistrationState2 MCC: 260, MNC: 3, PS: Attached, DataCap: LTE
[10-11_09:10:17:451] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
[10-11_09:10:17:451] ifconfig rmnet_mhi0 down
[10-11_09:10:17:455] ifconfig rmnet_mhi0.1 0.0.0.0
SIOCSIFFLAGS: Network is down
[10-11_09:10:17:459] ifconfig rmnet_mhi0.1 down
[10-11_09:10:17:467] requestSetupDataCall QMUXResult = 0x1, QMUXError = 0xe
[10-11_09:10:17:467] call_end_reason is 1009
[10-11_09:10:17:468] call_end_reason_type is 6
[10-11_09:10:17:468] call_end_reason_verbose is 38
[10-11_09:10:17:468] try to requestSetupDataCall 5 second later
[10-11_09:10:22:475] requestSetupDataCall QMUXResult = 0x1, QMUXError = 0xe
[10-11_09:10:22:475] call_end_reason is 1009
[10-11_09:10:22:475] call_end_reason_type is 6
[10-11_09:10:22:475] call_end_reason_verbose is 38
[10-11_09:10:22:475] try to requestSetupDataCall 10 second later

call_end_reason_verbose is 38
means that QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_NETWORK_FAILURE.

Please check
AT+CGDCONT?
AT+CGACT?
AT+CEREG?
AT+CGREG?
AT+C5GREG?

AT+CGDCONT?
+CGDCONT: 1,"IP","internet","0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0
+CGDCONT: 2,"IPV4V6","ims","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0,,,,,,,,,""0
+CGDCONT: 3,"IPV4V6","SOS","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,1,,,,,,,,,""0
+CGDCONT: 4,"IPV4V6","VOWIFIORANGE","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0,,0
+CGDCONT: 5,"IPV4V6","","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0,,,,,,,,,"",,,0

OK
AT+CGACT?
+CGACT: 1,0
+CGACT: 2,1
+CGACT: 3,0
+CGACT: 4,0
+CGACT: 5,1
                                                                                
OK                                                                              
AT+CEREG?                                                                       
+CEREG: 0,1                                                                     
                                                                                
OK                                                                              
AT+CGREG?                                                                       
+CGREG: 0,0                                                                     
                                                                                
OK                                                                              
AT+C5GREG?                                                                      
+C5GREG: 0,0                                                                    
                                                                                
OK                                                                              



Just from the AT command, as I guess, we cannot enable the PDP#1.
Maybe you can try another SIM card or a correct APN.

APN is “internet”. SIM is also ok, i tried on windows 10 machine yesterday and it was working without any configuration.

Please try the AT command:

AT+QIACT=1
AT+QIACT?
AT+CGACT?

It is T-mobile and I guess that it support IPv6 only.

It’s not T-mobile, its Orange(from Poland). I found Orange APN should looks like this:
apn: internet
user: internet
password: internet

OK
AT+QIACT=1
ERROR
AT+QIACT?
OK
AT+CGACT?
+CGACT: 1,0
+CGACT: 2,1
+CGACT: 3,0
+CGACT: 4,0
+CGACT: 5,1

OK



As you see you cannot enable the PDP#1 with QIACT also.
You could try
1.Try it with IPV4V6.
Set the IP type to IPV4V6 for cid1 again.
2.Or try quectel-CM -s internet -n 5
It means that we would try the data call with cid 5.

MCC: 260, MNC: 3 is the PLMN for T-mobile.

It’s finally working.

quectel-CM -s internet -n 5

Thank You.