Connect the 5G module using a PCIE passthrough adapter board
The QuecPi Alpha single-board computer can be connected to a 5G network card via a PCIE interface using an adapter board. This article introduces the usage method of connecting the RG520NGL-AA PCIE network card with a PCIE adapter board.
PCIE module configuration
To use the PCIE passthrough adapter, the module needs to be set to the PCIE-EP mode. Only in this way can it communicate with the PCIE interface of the QuecPI Alpha. After installing the module driver, connect to the 5G module through the USB port of the adapter board and input the AT command to switch it to the PCIE-EP mode.
1.Use a TYPE-C To USB adapter to connect to a Windows computer (at this point, you may need to install the driver. The driver files are provided by the module technical support. Please select the appropriate driver file according to the corresponding module for installation.)
2.Use the serial port tool to open the AT port of the module.
You can check the ports in the device manager. The "Quectel USB AT Port (COM***)" port will appear.
AT+QCFG="data_interface",1,0
AT+QCFG="pcie/mode",0
AT+QCFG="usbnet",2
AT+CFUN=1,1
After executing the instructions, unplug the USB port on the PC and re-power on the QuecPI. Then, using the following command through the shell interface, check whether the device is properly recognized and connected.
root@qcm6490-idp:~# lspci
0000:00:00.0 PCI bridge: Qualcomm Device 010b
0000:01:00.0 Ethernet controller: Device 1f0a:6801 (rev 01)
0001:00:00.0 PCI bridge: Qualcomm Device 010b
0001:01:00.0 Unassigned class [ff00]: Qualcomm Device 0308
root@qcm6490-idp:~# ls /dev/mhi*
/dev/mhi_BHI /dev/mhi_DIAG /dev/mhi_DUN /dev/mhi_LOOPBACK /dev/mhi_QMI0
If all the devices are recognized, then the dialing operation can be carried out normally.
dial-up
To perform dial-up internet access using the quectel-CM tool, first connect the antenna to the 5G module and insert the SIM card to ensure a stable connection. Avoid attempting to access the internet if the signal is weak.
After confirming there are no errors, directly run the quectel-CM command in the background to make the call.
root@qcm6490-idp:~# quectel-CM &
[2] 1303
root@qcm6490-idp:~# [01-01_00:07:55:168] QConnectManager_Linux_V1.6.7
[01-01_00:07:55:179] network interface '' or qmidev '' is not exist
[01-01_00:07:55:179] netcard driver = pcie_mhi, driver version = V1.3.7
[01-01_00:07:55:179] qmap_mode = 1, qmap_version = 9, qmap_size = 15360, muxid = 0x81, qmap_netcard = rmnet_mhi0.1
[01-01_00:07:55:179] Modem works in QMI mode
[01-01_00:07:55:193] /proc/1273/fd/7 -> /dev/mhi_QMI0
[01-01_00:07:55:193] /proc/1273/exe -> /usr/bin/quectel-CM
[01-01_00:07:55:193] requestDeactivateDefaultPDP WdsConnectionIPv4Handle
[01-01_00:07:55:424] ip link set dev rmnet_mhi0 down
[01-01_00:07:55:431] ip addr flush dev rmnet_mhi0.1
[01-01_00:07:55:436] ip link set dev rmnet_mhi0.1 down
[01-01_00:07:55:457] QmiWwanThread exit
[01-01_00:07:55:459] qmi_main exit
[01-01_00:07:57:196] cdc_wdm_fd = 7
[01-01_00:07:57:208] Get clientWDS = 15
[01-01_00:07:57:212] Get clientDMS = 1
[01-01_00:07:57:215] Get clientNAS = 4
[01-01_00:07:57:219] Get clientUIM = 3
[01-01_00:07:57:224] Get clientWDA = 1
[01-01_00:07:57:229] requestBaseBandVersion RM520NGLABR03A02M8G
[01-01_00:07:57:232] qmap_settings.rx_urb_size = 15360
[01-01_00:07:57:233] qmap_settings.ul_data_aggregation_max_datagrams = 11
[01-01_00:07:57:233] qmap_settings.ul_data_aggregation_max_size = 8192
[01-01_00:07:57:233] qmap_settings.dl_minimum_padding = 0
[01-01_00:07:57:248] requestGetSIMStatus SIMStatus: SIM_READY
[01-01_00:07:57:257] requestGetProfile[pdp:1 index:1] ctnet///0/IPV4V6
[01-01_00:07:57:261] requestRegistrationState2 MCC: 460, MNC: 11, PS: Attached, DataCap: 5G_SA
[01-01_00:07:57:265] requestQueryDataCall IPv4ConnectionStatus: DISCONNECTED
[01-01_00:07:57:265] ip link set dev rmnet_mhi0 down
[01-01_00:07:57:272] ip addr flush dev rmnet_mhi0.1
[01-01_00:07:57:277] ip link set dev rmnet_mhi0.1 down
[01-01_00:07:57:768] requestSetupDataCall WdsConnectionIPv4Handle: 0xe27891d0
[01-01_00:07:57:783] ip link set dev rmnet_mhi0 up
[ 473.062494][ T1311] [I][mhi_netdev_open] Opened net dev interface
[01-01_00:07:57:797] ip link set dev rmnet_mhi0.1 up
[01-01_00:07:57:803] busybox udhcpc -f -n -q -t 5 -i rmnet_mhi0.1
udhcpc: started, v1.35.0
udhcpc: broadcasting discover
udhcpc: broadcasting select for 100.98.134.67, server 100.98.134.68
udhcpc: lease of 100.98.134.67 obtained from 100.98.134.68, lease time 7200
[01-01_00:07:57:883] /etc/udhcpc.d/50default: Adding DNS 202.102.213.68
[01-01_00:07:57:883] /etc/udhcpc.d/50default: Adding DNS 61.132.163.68
When the bottom udhcpc module obtains the IP address, it indicates that it has successfully acquired the IP address allocated by the base station and is now capable of accessing the internet.
Use the ifconfig and ping commands to verify the network:
root@qcm6490-idp:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:55:7B:B5:7D:F7
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:166
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:50 errors:0 dropped:0 overruns:0 frame:0
TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4632 (4.5 KiB) TX bytes:4632 (4.5 KiB)
p2p0 Link encap:Ethernet HWaddr 02:03:7F:D6:00:01
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
rmnet_mhi0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet6 addr: fe80::6921:e40e:336d:a80e/64 Scope:Link
UP RUNNING NOARP MTU:1500 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:0
TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4464 (4.3 KiB) TX bytes:5204 (5.0 KiB)
rmnet_mhi0.1 Link encap:Ethernet HWaddr 02:50:F4:00:00:01
inet addr:100.98.134.67 Mask:255.255.255.248
inet6 addr: fe80::50:f4ff:fe00:1/64 Scope:Link
UP RUNNING NOARP MTU:1500 Metric:1
RX packets:14 errors:0 dropped:0 overruns:0 frame:0
TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4330 (4.2 KiB) TX bytes:5334 (5.2 KiB)
wlan0 Link encap:Ethernet HWaddr 00:03:7F:50:00:01
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root@qcm6490-idp:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=113 time=5006.075 ms
64 bytes from 8.8.8.8: seq=5 ttl=113 time=485.806 ms
64 bytes from 8.8.8.8: seq=6 ttl=113 time=190.026 ms
64 bytes from 8.8.8.8: seq=13 ttl=113 time=628.962 ms
64 bytes from 8.8.8.8: seq=14 ttl=113 time=542.605 ms
64 bytes from 8.8.8.8: seq=15 ttl=113 time=585.632 ms
64 bytes from 8.8.8.8: seq=16 ttl=113 time=796.018 ms
64 bytes from 8.8.8.8: seq=17 ttl=113 time=95.139 ms
64 bytes from 8.8.8.8: seq=18 ttl=113 time=837.369 ms
64 bytes from 8.8.8.8: seq=19 ttl=113 time=41.186 ms