From Waveshare Wiki
(Redirected from RM502Q-AE 5G HAT)
Jump to: navigation, search
M.2 TO 4G/5G HAT
With RM500Q-GL/RM500Q-AE/RM502Q-AE
With 5G Module and Case



To avoid driver abnormality, please do not use RNDIS or ECM mode in Windows system; RM5XX modules use MBIM mode in Windows system and RNDIS or ECM mode in Linux system.


  • Integrates extensive network protocols, with multi drivers and software support, compatible with different OS including Windows / Linux / Android.
  • USB 3.1 port (USB 2.0 compatible) for connecting to PC, Raspberry Pi, or Jetson Nano host board to enable high-speed 5G communication.
  • Standard M.2 B KEY slot, compatible with different 5G modules: RM500U-CN / RM500Q-GL / RM500Q-AE / RM502Q-AE series.
  • Onboard UART, PWR, and RST control pin, built-in voltage level translator, enabled via DIP switch, for use with hosts like Raspberry Pi or Arduino.
  • Onboard USB-C connector, enabled via a switch, for connecting the standalone power supply for the module, allows more loads, a stable and flexible power supply.
  • Onboard power supply on/off switch, reset button, and LED indicator, easy to turn on/off the module or monitor the operating status.
  • 2 x SIM card slot, dual card single standby, switchable via AT command. (Some 4G/5G modules do not support dual sim cards, depending on the actual supporting modules.)
  • High-efficiency power supply circuit, up to 3A output current.

Version Options

This product is available with an optional 5G module and also with the optional case.
M.2 TO 4G-5G HAT version01.png
M.2 TO 4G-5G HAT version02.png

Selection Guide

5G Sub-6 RM500U-CNV RM500Q-GL 5G HAT RM502Q-AE 5G HAT RM520N-GL RM530N-GL
Picture RM500U-CN-5G-HAT-details-17-1.jpg RM500U-CN-5G-HAT-details-17-3.jpg RM500U-CN-5G-HAT-details-17-5.jpg RM520N-GL-details-2.jpg RM530N-GL-details-2.jpg
5G Standard 3GPP R15 3GPP R16
5G Chip UNISOC Qualcomm
5G Sub-6 GHz Sub-6 GHz & mmWave
Region/Operator China, EMEA, Asia-Pacific except Americas except China Global
Operating Temperature -30°C ~ +75°C
Extension Temperature -40°C ~ +85°C
Module Size 30.0 × 52.0 × 2.3 (mm)
Module Weight 8.8g 8.7g 8.8g
Power Supply 3.3~4.4V, Typ. 3.7V 3.135~4.4V, Typ. 3.7V
Power Consumption 78μA @ shutdown;

5.1mA @ hibernate;
57mA @ USB 2.0, idle;
71mA @ USB 3.0, idle

70μA @ shutdown;

4.0mA @ hibernate;
32mA @ USB 2.0, idle;
54mA @ USB 3.0, idle

80μA @ shutdown;

4.2mA @ hibernate;
39mA @ USB 2.0, idle;
54.5mA @ USB 3.0, idle

195μA @ shutdown;

4.7mA @ hibernate;
41mA @ USB 2.0, idle;
60mA @ USB 3.0, idle

173μA @ shutdown;

5.1mA @ hibernate;
51mA @ USB 2.0, idle;
69mA @ USB 3.0, idle

Frequency Band
5G 5G NR - n257, n258, n260, n261
5G NR NSA n41, n78, n79 n41, n77, n78, n79 n1, n2, n3, n5, n7, n8, n12, n20, n25, n28, n38, n40, n41, n48, n66, n71, n77, n78, n79 n1, n2, n3, n5, n7, n8, n12, n13, n14, n18, n20, n25, n26, n28, n29, n30, n38, n40, n41, n48, n66, n70, n71, n75, n76, n77, n78, n79
5G NR SA n1, n2, n3, n5, n8, n28, n41, n77, n78, n79 n1, n2, n3, n5, n7, n8, n12, n20, n25, n28, n38, n40, n41, n48, n66, n71, n77, n78, n79 n1, n2, n3, n5, n7, n8, n12, n13, n14, n18, n20, n25, n26, n28, n29, n30, n38, n40, n41, n48, n66, n70, n71, n75, n76, n77, n78, n79
LTE LTE-FDD B1, B3, B5, B8 B1, B2, B3, B4, B5, B7, B8, B12, B13, B14, B17, B18, B19, B20, B25, B26, B28, B29, B30, B32, B66, B71
LTE-TDD B34, B38, B39, B40, B41 B34, B38, B39, B40, B41, B42, B43, B48
LAA - B46
UMTS WCDMA B1, B5, B8 B1, B2, B3, B4, B5, B6, B8, B19 B1, B2, B4, B5, B8, B19
GNSS - GPS / GLONASS / BeiDou(Compass) / Galileo / QZSS (only RM520N-GL and RM530N-GL support)
Data Rate
5G mmWave - DL 4.0Gbps;
UL 1.4Gbps
5G SA Sub-6 DL 2Gbps;
UL 1Gbps
DL 2.1Gbps;
UL 900Mbps
DL 4.2Gbps;
UL 450Mbps
DL 2.4Gbps;
UL 900Mbps
5G NSA Sub-6 DL 2.2Gbps;
UL 575Mbps
DL 2.5Gbps;
UL 600/650Mbps
DL 5Gbps;
UL 650Mbps
DL 3.4Gbps;
UL 550Mbps
LTE DL 600Mbps;
UL 150Mbps
DL 1.0Gbps;
UL 200Mbps
DL 2Gbps;
UL 200Mbps
DL 1.6Gbps;
UL 200Mbps
UMTS DL 42.2Mbps;
UL 11Mbps
DL 42Mbps;
UL 5.76Mbps
Quectel_RM500Q-GL_5G_Specification :[Datasheets 1]
Quectel_RM500Q-AE_5G_Specification :[Datasheets 2]
Quectel_RM502Q-AE_5G_Specification :[Datasheets 3]

What's On Board


Number Name Description
Raspberry Pi GPIO Header Easily connect to Raspberry Pi
Switch Enable the corresponding pin
M.2 Interface Compatible with RM500U-CN / RM500Q-CN / RM500Q-GL /RM50XQ-AE and other series of 5G modules
SIM Card Holder Onboard two SIM card slots, dual card single standby. The default SIM1 card slot works, SIM2 is on the back, requires module support and must be switched through AT commands
USB 3.1 Connector Backward compatible with USB 2.0, can be used to connect to PC/Raspberry Pi/Jetson Nano, etc.
USB Type-C Connector 5V 3A input; stable and flexible power supply
Audio Port SIM82XX series support audio function, RM50XX series do not support this audio function
Antenna Connector Onboard four-way antenna, strong signal
Reset Switch One-key reset
Power Switch To facilitate the power supply mode of the control module:

——If set to USB, the module will provide power through the "⑤.USB3.1 interface";
——If set to EXT PWR, the module will provide power through the "⑥.USB Type-C interface" external power supply

Cooling Fan Cool down the Raspberry Pi and 5G module at the same time
Indicator Check the module running status anytime, anywhere


Number Name Description
Cooling Fan Simultaneously cooling Raspberry Pi and 5G modules
SIM Card Slot 2 Switchable via AT command (module is required)
Module Setting Switch Switch A to ON for SIM7600X / A7906X / IM7906X / SIM7912X series 4G M.2 module;
Switch B to ON, for SIM8202X / SIM8200EA / SIM8262X series 5G M.2 module;
Switch C to ON, for RM50X / RM520N-GL / EM06X series 5G / LTE-A M.2 module
USB Interface Pad USB 2.0 interface pad
NAU8810X Audio Chip For SIMN7600X / SIM8XXX series module, does support RM5XX and EM06XX series module
Fan Header 5V power supply for cooling fan

Pinout Definition

After connecting to Raspberry Pi, these pins (TX, RX, D4 and D6) can be connected or not through the DIP switch:

4G/5G modules function testing

Category 4G/5G Module Network Communication GNSS Positioning Voice calls through
Earphone Port
Dual SIMs UART Interface External Power Supply?
5G SIM8202G-M2 5G/4G/3G Support Support Support Support Optional, but recommended
5G SIM8200EA-M2 5G/4G/3G Support Support Support Support Optional, but recommended
5G RM500U-CN 5G/4G/3G NOT Support NOT Support Support Support Recommended
5G RM500Q-GL 5G/4G/3G Support NOT Support Support NOT Support Recommended
5G RM500Q-AE 5G/4G/3G Support NOT Support NOT Support NOT Support Recommended
5G RM502Q-AE 5G/4G/3G Support NOT Support NOT Support NOT Support Recommended
LTE-A EM06-E LTE-A/4G/3G NOT Support NOT Support NOT Support NOT Support Optional
LTE-A A7906E LTE-A/4G/3G NOT Support NOT Support NOT Support NOT Support Optional
4G SIM7600G-H-M2 4G/3G/2G Support Support NOT Support Support Optional

4G/5G Module Compatibility

If you need to use the M.2 TO 4G/5G HAT for other 4G/5G modules, you can refer to the M.2 connection diagram below, check whether there is any pin conflict, and then connect to test:

Working With Windows

Hardware Preparation

  • In addition to the items in the package,
  • you need to prepare the following items:
* A 5G SIM card (no downtime and 5G enabled);
* A computer with a Windows operating system (Such as Windows 10)
* A headphone cable with a microphone (optional);

Hardware Connection

Connect the 5G HAT with a usb3.0 cable, and connect an external 5V power supply to the Type-C power supply port of the 5G HAT, as shown in the figure:

Install drivers

  • After connecting the 5G HAT to the computer through a double-ended usb3.0 data cable, there will be a series of devices without drivers installed on other devices:


  • Download the driver to your computer and unzip the compressed package.
  • Enter the RM50X_Driver directory.
  • Click setup.exe to install the driver. After the installation is complete, the device manager will generate the following devices:


RM50XQ-Driver :[Software 1]

Common AT Commands

EM25X, EM06E and RM50X series 4G/5G module support AT command control, some basic AT commands are shown in the table below:

RM500U AT LOG.png
Command Description Return Value
AT AT test command OK
ATE ATE1 sets echo
ATE0 turns off echo
AT+CGMI Query module manufacture OK
AT+CGMM Query module model OK
AT+CGSN Query product serial number OK
AT+CSUB Query module version and chip OK
AT+CGMR Query the firmware version serial number OK
AT+IPR? Set the module hardware serial port baud rate +IPREX:
AT+CFUN=1,1 Reset module OK
AT+QUIMSLOT? Query SIM card selection:
Return 1, select SIM card 1;
Return 2, select SIM card 2
AT+CPIN? Query the status of the SIM card and return READY, indicating that the SIM card can be recognized normally +CPIN: READY
AT+COPS? Query the current operator, the operator information will be returned after normal networking +COPS:
AT+C5GREG? Query 5G network registration status +C5GREG:
AT+QENG="servingcell" Query UE system information
AT+CNMP Network mode selection command:
"nr5g_band" : 5G NR
"lte_band":LTE only
"gw_band":WCDMA only
... ....
Quectel_RG50xQ_RM5xxQ_Series_AT_Commands_Manual :[Datasheets 4]
SSCom Serial Assistant Tool: [Software 2]

SIM Card Selection

Dual SIM Card Switching

The 5G HAT has two SIM card slots onboard, a dual SIM card, and single standby, which can be switched and enabled by AT command.

  • SIM card 1 is selected by default, You can use the following command to query and confirm:
  • To switch SIM card 2, please use the following command:
  • Switch back to SIM card 1, please use the following command:
  • Check whether the corresponding card slot recognizes the SIM card:
RM500U-CN and RM500Q-GL support Dual SIMs, but RM500Q-AE and RM502Q-AE modules do not support dual SIM cards.

Network Speed Test

RM50XQ Network Speed Test
  • Install speed testing software, such as Internet speed manager and other speed testing software, you can choose to download the speed test at www.speedtest.cn/pc/download.

About the speed testing

As there will be many inconsistencies between actual and laboratory conditions that will result in 5G speeds that are not ideally stable at 100MBPS, there are the following.

  • Base station distance, the closer to the 5G base station the better the signal and the faster the speed.
  • Base station load, the fewer people using it the faster it will be, and the slower it will be during peak commuting periods.
  • Number of base stations: due to the spectrum, an equal amount of 4G coverage requires double the number of 5G base stations.
  • Operator: you need to confirm your 5G card, and whether the speed is limited, you can regularly ask the operator to reset your network.
  • Indoor is worse than outdoor: building penetration attenuation, and indoor bypass attenuation.

PS: The current number of base stations still does not have good coverage, and the speed measurement is not quite the same in different locations.

MBIM Dial-up Internet Access

  • Download and install the driver.
  • Open the RM50X AT port and send the following commands to dial up the Internet:
  • After dialing and restarting, the mobile network card appears on the computer network connection interface, and the dialing is successful.
RM50XQ-Driver :[Software 1]

GPS Positioning

Connect the passive GPS antenna to the GNSS antenna interface of the module(RM500Q-GL is ANT2;RM500Q-AE and RM502Q-AE is ANT3), and place the antenna outdoors facing the sky. Then send the AT command to turn on the GPS:

AT+QGPS=1        //Turn on GPS positioning
AT+QGPSLOC=0     //Get GPS positioning

Now open the NEMA port, you can get GPS data:

Quectel_RG50xQ_RM5xxQ_Series_GNSS_Application_Note: [Datasheets 5]

Working with Raspberry Pi

Hardware Connection

Connect the 5G HAT with a double-ended usb3.0 data cable, and connect an external 5V power supply to the Type-C power supply port of the 5G HAT, as shown in the figure:

Raspberry Pi Pi 4B Pi 3B/3B+ CM4-IO-BASE
USB adapter USB3.0 adapter USB2.0 adapter USB3.0 adapter
Connection M.2-To-4G-5G-HAT-CM4.jpg M.2-To-4G-5G-HAT-Pi3B.jpg M.2-To-4G-5G-HAT-CM4.jpg
It is recommended to connect an external 5V power supply at the arrow.

If it is used for PI4B, there is a matching case, and the installation diagram is as follows:

The use of Raspberry Pi OS

This configuration is only needed for the first time.

Please download the newest Raspberry Pi OS, All the settings are based on Kernel 5.5, if you use the old version, please update first. Make sure your Kernel version is up-to-date, or else you may face issues with the driver.

5G ECM Mode Dial-up

Step 1. Uninstall Modem Manager and Network Manager

Open a terminal and run the following commands to uninstall Modem Manager and Network Manager:

sudo apt purge modemmanager -y
sudo apt purge network-manager -y

Step 2. Test 5G Module

  • Driver Testing:
    Make sure the option USB-serial driver is properly loaded to the module interfaces. Check it with the usb-devices command.
pi@raspberrypi:~ $ usb-devices
T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=5000 MxCh= 0
D:  Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
P:  Vendor=2c7c ProdID=0800 Rev=04.14
S:  Manufacturer=Quectel
S:  Product=RM502Q-AE
S:  SerialNumber=377628d2
C:  #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=896mA
I:  If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
I:  If#=0x1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
  • Execute ls /dev/ttyUSB*, check if ttyUSB0~ttyUSB4 are recognized correctly.
  • Testing with AT command:
sudo apt-get install minicom
sudo minicom -D /dev/ttyUSB2
Welcome to minicom 2.7.1

Compiled on Aug 13 2017, 15:25:34.
Port /dev/ttyUSB2

Press CTRL-A Z for help on special keys


Step 3. Networking Setup with AT Commands


Wait for the modem to boot again. It may take 30 seconds. Once the modem reboots, the minicom will be activated again.

After the reboot, open a new Linux terminal and check for usbX in the network interface using ifconfig or ipaddr commands.


  • After rebooting the module, the NET indicator is on, and you can use the following commands to check the network. (Optional)
  • Use the following commands to get the IP and set up the DNS:
sudo dhclient -v usb0
sudo apt-get install udhcpc
sudo udhcpc -i usb0
sudo route add -net usb0

Step 4. Test 5G Network

After dialing, the Raspberry Pi can see usb0 get the ip by the following command, enter the command ifconfig usb0 or ifconfig.

  • Now check the assigned IP address and test the connection.
ifconfig usb0
pi@raspberrypi:~ $ ifconfig usb0
usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet  netmask  broadcast
        inet6 fe80::8543:f6a0:e678:2e20  prefixlen 64  scopeid 0x20
        ether 4a:aa:f8:62:36:bb  txqueuelen 1000  (Ethernet)
        RX packets 73  bytes 5047 (4.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 100  bytes 15116 (14.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


 ping waveshare.com -I usb0 
pi@raspberrypi:~ $ ping waveshare.com -I usb0
PING waveshare.com ( from usb0: 56(84) bytes of data.
64 bytes from ( icmp_seq=1 ttl=52 time=87 ms
64 bytes from ( icmp_seq=2 ttl=52 time=82 ms
64 bytes from ( icmp_seq=3 ttl=52 time=92 ms
64 bytes from ( icmp_seq=4 ttl=52 time=73 ms
64 bytes from ( icmp_seq=5 ttl=52 time=75 ms


Check if the module detects SIM:

AT+CPIN? # Should return READY

Check if the module is registered to the network:

AT+CEREG? # Should return 0,1 or 0,5

Check if the APN is correct and has an IP: AT+CGCONTRDP?

AT+CGCONTRDP # Should return APN details and IP address.

5G Network Speed Test

In the Linux system, you can install speedtest_cli to test:

## Raspberry Pi OS
sudo apt install speedtest-cli
speedtest      # or use speedtest_cli


## OpenWRT
opkg update   
opkg install python3
opkg install python3-pip
pip install speedtest_cli 
speedtest      # or use speedtest_cli

Working with Jetson Nano

Hardware Connection

Connect the 5G HAT with a double-ended usb3.0 data cable, and connect an external 5V power supply to the Type-C power supply port of the 5G HAT, as shown in the figure:

Load USB Device Descriptor

In order to identify the module, the module's VID and PID information needs to be added to the file [kernel].

  • View VID and PID of RM500U.

Added VID sum PID.

sudo apt-get install unzip
wget https://files.waveshare.com/upload/0/09/RM5XXQ_For_Jetson_nano.zip
unzip RM5XXQ_For_Jetson_nano.zip
sudo chmod 777 -R RM5XXQ_For_Jetson_nano
cd RM5XXQ_For_Jetson_nano
sudo ./install.sh
sudo reboot
Please do not delete or modify the four directory files of option directory, default.script, and install.sh, otherwise it will affect the loading of device descriptors!

After successfully adding the PID and restarting Jetson nano, enter the following command in the command line interface to display five device symbols USB0-USB4.

ls /dev/ttyUSB*



  • Enable minicom.
sudo apt-get install minicom
sudo minicom -D /dev/ttyUSB2
  • Send the following command ECM in minicom.

After the module restarts, and the NET light is on, use the following command to check the network status (optional).


Get the IP and set the DNS with the following commands:

sudo dhclient -v usb1
sudo apt-get install udhcpc
sudo udhcpc -i usb1
sudo route add -net usb1

After dialing, you can see that usb1 gets the IP through the following command:

ip route

Test usb1 networking status.

 ping -I usb1 www.baidu.com




Assembly drawing




5G consumes a lot of power, and the host's USB interface might not provide enough power. Please use a USB double-plug cable to supply sufficient power to the module, as shown in the diagram.



As RM500U-CN and RM500Q-GL modules support simultaneous access to two SIM cards, dual-card single standby, can be switched to enable one of the SIM cards to work through the AT command:

*SIM card 1 is used by default, you can use the following commands to check: 
*Switch to SIM card 2 using the following commands:  
*Switch to SIM card using the following commands:  
*Query whether the corresponding card slot identifies the SIM card:  

If the corresponding SIM card is still not recognized, consider that the dip switches do not enable the corresponding module, please see C corresponding dip switches are turned ON:


  • Qualcomm platform:
AT+QCFG="data_interface",0       //Switch to the default USB mode 
  • Zhanrui platform:



Please use the following commands to configure the dial-up mode to a stable routing mode:



  • Please check whether the SIM card and the antenna are connected, and note that four antennas must be connected.
  • Please check the hardware connection and use AT Log to check the network connection.




It requires a module with the M.2 B KEY B interface and USB function, modules without USB function (PCIE only) are not supported, the following modules have been verified:

SIM8202G-M2 SIM8262E-M2 SIM8262A-M2
(AA version)RM500U-CNV RM500Q-GL/RM502Q-AE RM520N-GL RM530N-GL

The M.2B KEY connector with USB function can be used if it matches the wiring sequence shown in the figure below: RM520N-GL91.png
5G modules must be purchased separately; if used for other modules, pin compatibility must be confirmed and subject to actual measurement.



RM500U-CN: based on Zhanrui
RM500Q-GL: based on the Qualcomm platform, supports GNSS positioning, mainly for China
RM500q-AE/RM502Q-AE: based on the Qualcomm platform, supports GNSS positioning, mainly for countries except for China.


The 5G module requires a lot of power, especially at the moment of network access; the power supply capacity of the Raspberry Pi is limited, and the 5V (3A) power supply can be connected to the onboard TYPE-C interface.


When using the external power supply, RM500U does not reboot after rebooting the Raspberry Pi, you can use the commands to restart RM500U.


As shown below:
AT+QCFG="usbnet",0 driver type is NDIS(QMI));
AT+QCFG="usbnet",1 The driver type is ECM;
AT+QCFG="usbnet",2 The driver type is MBIM; (RM5XXQ support)
AT+QCFG="usbnet",3 The driver type is RNDIS
AT+QCFG="usbnet",5 The driver type is NCM;


Use the following command to turn on the echo, and press Enter after entering: (Blind typing is required here)


It can be inquired at the following website:




Raspberry Pi 2B/zero, with user serial device number ttyAMA0;

ls -l /dev/serial*   

You can confirm that serial0 is the selected serial device number with the following command line, as follows:
RM520n-gl faq90.png


The USB power supply capability of the Raspberry Pi is worse than that of the computer. It needs to be connected to an external power supply. Please set the switch to EXT PWR, and connect the HAT interface to a 5V 3A power supply:

RM500U-CN 5G HAT.png



Yes, it is a Qualcomm X62 platform like RM520.



1. The Ubuntu system can only be used by dial-up Internet access, please refer to the following steps for dial-up Internet access.


2. If it still doesn't work, please use the following command to check the network status:


3. Make sure your mobile network connection is working properly. Insert the SIM card into the device and make sure it is activated and has sufficient signal strength. You can try to test the same SIM card on other devices to rule out the possibility of SIM card failure. It is also recommended that you use SIM cards of different operators to compare and test, to rule out the problem of carrier frequency band support.



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)