RM500U-CN 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 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.
What's On Board
|①||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";
|⑪||Cooling Fan||Cool down the Raspberry Pi and 5G module at the same time|
|⑫||Indicator||Check the module running status anytime, anywhere|
|⑬||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|
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
- After connecting the RM500U-CN 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 RM500U_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 support 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
SIM Card Selection
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:
RNDIS 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+CPIN? AT+QCFG="usbnet",3 AT+QNETDEVCTL=2,3,1 AT+CFUN=1,1
- And then you can find that there are some unrecognized devices in the Device Manager on the computer, such as RNDIS (with an exclamation mark).
- Right-click the 'RNDIS', search "Update Divers" and select "Let me pick from a list of available drivers on my computer", then select "Network adapters" from the device list.
- Select "Microsoft" in the manufacturer list of the Network adapters window, and then select "Remote NDIS Compatible Device" in the list on the right, which is the remote NDIS compatible device.
- Click 'Next' and wait for the installation to finish, the RNDIS Kitl device will be installed successfully.
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.
Working with Raspberry Pi
Ubuntu System Use
- Raspberry Pi programming Ubuntu 22.04 system image.
- Confirm system version information:
sudo apt-get install screenfetch screen fetch uname -r
The USB device descriptor needs to be loaded for the first use
In order to identify a module, the module's VID and PID information needs to be added to the file [kernel].
- Check the VID and PID of RM500U.
- Install gcc and make tools
sudo apt-get install gcc sudo apt-get install make
- Add VID and PID.
wget https://files.waveshare.com/upload/9/9e/RM500U_FOR_RPI_Ubuntu22.04.zip unzip RM500U_FOR_RPI_Ubuntu22.04.zip sudo chmod 777 -R RM500U_FOR_RPI_Ubuntu22.04 cd RM500U_FOR_RPI_Ubuntu22.04 sudo ./install.sh
- After successfully adding the PID and restarting the Raspberry Pi, enter the following command on the command line interface and five device symbols USB0-USB4 will appear:
- Open minicom:
sudo apt-get install minicom sudo minicom -D /dev/ttyUSB2
- Send the following commands in minicom for ECM dialing:
AT+CPIN? AT+QENG="serving cell" AT+QCFG="usbnet",1 AT+QNETDEVCTL=2,3,1 AT+CFUN=1,1
- After configuring the ECM mode, CTRL+A -> X -> Yes to exit minicom.
- Use the following commands to get IP and set DNS:
sudo dhclient -v enxe2f1fbfdd5e7 sudo apt-get install udhcpc sudo udhcpc -i enxe2f1fbfdd5e7 sudo route add -net 0.0.0.0 enxe2f1fbfdd5e7
- After dialing, the Raspberry Pi can see that enxe2f1fbfdd5e7 has obtained the IP through the following command (different systems are different, so the actual obtained IP shall prevail):
- Test enxe2f1fbfdd5e7 network status:
ping -I enxe2f1fbfdd5e7 www.baidu.com
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:
## OpenWRT opkg update opkg install python3 opkg install python3-pip pip install speedtest_cli speedtest # or use speedtest_cli
Raspberry Pi minicom Serial Port Debugging
- Use minicom to open ttyUSB2:
sudo minicom -D /dev/ttyUSB2
Send to enable the UART serial port:
3. Open ttyS0 via minicom - ttyS0 is the serial port of the Raspberry Pi 3B/3B+/4B, and the default baud rate is 115200.
sudo minicom -D /dev/ttyS0
4. Raspberry Pi 2B/zero, the user serial device number is ttyAMA0; you can use the following command line to confirm that serial0 is the selected serial device number, as follows:
ls -l /dev/serial*
5G HAT Minicom Serial Port Debugging
4G/5G Modules UART Interface Support
For SIM8202G-M2 and SIM8200EA-M2 these two 5G modules, the UART interface is closed by default and needs to be opened through AT commands:
Raspberry Pi Serial Port Enable
Since the Raspberry Pi serial port is used for terminal debugging by default, if you need to use the serial port, you need to modify the Raspberry Pi settings. Execute the following command to enter the Raspberry Pi configuration:
Select Interfacing Options ->Serial ->NO ->YES to disable serial debugging.
Open the /boot/config.txt file, and find the following configuration statement to enable the serial port, if not, add it at the end of the file:
Restart to take effect:
sudo apt-get install minicom
3. Open ttyS0 through minicom——ttyS0 is the serial port of Raspberry Pi 3B/3B+/4B, the default baud rate is 115200;
sudo minicom -D /dev/ttyS0
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.
Burn the image
Download the RPI OpenWrt system, unzip the system in the Imgs directory, and use the burning tool to burn the system to the SD card.
Login and initial settings
- After the OpenWrt system is turned on, the Raspberry Pi is equivalent to a router. Therefore, use a network cable to connect the Raspberry Pi to the computer according to the use of the router (you can also use the mobile phone to search for WIFI, the default name is "OpenWrt").
- You can set the language to auto first.
- Enter 192.168.1.1 on the web page, the default user name: root, and the default password: password, enter the OpenWrt web management interface.
- Set WIFI password: Network —> Wireless —> interface configuration —> Wireless security.
- Create the new interface: Network -> Interface -> Create interface.
- Modify the IPv4 address of the LAN port to a different IP that is not the same as the LAN port IP of other routers in your home. (Many routers default the LAN port IP to 192.168.1.1. If you do not modify the IP of the OpenWrt, it will easily lead to conflicts and failure to connect to the Internet).
If necessary, it is also recommended to disable the IPv6 allocation length. After the modification is completed, click "Save & Apply", and re-use 192.168.10.1 to access the OpenWrt console.
- In addition, it is recommended to adjust the Firewall setting to connect the OpenWrt terminal and Web management interface through the local area.
Network —> Firewall, change all "reject" to "accept", and click "Save & Apply" after modification, as shown in the picture below:
- And then select System -> Administration, modify the allowed interface for SSH access to "unspecified" (that is, any interface can be accessed by ssh), check the Gateway port, and click "Save & Apply" after the modification is completed.
At this point, you can connect to the OpenWrt web management interface or terminal through the IP address of the LAN port or wan port.
- Insert the SIM card into the slot of the communication module -> All 5G antennas are connected, after connecting to the Raspberry Pi 4B via USB -> Power on;
- Change the mobile communication module to RNDIS mode (USB network sharing mode), which can be changed in Openwrt by sending the following command via minicom:
sudo minicom -D /dev/ttyUSB2 AT+QENG="servingcell" AT+QCFG="usbnet",3 AT+QNETDEVCTL=2,3,1
- Add new interface: Network -> Interfaces -> Add New Interface.
- Create new interface: name of new interface - SIM8202G; protocol of new interface - DHCP client; include the following interfaces - ethernet adapter: "usb0"; submit.
- Configuration interface: Firewall settings - wan; save & apply.
- Wireless configuration: Network -> Wireless -> Modify -> Interface Configuration -> Basic Settings -> Check SIM8202G (Defined by yourself) and lan in Network; Save & Apply.
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://files.waveshare.com/upload/9/93/RM500U_CN_For_Jetson_nano.zip unzip RM500U_CN_For_Jetson_nano.zip sudo chmod 777 -R RM500U_CN_For_Jetson_nano cd RM500U_CN_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+QNETDEVCTL=2,3,1 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
Related Application Cases
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;