Difference between revisions of "SIM8200EA-M2 5G HAT"

From Waveshare Wiki
Jump to: navigation, search
m (Text replace - "Service00" to "Service02")
Line 108: Line 108:
<div class="tabbertab" title="Supports">
<div class="tabbertab" title="Supports">
[[Category:Modules]][[Category:5G| ]][[Category:GPS/GSM| ]]
[[Category:Modules]][[Category:5G| ]][[Category:GPS/GSM| ]]

Revision as of 08:00, 17 April 2022

SIM8200EA-M2 6x antennas

Mainly applicable for China, Europe, the Middle East, South America...
SIM8202G-M2 4x antennas



SIM8200EA-M2:6x antennas version, size:30×52mm
SIM8202G-M2:4x antennas, size:30×42mm,
compatible hardware interface, identical software function.


SIM8200EA-M2 5G HAT With Antennas, 5G/4G/3G Support, Snapdragon X55 Onboard, Multi Mode Multi Band, Applicable For China, Europe, The Middle East, South America, Etc.


Assembly drawing

Assembly drawing

Working with Windows PC

Install Driver

Downlaod the SIM8200 Driver from 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, you can disconnect other network and test the mobile network.

Install driver manually

For some of PC, you need to add driver manullay. If your PC doesn't recognized any COM ports in Device Manger, find unkown devices and upate the driver manually:
d Power on the 5G module and set the Switch into ON. four(it may be more than four) unkow devices are recognized by Windows PC.
Sim8200 windows driver0.png
Right-click the device , update the driver manually, choose SIM8200_OS_Driver\Windows, and then choose thd driver according to the version of your OS. You need to update for all the four/five/six devices.:
Sim8200 windows driver1.png
Four COM ports: AT is used for AT command controlling, Audio is used for dailing Diagnostics is used for debuggging, and NMEA is used for GPS.;
Sim8200 windows driver2.png
Sim8200 windows driver3.png
A mobile network will be setup automatically after updating, you can disconnect other network and test it.

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:


After dialing is successful, as shown in the figure below, the computer can go online normally
Sim8200 win sendat1.png

GPS Positioning

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:


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


Working with Raspberry Pi

The use of Raspberry Pi OS

The following methods are NDIS dialing methods, which do not support the Raspbian system that does not support 2022-04-04. If there is an error, please confirm whether the system is a system before 2022-04-04; 2022-04-04 For the later Raspbian system, it is recommended to use the convenient and fast system built-in driver, internal automatic dialing SIM820X RNDIS dial


This configuration is only needed at the first time.
Open a terminal and run the following commands:

sudo apt-get install p7zip-full
wget https://www.waveshare.com/w/upload/f/fb/SIM8200-M2_5G_HAT_code.7z
7z x SIM8200-M2_5G_HAT_code.7z
sudo chmod 777 -R SIM8200-M2_5G_HAT_code
cd SIM8200-M2_5G_HAT_code
sudo ./install.sh

Please do not modify option, qmi_wwan_simcom, default.script,install.sh files or directorys, otherwise the dirver cannot be installed normally.
If you get error information, please check ifyou use the 2020-08-20-raspios-buster-armhf OS and take screenshot of error information and contact our support team for help.

Run ifconfig -a command to check WWAN0 interface.
SIM8200 RPI 2.png

Testing with AT command

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

SIM8200 RPI 1.png

5G Networking

cd Goonline
sudo ./simcom-cm

After running codes, DNS information are shown as figure below:
SIM8200 RPI 3.png
After connecting two SIM820X to Raspberry Pi through USB, two network cards—wwan0 and wwan1 can be recognized, and 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 wwan0


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.

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, and 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 frist.
SIM820x OpenWrt(EN) (1).png
  • Enter 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 If you do not modify the IP of the OpenWrt, it will easily lead to conflicts and fail 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 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", 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

【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:

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



First of all, it is necessary to understand the 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 (less people, the faster the speed is closer to the base station)


  • Confirm that the SIM card connected to the SIM820X can use 5G in mobile phones and other devices through test and other methods
  • 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, 0X000000000000000046000001E2000908DD, 0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000 // Give SIM820X
AT+CNMP=71 // Fixed 5G


usb, running sudo ./install on the Raspberry Pi will load the USB driver, and we will connect and communicate with the 3B/4B USB connector; Windows also loads the USB driver according to the tutorial. If there is no USB driver, it will be displayed as an unknown device. .


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.

Yes, connect to different USB ports of different hosts, take Raspberry Pi as an example, and the commands for dialing up the Internet at the same time are as follows:

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