RM500Q-GL 5G HAT
- 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 standalone power supply for the module, allows more loads, stable amd 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.
- High-efficiency power supply circuit, up to 3A output current.
What's On Board
|①||Raspberry Pi GPIO interface||Easy 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|
|⑤||USB3.1 interface||Backward compatible with USB 2.0, can be used to connect to PC/Raspberry Pi/Jetson Nano etc.|
|⑥||USB Type-C interface||5V 3A input; stable and flexible power supply|
|⑦||Audio port||SIM82XX series support audio function, RM50XX series do not support this audio function|
|⑧||Antenna interface||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 light||Check the module running status anytime, anywhere|
4G/5G modules function testing
|Category||4G/5G Module||Network Communication||GNSS Positioning||Voice calls through
|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/5G Module Compatibility
Working with windows
* 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);
- 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:
Common AT commands
EM25X、EM06E and RM50X series 4G/5G module supports AT command control, some basic AT commands are shown in the table below:
|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+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
Open the device manager, find the port number corresponding to AT Port; then open the sscom software, select the corresponding port and baud rate, check
AddCrLf; click the sscom
EXT button and pull out the preset It is best to open the serial port and send the corresponding AT command to test.
Choose SIM card
The 5G HAT has two SIM card slots onboard, 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 the SIM card 1, please use the following command:
- Check whether the corresponding card slot recognizes the SIM card:
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:
AT+QENG="servingcell" AT+QCFG="usbnet",2 AT+QNETDEVCTL=2,3,1 AT+QNETDEVSTATUS=2 AT+CFUN=1,1
- After dialing and restarting, the mobile network network card appears on the computer network connection interface, and the dialing is successful.
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 //打开GPS定位 AT+QGPSLOC=0 //获取GPS定位
Working with Raspberry
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|
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 at the first time.
Please download the newest Raspberry Pi OS, All the settings are based on Kernel 5.5, if you use old version, plase udpate first.Make sure your Kernel version is up-to-date, 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
[email protected]:~ $ 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
- Testing with AT command:
sudo apt-get install minicom sudo minicom -D /dev/ttyUSB2
Welcome to minicom 2.7.1 OPTIONS: I18n Compiled on Aug 13 2017, 15:25:34. Port /dev/ttyUSB2 Press CTRL-A Z for help on special keys AT OK
Step 3. Networking Setup with AT Commands
AT+QCFG="usbnet",1 AT+CGDCONT=1,"IPV4V6","YOUR_APN" AT+CFUN=1,1
Wait for the modem to boot again. It may take 30 seconds. Once the modem reboots, 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.
Step 4. Test 5G Network
Once the internet is active you should see usbX in your internet interface. You can use ifconfig or ipaddr and look for usbX interface.
- Now check the assigned IP address and test the connection.
[email protected]:~ $ ifconfig usb0 usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.225.60 netmask 255.255.255.0 broadcast 192.168.225.255 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
[email protected]:~ $ ping waveshare.com -I usb0 PING waveshare.com (188.8.131.52) from 192.168.10.27 usb0: 56(84) bytes of data. 64 bytes from 184.108.40.206 (220.127.116.11): icmp_seq=1 ttl=52 time=87 ms 64 bytes from 18.104.22.168 (22.214.171.124): icmp_seq=2 ttl=52 time=82 ms 64 bytes from 126.96.36.199 (188.8.131.52): icmp_seq=3 ttl=52 time=92 ms 64 bytes from 184.108.40.206 (220.127.116.11): icmp_seq=4 ttl=52 time=73 ms 64 bytes from 18.104.22.168 (22.214.171.124): icmp_seq=5 ttl=52 time=75 ms
5G HAT Power or Reset Control
The 5G HAT is provided with PWR and RESET control pins, and the Raspberry Pi can control the module power on/off or reset through the high and low levels of these two pins.
- Turn the PWR and RST setting switches to
the rightto enable Pi control：
- Power Control:The following demonstrates the Shell script to control the PWR (D5 PIN) as an example：
cd /sys/class/gpio echo 5 > export cd gpio5 echo out > direction echo 1 > value #set to high level to shut down the 5G module echo 0 > value #set to low level to power on the 5G module echo 5 > unexport
- Reset Control:The following demonstrates the Shell script to control the Reset (D6 PIN) as an example：
cd /sys/class/gpio echo 6 > export cd gpio6 echo out > direction echo 1 > value #set to high level to shut down the 5G module sleep 1 #wait for 1 second echo 0 > value #set to low level to power on the 5G module echo 5 > unexport
The use of OpenWRT
Introduction to OpenWRT
Soft routing is using desktops or servers and other equipment with software. It mainly depends on the settings of the software to achieve the functions of the router. The hard routing is a unique hardware device, including a processor, power supply, and embedded software to provide router functionality.
OpenWrt is a very popular soft routing system. It is a highly modular and highly automated embedded Linux system with powerful network components and scalability. It is often used in industrial control equipment, routers, and other equipment.
In addition to the functions of general home routers, OpenWrt soft routing can also achieve port forwarding, intranet penetration, 4G networking, FTP server and more powerful functions.
Please refer to :Github
5G network speed test
In the speed measurement part, because the Raspberry Pi comes with a Gigabit Ethernet port, and there are few USB network cards above Gigabit, we use the SpeedTest For Python tool to perform speed measurement by the commands. Connect to the terminal of OpenWrt and enter the commands one by one to measure the speed:
## 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
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
sudo apt-get install unzip wget https://www.waveshare.com/w/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
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
- Enable minicom
sudo apt-get install minicom sudo minicom -D /dev/ttyUSB2
- Send the following command ECM in minicom
AT+CPIN? AT+QCFG="usbnet",3 AT+CFUN=1,1
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 0.0.0.0 usb1
After dialing, you can see that usb1 gets the ip through the following command:
ping -I usb1 www.baidu.com
If usbX interface is not visible reboot your whole system, check your SIM, antenna, module and USB. Then check the configuration of the module.
AT+QCFG="usbnet" # Should return 1
Check the SIM is detected by the module.
AT+CPIN? # Should return READY
Check if the module is registered to the network.
AT+CEREG? # Should return 0,1 or 0,5
Check the APN is right and have an IP.
AT+CGCONTRDP # Should return the APN details and IP address.
If you require technical support, please go to the Support page and open a ticket.