SIM8202G-M2 5G HAT (B)

From Waveshare Wiki
Jump to: navigation, search
SIM8202G-M2 5G HAT (B)
SIM8202G-M2 4x antennas,Model B
Sim8202g-m2-5g-hat-b-6.png

Mainly applicable for China, Europe, the Middle East, South America...
RM50XQ-XX 5G HAT (with case)
RM500Q-GL/RM500Q-AE/RM502Q-AE 4x antennas,with case
Rm500u-cn-5g-hat-with-case-2.jpg
{{{name3}}}

{{{name4}}}

{{{name5}}}

Overview

SIM8202G-M2: Based on Qualcomm X55 with 3GPP 5G Release 15 technology.
SIM8262E-M2: Based on Qualcomm X62 with 3GPP 5G Release 15 technology.

Features

  • 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

Specifications

SIM8200EA-M2 SIM8202G-M2 SIM8262E-M2 SIM8262A-M2
5G STANDARD 3GPP R15 3GPP R16
CHIP Qualcomm Snapdragon X55 Qualcomm Snapdragon X62
FREQUENCY BAND
Sub-6G n1, n2, n3, n5, n7, n8, n12, n20, n28, n38, n40, n41, n48, n66, n71, n78 n1, n2, n3, n5, n7, n8, n12, n20, n28, n38, n40, n41, n66, n71, n77, n78, n79 n1, n3, n5, n7, n8, n20, n28, n38, n40, n41, n77, n78,n79 n2, n5, n7, n12, n13, n14, n25, n30, n41, n48, n66, n71, n77, n78, n79
LTE-FDD B1, B2, B3, B4, B5, B7, B8, B12, B13, B14, B17, B18, B19, B20, B25, B26, B28, B29, B30, B32, B66, B71 B1, B3, B5, B7, B8, B18, B19, B20, B26, B28, B32 B2, B4, B5, B7, B12, B13, B14, B25, B26, B29, B30, B66, B71
LTE-TDD B34, B38, B39, B40, B41, B42, B43, B48 B38, B39, B40, B41, B42, B43 B41, B46, B48
WCDMA B1, B2, B3, B4, B5, B8 B1, B5, B8 B2, B4, B5
GNSS GPS, GLONASS, Beidou, Galileo, and QZSS
DATA RATE
Sub-6G 2.4 Gbps (DL)  /  500 Mbps (UL)
LTE 1 Gbps (DL)  /  200 Mbps (UL)
HSPA+ 42 Mbps (DL)  /  5.76 Mbps (UL)
SOFTWARE FUNCTIONS
Operating systems Windows/Linux/Android
Communication protocols TCP/IP, IPV4, IPV6, Multi-PDP, FTP, FTPS, HTTP, HTTPS, MQTTS, DNS, SSL3.0
Dial-Up RNDIS, NDIS, PPP, MBIM
SMS Supports MT, MO, CB, Text, PDU
Firmware upgrade Supports firmware upgrade via USB port
HARDWARE SPECIFICATIONS
SIM Card 1.8V/2.95V
Antenna For 3G/4G/5G/GNSS
6 × IPEX-4 connectors 4 × IPEX-4 connectors
Power Supply 3.135~4.4V
Form Factor M.2
Dimensions 52.0 × 30.0 × 2.3mm 42.0 × 30.0 × 2.3mm
Operating Temperature -30℃ ~ +70℃
APPLICATIONS
Applicable regions China, America, Japan, Korea, Europe, Middle East, America except Americas Americas
The applicable regions above are for reference only, please choose the right module according to your local operator network coverage and supported frequency bands
Application examples CPE, Smart gateway, Drone, Live streaming, Remote medical treatment, Intelligent security


Selection Guide

5G Sub-6 RM500U-CNV RM500Q-GL RM502Q-AE 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

What's On Board

SIM8202G-M2-5G-HAT-B-details-intro.jpg

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

SIM8202G-M2-5G-HAT-B-details-intro02.jpg

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:
M.2-TO-4G-5G-HAT-Pin-defined.jpg

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:
M.2-Compatibility.jpg

User Guide

Module Selection

There are two sets of 2X8 DIP switches on the back of the base board, which are compatible with SIM76XX, SIM82XX, and many other 4G/5G modules:
SIM8200X 5G HAT (B) User01.png

  • With SIM76XX, all switches corresponding to A are ON, others are OFF by default to make calls and send SMS.
  • Use SIM82XX, set all the switches corresponding to B to ON, and other default OFF, you can enjoy a 5G network.
  • With RM50X, all switches corresponding to C are ON, and others are OFF by default, so you can enjoy 5G high-speed Internet access.

Working with Windows PC

Hardware Preparation

  • In addition to the items in the package,
    5G-HAT-Pack.jpg
  • 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:
M.2-TO-4G-5G-HAT-TO-WIN10.jpg

Install Driver

Download the SIM8200 Driver from the Resources part to your PC and unzip it.
Enter the SIM8200_OS_Driver\Windows directory.
Enter the 1_install directory and run the setup.exe file to install.
Sim8200 windows driver1.png
After connecting, a mobile network icon appears, and you can disconnect the other networks and test the mobile network.

Install Driver Manually

For most hosts, although 1_install is installed, there are no COM ports shown. In this case, you need to manually add the 2_AddManully file folder. Here is the way to add: find the unrecognized device in Device Manager, right-click to add the driver as shown below:
Power on the G module, switch it ON and the module boots, and then the PC will recognize four unrecognized devices (5 or 6 devices are recognized). Here the picture only shows 5 devices.
Sim8200 windows driver0.png
Right-click to update the driver demo, choose to add it manually, and select the path as SIM8200_OS_Driver\Windows. Please select it according to your system (WIN7\WIN8\WIN10), and there are up to 6 devices that can be selected, and then the PC will generate the following devices.
Sim8200 windows driver1.png
Four COM ports: AT is used for AT command control, Audio is used for dialing, Diagnostics is used for debugging, and NMEA is used for GPS.
Sim8200 windows driver2.png
Sim8200 windows driver3.png
A mobile network will be set up automatically after updating, you can disconnect other networks and test it.

Common AT Command

Sim7600CE-4.png
  • SIM7600X and SIM820X module supports AT command control, some basic AT commands are shown in the table below:
Command Description Return
AT AT Test Command OK
ATE ATE1 set echo
ATE0 close echo
OK
AT+CGMI Query module manufacturer 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+IPREX Set the module hardware serial port baud rate +IPREX:
OK
AT+CRESET reset module OK
AT+CSQ Network signal quality query, return signal value +CSQ: 17,99
OK
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:
OK
AT+CREG? Query network registration status +CREG:
OK
AT+CPSI? Query UE system information
AT+CNMP? Network mode selection command:
2:Automatic
13:GSM only
38:LTE only
48 : Any modes but LTE
... ....
OK
  • 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 "Add carriage return and line feed"; click the sscom "Extension" 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:
AT+SMSIMCFG?
  • To switch SIM card 2, please use the following command:
AT+SMSIMCFG=1,2
  • Switch back to the SIM card 1, please use the following command:
AT+SMSIMCFG=1,1
  • Check whether the corresponding card slot recognizes the SIM card:
AT+CPIN?

Manual NDIS Dial-up Internet

After installing the driver, some computers cannot automatically dial up to access the Internet, so you need to dial manually, the operation is as follows:
Download SSCOM software, open the sim8200 AT port to send the following command:

AT$QCRMCALL=1,1 //carrier return required

Sim8200 win sendat1.png
At this point, NDIS dial-up is active, and the computer can connect to the network. If it returns 'No Carrier,' the dial-up may have already occurred. Try accessing the internet directly.

GPS Positioning

ANT5 for SIM8200EA-M2; ANT2 for SIM8202G-M2; ANT3 for SIM8262E-M2. For details, you can refer yo the module hardware user manual.

Connect the passive GPS antenna to the ANT5 of the module, and place the antenna outdoors facing the sky. Then send the AT command to turn on the GPS:

AT+CGPS=1

Sim8200 gps info0.png
Now open the NEMA port, and you can get GPS data:
Sim8200 gps info1.png
Finally, turn off the GPS, you can use the AT command:

AT+CGPS=0

SIM Card Config

  • SIM card 1 is used by default, and you can use the following commands to switch to SIM1 when it is SIM2.
 AT+SMSIMCFG=1,1
  • Or you can directly switch to SIM2:
AT+SMSIMCFG=1,2
  • If it still does not work, consider that the flight mode is on, and turn off the flight mode with the following command:
AT+CFUN=1

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
Note
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

The following method is for NDIS dial-up, which is temporarily unsupported for Raspbian systems dated April 4, 2022. If errors occur, please verify that the system is dated before April 4, 2022. For Raspbian systems dated after April 4, 2022, it is recommended to use the system's built-in driver for SIM820X RNDIS dial-up, which automatically initiates internal dialing SIM820X RNDIS Dail-up.

First-time Configuration

Please don't type the wrong letter, it's better to copy and paste.

sudo apt-get install p7zip-full
wget https://files.waveshare.com/upload/8/89/SIM8200_for_RPI.7z
7z x SIM8200_for_RPI.7z  -r -o./SIM8200_for_RPI
sudo chmod 777 -R SIM8200_for_RPI
cd SIM8200_for_RPI
sudo ./install.sh

Please do not delete or modify the "option" directory, "qmi_wwan_simcom" directory, "default.script", "install.sh" files, otherwise it will affect the loading of the driver.
If there is an error, please confirm whether the system is "2020-08-20-raspios-buster-armhf", and take a screenshot of the error message so that engineers can help you analyze and solve the problem.
Run "ifconfig -a" to see that "WWAN0" has been generated.
SIM8200 RPI 2.png

Test AT Command

sudo apt-get install minicom
sudo minicom -D /dev/ttyUSB2

SIM8200 RPI 1.png

NIDS Dial-up

cd Goonline
make
sudo ./simcom-cm

After running codes, DNS information is shown in the figure below:
SIM8200 RPI 3.png
After connecting two SIM820X to the Raspberry Pi through USB, two network cards—wwan0 and wwan1 can be recognized. The two network cards can be dialed at the same time through the following commands: (The network speed cannot be superimposed)

sudo ./simcom-cm -i wwan0
sudo ./simcom-cm -i wwan1

SIM8200X Working01.png

  • Note: If the IP cannot be obtained or the networking is not successful, use the following commands to obtain the IP and set the DNS networking:
sudo dhclient -v wwan0
sudo route add -net 0.0.0.0 wwan0

Auto-run

If you want to set the codes auto-run after booting, you can modify rc.local file:

sudo nano /etc/rc.local

Add the line to file as below:

sudo /home/pi/SIM8200-M2_5G_HAT_code/Goonline/simcom-cm &

Note that you have to add "&" to the end of the command, make sure that the command can be run in the background, or the Pi may not boot normally.

Live streaming with ffmpeg

If you are using the 2020-08-20-raspios-buster-armhf image, then you don't need to install anything as the system already comes with ffmpeg.
Going straight to the topic, assuming you already have a camera and it's properly connected to the Raspberry Pi, then proceed with the tutorial.

  • The camera must be enabled by running the raspi-config command before using it:
sudo raspi-config
Select Enable Camera, select YES

Rpi Enable Camera.png

  • If it is a camera using the CSI interface, the system cannot find the device node of /dev/video0. A line for bcm2835-v4l2 needs to be added to the /etc/modules file:
sudo nano /etc/modules

add:

bcm2835-v4l2 

Pan-tilt hat addmodules.png
Then after the system starts, the system will load the module name in this file and restart the system:

sudo reboot
ls /dev/video*

The video0 device node is found below.
SIM862E-M2 5G HAT USER GUIDE03.png
Note: If after performing the first steps, please confirm that the operation and instructions are correct.
Suppose you are using Douyu Live now, register your account and enable the host function, open Douyu Live Host Center, and find the live broadcast settings.
SIM862E-M2 5G HAT USER GUIDE04.png
Open video plug flow setting:
SIM862E-M2 5G HAT USER GUIDE05.png
The rtmp address and live code will be obtained, and the Raspberry Pi will execute the command:

ffmpeg -f video4linux2 -s 640x480 -r 25 -i /dev/video0 -c:v h264_omx -f flv "rtmp address/live code"

For example: open a terminal first, runs the 5G network:

cd Goonline
sudo ./simcom-cm

and then open another terminal, run the following command:

ffmpeg -f video4linux2 -s 640x480 -r 25 -i /dev/video0 -c:v h264_omx -f flv "rtmp://sendtc3.douyu.com/live/9188303rTNGmU7CS?wsSecret=ef762877aae120262eaf23c3f60a28bf&wsTime=5f59dbf0&wsSeek=off&wm=0&tw=0&roirecognition=0"

rtmp://sendtc3.douyu.com/live is the address, and the next section is the live code. Enter the room number at this time, you can observe the live broadcast, the delay is about 1-2S.

Troubleshooting

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.

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.

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.
SIM820x OpenWrt(EN) (1).png
  • 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.
SIM820x OpenWrt(EN) (2).png
  • Set WIFI password: Network —> Wireless —> interface configuration —> Wireless security.
SIM820X OpenWrt01.png
  • 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.

SIM820x OpenWrt(EN) (3).png
  • 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:

SIM820x OpenWrt(EN) (4).png
  • 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.
SIM820X OpenWrt02.png

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.

Check the working status of the drive

Connect to the OpenWrt terminal via SSH, and run the following commands to view the qmi driver, USB device, network port registration, and network port status:

dmesg | grep qmi
dmesg | grep ttyUSB 
ls /dev | grep cdc-wdm 
ifconfig wwan0
SIM8200 OpenWrt 7.png

Configure networking

  • Select System -> FileTransfer, select and upload simcom-cm in the simcom-cm directory of the folder:
SIM820x OpenWrt(EN) (6).png

Use the above "File Transfer" to upload, the uploaded program is located in "simcom-cm" under the /tmp/upload/ directory.

Enter the following commands in the terminal:

cp /tmp/upload/simcom-cm /
chmod a+x simcom-cm
./simcom-cm

【Note】: Closing this terminal will cause the networking program to stop, which will cause the network to be disconnected. It is recommended to run in the background.

SIM8200 OpenWrt 9.png
  • At this time, open a new terminal of OpenWrt and enter the command: ifconfig wwan0. You can see that the wwan0 network port has successfully obtained the operator IP and can ping the external network.
SIM8200 OpenWrt 10.png
  • Enter the Web management interface of OpenWrt, click Network —>Interface —>Create a new interface.
SIM820x OpenWrt(EN) (7).png
  • Enter the interface as shown in the picture below and confirm that the interface selection in "Physical Settings" is "wwan0".
SIM820x OpenWrt(EN) (8).png
  • Confirm that the interface selection in "Firewall Settings" is "wan".
SIM820x OpenWrt(EN) (9).png
  • Click "Save & Apply" to complete the network port settings, then return to the interface below, network-interface, you can see that the network port has been correctly identified.
SIM820x OpenWrt(EN) (10).png

Then the other devices can be connected to the OpenWrt wireless "OpenWrt" or through the network cable to connect to OpenWrt's own network port for networking.

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
When the SIM8202G module is registered to the 5G network and has a good signal, it connects to OpenWrt's hotspot (5.8G) through the cell phone, and the cell phone can measure the speed up to about 100 megabytes, the actual speed measurement may be different, for reference only.

Raspberry Pi minicom Serial Port Debugging

1. Insert the module into the Raspberry Pi and set the S_TX and S_RX of the dipswitch to ON.
5G Network Speed Test09.png
2. Install minicom, minicom is the serial port debugging tool for Linux.

Use minicom to open ttyUSB2:
 sudo minicom -D /dev/ttyUSB2

Send to enable the UART serial port:

AT+CCUART=1

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*

RM520n-gl faq90.png

5G HAT Minicom Serial Port Debugging

4G/5G Modules UART Interface Support

SIM8202G-M2, RM500U-CN, and SIM7600G-H-M2 Support UART Interface, Other 4G/5G Modules NOT 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:

AT+CCUART=1

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:

sudo raspi-config

Select Interfacing Options ->Serial ->NO ->YES to disable serial debugging.
Serial port.png
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:

enable_uart=1

Restart to take effect:

1. Insert the module into the Raspberry Pi, and turn the S_TX and S_RX of the DIP switch to ON:
Minicom-serial.png
2. Install minicom, minicom is a serial debugging tool for the Linux platform:

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

4. For Raspberry Pi 2B/zero, the user serial device number is ttyAMA0; you can use the following command line to confirm, serial0 is the selected serial device number, as shown below:
RM500U-CN 5G HAT 9.png

OpenWrt

Introduction

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.
SIM820x OpenWrt(EN) (1).png
  • 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.
SIM820x OpenWrt(EN) (2).png
  • Set WIFI password: Network —> Wireless —> interface configuration —> Wireless security.
SIM820X OpenWrt01.png
  • 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.

SIM820x OpenWrt(EN) (3).png
  • 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:

SIM820x OpenWrt(EN) (4).png
  • 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.
SIM820X OpenWrt02.png

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.

Configure networking

  • 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
To switch ECM mode, use this command:
AT+QCFG="usbnet",1
  • Add new interface: Network -> Interfaces -> Add New Interface.

OpenWrt SIM8202G 1.png

  • Create new interface: name of new interface - SIM8202G; protocol of new interface - DHCP client; include the following interfaces - ethernet adapter: "usb0"; submit.

OpenWrt SIM8202G 2.png

  • Configuration interface: Firewall settings - wan; save & apply.

OpenWrt SIM8202G 3.png

  • Wireless configuration: Network -> Wireless -> Modify -> Interface Configuration -> Basic Settings -> Check SIM8202G (Defined by yourself) and lan in Network; Save & Apply.

OpenWrt SIM8202G 4.pngOpenWrt SIM8202G 5.png

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:
RM500U-jetson.png
We recommend you use the new jetson-nano-sd-card-image, whose kernel version is higher than 4.9.140-tegra.
If you run with other Linux systems, please download the driver which is located in the SIM8200_OS_Driver\linux folder, and porting it according to the attached document.

Setup software

Open a terminal and run the following command.

sudo apt-get install p7zip-full
wget https://files.waveshare.com/upload/0/07/Sim8200_for_jetsonnano.7z
7z x Sim8200_for_jetsonnano.7z -r -o./Sim8200_for_jetsonnano
sudo chmod 777 -R Sim8200_for_jetsonnano
cd Sim8200_for_jetsonnano
sudo ./install.sh

Please do not modify or delete the option,qmi_wwan_simcom, default.script, and install.sh folders, otherwise, the driver cannot be installed normally.
If the driver failed to install, please use the 4.9.140-tegra version and try it again.

Run the command ifconfig -a to check WWAN0 port.
Sim8200 jetsonnano 1.png

Test AT command

sudo apt-get install minicom
sudo minicom -D /dev/ttyUSB2

SIM8200 RPI 1.png

5G Networking

cd Goonline
make
sudo ./simcom-cm

Check if it generates the DNS.
Sim8200 jetsonnano 2.png

Other Usage

If you need to use the product on other systems, please download the SIM8200_OS_Driver file and refer to the official SIMCOM documentation to add the driver.

About the Speed

  • 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.

Resources

Assembly drawing

Demo Codes

Software

Document

Related application cases

FAQ

 Answer:
First of all, there are slight differences between laboratory data and actual data. In practice, due to insufficient base stations, poor signal coverage, and many 5G coverage holes, the network speed may not reach the highest peak. Under normal circumstances, the 4G upload speed is stable at 20-40Mbps, and the 5G upload speed is stable at 100Mbps (the fewer people, the faster the speed is closer to the base station.)

{{{5}}}


 Answer:
After confirming that the SIM card is open for the 5G package and has sufficient balance and local 5G network coverage, follow the steps below to fix 5G (boost network speed):
AT+CNBP? //(you can copy the band to notepad) backup band
AT+CNBP=0x100600000FC00000,0x00000000000000460000A7E2BB0F38DF,0x0000000000000000,0x00000000003FFE63000681E2090828D7. 0x00000000003FFE63000681E2090828D7 //assign the band to SIM820X
or
AT+CNBP=0x100600000FC00000,0x0000000000000046000001E2000908DD,0x00000000000000000000,0x00000000000000007042000081A0080808D7. 0x00000000000070000000010000000000 //give the frequency band to SIM820X
AT+CNMP=71 // Fixed 5G

{{{5}}}


 Answer:

It may be that the APN is not acquired, generally, the APN is able to be acquired automatically, some areas (IoT cards) need to be acquired manually, for example, can be set by the following instructions:

AT+CGDCONT=1, "IP", "APN" // different operators APN is different, here the APN is changed to the corresponding operator

You can check the APNs of major carriers at the following websites: APN Search Website
SIM7600X apn.png

{{{5}}}



 Answer:
  • The default is to use SIM card 1, it may be switched to SIM card 2, please use the following command to switch to SIM card 1:
  AT+SMSIMCFG=1,1
  • Or directly switch to SIM card 2:
  AT+SMSIMCFG=1,2
  • If it still doesn't work, consider that the airplane mode is turned on, and use the following command to turn off the airplane mode:
  AT+CFUN=1


 Answer:
*It is recommended to use RNDIS Dial-up

{{{5}}}


 Answer:
Use the following commands to check whether the SIM820X and Raspberry Pi are well connected. If there is no problem, you can see the Qualcomm device and ttyUSB0-USB4:
lsusb
ls /dev

SIM8262E-M2 5G HAT03.png

{{{5}}}


 Answer:

In this case, the network connection may not be successful. Follow the steps below to troubleshoot:
1. First confirm the hardware problem:

  • Check whether the connected SIM card can communicate and surf the Internet normally on mobile phones and other devices:
  • Check whether the antenna is connected properly;
  • Check that the NET light is flashing, and it is always on, indicating that it is not registered to the network

2. After confirming that the hardware is OK, you can use the following command (AT LOG) to further confirm the network situation:

*Check the firmware version information: AT+SIMCOMATI
*Check if the sim card is in good contact: AT+CPIN?
*Turn the radio on (turn off airplane mode): AT+CFUN=1
*Check that the network mode is set to auto-seek: AT+CNMP=2
*Check the signal quality of the current environment: AT+CSQ
*Check if the registration to the network is successful: AT+CGREG?
*Check internet connection: AT+CPSI?
*Check if the APN corresponds to the operator of the SIM card: AT+CGDCONT?
*Check operator access: AT+COPS?

SIM8262E-M2 5G HAT04.png

{{{5}}}


 Answer:
Confirm that the SIM card connected to the SIM820X can use 5G in mobile phones and other devices through methods such as speed measurement:
The fact that the mobile phone can obtain 5G means that there is a 5G signal in the local area, but the mobile phone supports much more 5G frequency bands than the module, and the 5G module may not necessarily be able to register to the 5G network or ask the local operator for the 5G frequency, and the 5G module supports Under the benchmarking, or go to the local city center (where there are 5G NR cells) to test!
  • After confirming that the SIM card is normal and the local 5G network is covered, follow the steps below to fix 5G (to increase the network speed).
AT+CNBP? //(Can copy the frequency band to Notepad) Backup frequency band
AT+CNBP = 0x100600000FC00000, 0x000000000000000046004600001e2000908dd, 0x00000000000000000000000000000070420081a00808d7, 0x0000000000000000000000 //
AT+CNMP=71 // Fixed 5G
  • The 5G operator's SIM card frequency band should cover the SIM820X frequency band; sometimes the 4G network is queried, and the speed has reached 5G. You can directly measure the speed to confirm that the 5G network speed is available.
  • To confirm whether the test environment has 5G network coverage, you can install Cellular-Z on a 5G mobile phone (all major app stores can download it) to view the detailed network information:

5G APP message-1-.png
5G APP message02.png

  • Apple phones can follow the following steps to obtain band information:
    • Open the phone dialer, enter *3001#12345#*, then click the dialer button.
    • In the pop-up page, first, find and click "Serving Cell Info", then find and click "Freg Band Indicator.
    • Check according to the table issued by the operator, and you will know.

5G APP message03.jpg

{{{5}}}


 Answer:
  • It is recommended to use the more convenient RNDIS dial-up.
  • You can burn the latest Raspberry Pi Raspbian system and reconfigure the NDIS dial-up.
  • Or you can use the image of the RNDIS dial-up with drivers already configured and boot the Raspbian system image (with drivers installed).

{{{5}}}



 Answer:
Specific frequency bands can be fixed by the following commands, here fixed at 41 and 78:
AT+CSYSSEL="nr5g_band",41:78

{{{5}}}


 Answer:
The antenna must be connected, and the corresponding functions are as follows:

SIM8262E-M2 5G HAT07.png

{{{5}}}


 Answer:
Plug the GPS antenna into the GNSS antenna socket (SIM8200EA is ANT5; SIM8202G is ANT2), and place the receiver in the open air (note that it cannot be tested in rainy weather). It takes about 1 minute to receive the positioning signal after power-on.

{{{5}}}


 Answer:
You can use USB to transfer data, and runs "sudo ./install" to load the USB driver. We can use the USB connector of Raspberry Pi 3B/4B to communicate, also you can take the same steps to operate in windows for USB loading. Without a USB driver, it will be identified as an unknown device.

{{{5}}}


 Answer:
Not occupied by default.

{{{5}}}


 Answer:
Make sure that your system kernel is above 5.4. Do not use sudo update to upgrade the Raspberry Pi to the latest version, otherwise, the kernel version will be upgraded to a version higher than the current firmware and it will not be recognized.

{{{5}}}


 Answer:
Yes, connect to different USB ports of different hosts, take Raspberry Pi as an example, and the instructions for dialing up the Internet at the same time are as follows:
sudo ./simcom-cm -i wwan0
sudo ./simcom-cm -i wwan1

5G-multi-usb.jpg

{{{5}}}


 Answer:

The following commands can be used to save the SMS to the module memory:

AT+CPMS="MT" 

{{{5}}}


 Answer:
The VOLTE function can be turned on with the following command:
at+voltesetting=1
 at+cnv=/nv/item_files/modem/mmode/ue_usage_setting,1,01,1

The VOLTE function can be turned off with the following command:

at+voltesetting=0
at+cnv=/nv/item_files/modem/mmode/ue_usage_setting,0,01,1

{{{5}}}


 Answer:
  • Insert the GPS antenna into the GNSS antenna holder (SIM8200EA is ANT5; SIM8202G is ANT2), and place the receiver in the open outdoors (note that the test cannot be done in rainy weather), the power needs to wait for about 1 minute before the positioning signal is received;

SIMXXX Locates My Location.png

  • M2 module needs a passive antenna to obtain positioning information, if you do not have a passive positioning antenna, the matching 5G antenna is also available, replace the 5G antenna and put the module into outdoor positioning (the 5G antenna does not come with an extension cable)::

SIM8262E-M2 5G HAT FAQ11.png

{{{5}}}


 Answer:

USB, Raspberry Pi runs "sudo. /install" will load the USB driver, and we connect communication with a 3B/4B USB connector. According to the tutorial, you can load the USB driver on Windows, and it will display as an unknown device when there is no driver.

{{{5}}}


 Answer:
Not occupied by default.

{{{5}}}


 Answer:
Make sure your system kernel is above 5.4, Raspberry Pi does not use sudo update to upgrade to the latest version, this will upgrade the kernel version to a higher version than the current firmware will not be recognized.

{{{5}}}



 Answer:

The following command can be used to detect the presence of Qualcomm Qualcomm devices, and if a COM driver has been loaded (the Raspberry Pi system generally comes with it), a series of ttyUSB* will also appear:

lsusb
ls /dev/ttyUSB*

SIM7600G-H 4G DTU FQA16.png

{{{5}}}


 Answer:

After prolonged operation, the lubricating oil in the rolling bearing fan may evaporate, leading to increased noise. This is a common phenomenon with rolling bearing fans and does not indicate a malfunction of the fan.

{{{5}}}


 Answer:

We use the RTL8125 network port solution.
Theoretically, RTL8125 supports 2.5G, but it depends on the 5G module and the network condition of the test environment.

{{{5}}}


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 AM GMT+8 (Monday to Friday)