RM520NGLAP Module setup

I am working on trying to setup the RM520NGLAP-M20-SGASA module, but there is one problem I can’t wrap my head around.

More precisely, my system recognizes the modem well, I can see the modem via ModemManager and I can even see the connection after doing all the setup steps (I am following this guide). So everything seems fine - I can unlock my sim, connect to an APN, and signal quality is ok. DNS is assigned to the interface, etc. However, I still can’t ping (the las step in the guide) 8.8.8.8 nor the DNS address, it results in 100% packet loss. I’m not even sure if this is a problem of setting up the modem or something else and decided to ask here.

I’ve also tested the SIM card in my own phone, and there the APN is the same, and I can even go to Google in my browser and google there.

If it helps, the firmware version is RM520NGLAAR01A08M4G.

RM520NGLAP-M20-SGASA not working well with MM. You should use Quectel-CM.

Dear @kase
Please check the register status and PDP context.
AT+QENG=“servingcell”
AT+QIACT?
AT+CGDCONT?
AT+QCFG=“usbnet”

If I understand right, these are the commands to use with Quectel-CM, which I’m having problems with. When I launch Quectel-CM, it results in this:

[01-10_10:19:11:776] network interface '' or qmidev '' is not exist
[01-10_10:19:11:776] atdevice_detect failed
[01-10_10:19:11:776] qmidevice_detect failed

and nothing more happens. The Quectel-CM version is QConnectManager_Linux_V1.6.5

What is the Linux kernel version?
Could you show

lspci
and
lsusb

Kernel version is 6.8.0-51-generic

lspci:

00:00.0 Host bridge: Intel Corporation 12th Gen Core Processor Host Bridge/DRAM Registers (rev 02)
00:02.0 VGA compatible controller: Intel Corporation AlderLake-S GT1 (rev 0c)
00:08.0 System peripheral: Intel Corporation 12th Gen Core Processor Gaussian & Neural Accelerator (rev 02)
00:14.0 USB controller: Intel Corporation Alder Lake-S PCH USB 3.2 Gen 2x2 XHCI Controller (rev 11)
00:14.2 RAM memory: Intel Corporation Alder Lake-S PCH Shared SRAM (rev 11)
00:15.0 Serial bus controller: Intel Corporation Alder Lake-S PCH Serial IO I2C Controller #0 (rev 11)
00:15.1 Serial bus controller: Intel Corporation Alder Lake-S PCH Serial IO I2C Controller #1 (rev 11)
00:15.2 Serial bus controller: Intel Corporation Alder Lake-S PCH Serial IO I2C Controller #2 (rev 11)
00:15.3 Serial bus controller: Intel Corporation Alder Lake-S PCH Serial IO I2C Controller #3 (rev 11)
00:16.0 Communication controller: Intel Corporation Alder Lake-S PCH HECI Controller #1 (rev 11)
00:16.3 Serial controller: Intel Corporation Device 7aeb (rev 11)
00:17.0 SATA controller: Intel Corporation Alder Lake-S PCH SATA Controller [AHCI Mode] (rev 11)
00:19.0 Serial bus controller: Intel Corporation Alder Lake-S PCH Serial IO I2C Controller #4 (rev 11)
00:19.1 Serial bus controller: Intel Corporation Alder Lake-S PCH Serial IO I2C Controller #5 (rev 11)
00:1a.0 PCI bridge: Intel Corporation Alder Lake-S PCH PCI Express Root Port #25 (rev 11)
00:1a.1 PCI bridge: Intel Corporation Device 7ac9 (rev 11)
00:1a.2 PCI bridge: Intel Corporation Device 7aca (rev 11)
00:1a.3 PCI bridge: Intel Corporation Device 7acb (rev 11)
00:1c.0 PCI bridge: Intel Corporation Alder Lake-S PCH PCI Express Root Port #3 (rev 11)
00:1c.3 PCI bridge: Intel Corporation Device 7abb (rev 11)
00:1c.6 PCI bridge: Intel Corporation Device 7abe (rev 11)
00:1d.0 PCI bridge: Intel Corporation Alder Lake-S PCH PCI Express Root Port #9 (rev 11)
00:1d.2 PCI bridge: Intel Corporation Device 7ab2 (rev 11)
00:1d.4 PCI bridge: Intel Corporation Alder Lake-S PCH PCI Express Root Port #13 (rev 11)
00:1f.0 ISA bridge: Intel Corporation Device 7a88 (rev 11)
00:1f.3 Audio device: Intel Corporation Alder Lake-S HD Audio Controller (rev 11)
00:1f.4 SMBus: Intel Corporation Alder Lake-S PCH SMBus Controller (rev 11)
00:1f.5 Serial bus controller: Intel Corporation Alder Lake-S PCH SPI Controller (rev 11)
01:00.0 Ethernet controller: Intel Corporation Ethernet Controller I225-IT (rev 03)
02:00.0 Ethernet controller: Intel Corporation Ethernet Controller I225-IT (rev 03)
03:00.0 Ethernet controller: Intel Corporation Ethernet Controller I225-IT (rev 03)
04:00.0 Ethernet controller: Intel Corporation Ethernet Controller I225-IT (rev 03)
05:00.0 Ethernet controller: Intel Corporation Ethernet Controller I225-LM (rev 03)
06:00.0 Ethernet controller: Intel Corporation Ethernet Controller I225-IT (rev 03)
07:00.0 Network controller: Intel Corporation Wi-Fi 5(802.11ac) Wireless-AC 9x6x [Thunder Peak] (rev 29)
08:00.0 Unassigned class [ff00]: Qualcomm Technologies, Inc Device 0308
09:00.0 CANBUS: Device 1c29:1703 (rev 01)
0a:00.0 Non-Volatile memory controller: Transcend Information, Inc. NVMe PCIe SSD 240S/MTE710T (rev 03)

lsusb:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 17ef:6099 Lenovo Lenovo Traditional USB Keyboard
Bus 001 Device 003: ID 353f:a101 OnLogic K800 eMCU
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

It is recognized.
But it is 6.8.0-51-generic and the pcie_mhi_generic driver probed.
If you must try the quectel-CM, it is better to remove the pcie_mhi_generic and install the pcie_mhi driver.

Quectel_Linux_PCIE_MHI_Driver_V1.3.8.zip (137.6 KB)

When I try to insert the commands, I get this error:

[01-14_10:46:53:590] network interface '' or qmidev '' is not exist
[01-14_10:46:53:590] atdevice_detect failed
[01-14_10:46:53:590] qmidevice_detect failed
AT+QENG="servingcell"
AT+QENG=servingcell: command not found
[1]+  Done                    ./quectel-CM

What you need to do…

Alright, I managed to remove the mhi_pci_generic driver and the start the quectel CM via sudo ./quectel-CM&

and I got the following response:

[ main.c-0924: 03-07_15:55:38:462] QConnectManager_Linux_V1.6.5
[ device.c-0387: 03-07_15:55:38:462] network interface ‘’ or qmidev ‘’ is not exist
[ device.c-0628: 03-07_15:55:38:463] netcard driver = pcie_mhi, driver version = V1.3.8
[qmap_bridge_mode.c-0325: 03-07_15:55:38:463] qmap_mode = 1, qmap_version = 9, qmap_size = 15360, muxid = 0x81, qmap_netcard = rmnet_mhi0.1
[ main.c-0739: 03-07_15:55:38:463] Modem works in QMI mode
[ QmiWwanCM.c-0351: 03-07_15:55:38:470] cdc_wdm_fd = 7
[ QmiWwanCM.c-0177: 03-07_15:55:38:487] Get clientWDS = 14
[ QmiWwanCM.c-0178: 03-07_15:55:38:492] Get clientDMS = 1
[ QmiWwanCM.c-0179: 03-07_15:55:38:496] Get clientNAS = 3
[ QmiWwanCM.c-0183: 03-07_15:55:38:500] Get clientUIM = 2
[ QmiWwanCM.c-0185: 03-07_15:55:38:503] Get clientWDA = 1
[ QMIThread.c-2273: 03-07_15:55:38:507] requestBaseBandVersion RM520NGLAAR01A08M4G
[ QMIThread.c-0811: 03-07_15:55:38:510] qmap_settings.rx_urb_size = 15360
[ QMIThread.c-0820: 03-07_15:55:38:510] qmap_settings.ul_data_aggregation_max_datagrams = 11
[ QMIThread.c-0826: 03-07_15:55:38:510] qmap_settings.ul_data_aggregation_max_size = 8192
[ QMIThread.c-0832: 03-07_15:55:38:510] qmap_settings.dl_minimum_padding = 0
[ QMIThread.c-1027: 03-07_15:55:38:526] requestGetSIMStatus SIMStatus: SIM_PIN
[ QMIThread.c-2153: 03-07_15:55:38:535] requestGetProfile[pdp:1 index:1] ///0/IPV4V6
[ QMIThread.c-1692: 03-07_15:55:38:540] requestRegistrationState2 MCC: 238, MNC: 6, PS: Detached, DataCap: UNKNOW
[ QMIThread.c-1692: 03-07_15:55:38:544] requestRegistrationState2 MCC: 238, MNC: 6, PS: Detached, DataCap: UNKNOW
[ QMIThread.c-1827: 03-07_15:55:38:550] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
[ udhcpc.c-0034: 03-07_15:55:38:550] ip link set dev rmnet_mhi0 down
[ udhcpc.c-0034: 03-07_15:55:38:552] ip addr flush dev rmnet_mhi0.1
[ udhcpc.c-0034: 03-07_15:55:38:553] ip link set dev rmnet_mhi0.1 down
[ QMIThread.c-1692: 03-07_15:55:53:564] requestRegistrationState2 MCC: 238, MNC: 6, PS: Detached, DataCap: UNKNOW
[ QMIThread.c-1692: 03-07_15:56:08:576] requestRegistrationState2 MCC: 238, MNC: 6, PS: Detached, DataCap: UNKNOW
[ QMIThread.c-1692: 03-07_15:56:23:596] requestRegistrationState2 MCC: 238, MNC: 6, PS: Detached, DataCap: UNKNOW

when I tried to paste these commands:>

AT+QENG=“servingcell”
AT+QIACT?
AT+CGDCONT?
AT+QCFG=“usbnet”

the repsonse was:

AT+QENG=“servingcell”: command not found
AT+QIACT?: command not found
AT+CGDCONT?: command not found
AT+QCFG=“usbnet”: command not found

From the quectel-cm output it looks like the module isn’t connected to the network.

These are AT commands and must be sent to the serial AT port. For the GLAP it would be mhi_DUN. You can find available serial ports by using ls /dev. Baud rate is 115200.

I think the reason behind the

[ QMIThread.c-1692: 03-07_15:55:38:540] requestRegistrationState2 MCC: 238, MNC: 6, PS: Detached, DataCap: UNKNOW

error is that I disabled the mhi_pci_generic driver. After disabling that mmcli -S and mmcli -L gave no results. However, I’m not sure what’s the workaround with that

Have you set the PIN Code for the SIM card?

Yes, I connected it also now. sudo quectel-CM& -p #### outputs the following now:

[         main.c-0924: 03-10_10:06:46:892] QConnectManager_Linux_V1.6.5
[       device.c-0387: 03-10_10:06:46:892] network interface '' or qmidev '' is not exist
[       device.c-0628: 03-10_10:06:46:892] netcard driver = pcie_mhi, driver version = V1.3.8
[qmap_bridge_mode.c-0325: 03-10_10:06:46:892] qmap_mode = 1, qmap_version = 9, qmap_size = 15360, muxid = 0x81, qmap_netcard = rmnet_mhi0.1
[         main.c-0739: 03-10_10:06:46:892] Modem works in QMI mode
[    QmiWwanCM.c-0351: 03-10_10:06:46:900] cdc_wdm_fd = 7
[    QmiWwanCM.c-0177: 03-10_10:06:46:914] Get clientWDS = 14
[    QmiWwanCM.c-0178: 03-10_10:06:46:919] Get clientDMS = 1
[    QmiWwanCM.c-0179: 03-10_10:06:46:925] Get clientNAS = 3
[    QmiWwanCM.c-0183: 03-10_10:06:46:929] Get clientUIM = 2
[    QmiWwanCM.c-0185: 03-10_10:06:46:933] Get clientWDA = 1
[    QMIThread.c-2273: 03-10_10:06:46:938] requestBaseBandVersion RM520NGLAAR01A08M4G
[    QMIThread.c-0811: 03-10_10:06:46:941] qmap_settings.rx_urb_size = 15360
[    QMIThread.c-0820: 03-10_10:06:46:941] qmap_settings.ul_data_aggregation_max_datagrams  = 11
[    QMIThread.c-0826: 03-10_10:06:46:941] qmap_settings.ul_data_aggregation_max_size       = 8192
[    QMIThread.c-0832: 03-10_10:06:46:941] qmap_settings.dl_minimum_padding                 = 0
[    QMIThread.c-1027: 03-10_10:06:46:961] requestGetSIMStatus SIMStatus: SIM_PIN
[    QMIThread.c-2153: 03-10_10:06:47:056] requestGetProfile[pdp:1 index:1] data.tre.dk//dev/mhi_QMI0//0/IPV4
[    QMIThread.c-1692: 03-10_10:06:47:060] requestRegistrationState2 MCC: 238, MNC: 6, PS: Detached, DataCap: UNKNOW
[    QMIThread.c-1692: 03-10_10:06:47:064] requestRegistrationState2 MCC: 238, MNC: 6, PS: Detached, DataCap: UNKNOW
[    QMIThread.c-1827: 03-10_10:06:47:067] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
[       udhcpc.c-0034: 03-10_10:06:47:067] ip link set dev rmnet_mhi0 down
[       udhcpc.c-0034: 03-10_10:06:47:069] ip addr flush dev rmnet_mhi0.1
[       udhcpc.c-0034: 03-10_10:06:47:070] ip link set dev rmnet_mhi0.1 down
[    QMIThread.c-1692: 03-10_10:06:47:974] requestRegistrationState2 MCC: 238, MNC: 6, PS: Detached, DataCap: UNKNOW
[    QMIThread.c-1692: 03-10_10:06:49:599] requestRegistrationState2 MCC: 238, MNC: 6, PS: Attached, DataCap: 5G_NSA
[    QMIThread.c-1875: 03-10_10:06:49:611] requestSetupDataCall WdsConnectionIPv4Handle: 0x17a687f0
[    QMIThread.c-1692: 03-10_10:06:49:621] requestRegistrationState2 MCC: 238, MNC: 6, PS: Attached, DataCap: 5G_NSA
[       udhcpc.c-0056: 03-10_10:06:49:629] change mtu 1500 -> 1460
[       udhcpc.c-0034: 03-10_10:06:49:629] ip link set dev rmnet_mhi0 up
[       udhcpc.c-0034: 03-10_10:06:49:632] ip link set dev rmnet_mhi0.1 up
[       udhcpc.c-0552: 03-10_10:06:49:634] No default.script found, it should be in '/usr/share/udhcpc/' or '/etc//udhcpc' depend on your udhcpc version!
[       udhcpc.c-0167: 03-10_10:06:49:634] busybox udhcpc -f -n -q -t 5 -i rmnet_mhi0.1
udhcpc: started, v1.30.1
udhcpc: sending discover
udhcpc: sending select for 10.168.178.96
udhcpc: lease of 10.168.178.96 obtained, lease time 7200
[       udhcpc.c-0034: 03-10_10:06:49:712] ip -4 address flush dev rmnet_mhi0.1
[       udhcpc.c-0034: 03-10_10:06:49:714] ip -4 address add 10.168.178.96/26 dev rmnet_mhi0.1
[       udhcpc.c-0034: 03-10_10:06:49:715] ip -4 route add default via 10.168.178.97 dev rmnet_mhi0.1

And the AT commands:

RDY

+CPIN: SIM PIN

+CFUN: 1

+CPIN: READY

+QUSIM: 1

+QIND: SMS DONE

+QIND: PB DONE
AT+QENG=“servingcell”
ERROR
AT+QIACT?
OK
AT+CGDCONT?
+CGDCONT: 1,"IP","data.tre.dk","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: 5,"IP","data.tre.dk","0.0.0.0",0,0,0,0,,,,,,,,,"",,,,0

OK
AT+QCFG=“usbnet”

From the log it should be working now.

Yes, thanks a lot! I can ping 8.8.8.8 now successfully.

I don’t understand, however, why does the ERROR occur here

AT+QENG=“servingcell”
ERROR

Are the quotation marks correct?

Yes, the problem was there. I get the following now:

AT+QENG="servingcell"
+QENG: "servingcell","NOCONN","LTE","FDD",238,06,FFFFFFFF,27,-1,3,3,3,FFFF,-99,-11,-69,12,0,-,-

Also, now that pinging works, I am trying to also access some websites through my browser but that is failing and I’m not quite sure, what is missing. I’ll paste the ifconfig, ip ro show and cat /etc/resolv.conf outputs as I found that I might need to check those outputs, but I can’t really interpret what am I missing there

rmnet_mhi0: flags=193<UP,RUNNING,NOARP>  mtu 1500
        inet6 fe80::a7d0:9565:7bd8:f9e4  prefixlen 64  scopeid 0x20<link>
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 9041  bytes 6851368 (6.8 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 24591  bytes 4523588 (4.5 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rmnet_mhi0.1: flags=193<UP,RUNNING,NOARP>  mtu 1460
        inet 10.134.62.170  netmask 255.255.255.252
        inet6 fe80::50:f4ff:fe00:1  prefixlen 64  scopeid 0x20<link>
        ether 02:50:f4:00:00:01  txqueuelen 1000  (Ethernet)
        RX packets 16713  bytes 6708577 (6.7 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 24591  bytes 4665428 (4.6 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

default via 10.134.62.169 dev rmnet_mhi0.1 
10.134.62.168/30 dev rmnet_mhi0.1 proto kernel scope link src 10.134.62.170 
169.254.0.0/16 dev docker0 scope link metric 1000 linkdown 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 
nameserver 127.0.0.53
options edns0 trust-ad
search tail1919cb.ts.net

@kase
If you do an ‘ip a’ what does the RM520N show up as ? Does it show as wwan#?
If you can ping 8.8.8.8 but cannot ping google.com you need to manually add dns numbers to your connection gui.
I always use the native ‘nm-connetion-editor’ in current Linux distros for conveinience.
So in connection editor add to the "dns servers’ line- 8.8.4.4,8.8.8.8
Can you explain what the two different rmnet_mhi0 & 0-1 are. are you trying to do vlan stuff on the RM520N interface? Kind of confused on this.

Have been going to purchase one the RM520N-GLAP models,if someone a\ctually has this variant working.
Sounds like you are about working now. Do you have this in an pcie to m.2 b-key internal adapter?
Good luck!