Template: SIM7600X 4G HAT Guides for Pi

From Waveshare Wiki
Jump to: navigation, search

UART configuration of Raspberry Pi

Since the Raspberry Pi UART 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

Choose Interfacing Options ->Serial ->no -> yes to disable Linux’s use of console UART

Sim7600CE-27 (1).jpg

Open /boot/config.txt file, find the below statement. If there has not this line, you can directly add it at the end of the file.


And then reboot the system.

Minicom for UART debugging on Raspberry Pi

1. Insert the module into the Raspberry Pi
2. Install minicom,minicom is a text-based modem control and terminal emulation program for Linux:

sudo apt-get install minicom

3. Execute command: minicom -D /dev/ttyS0(ttyS0 is the UART of Raspberry Pi 3B)

  • Baud rate is 115200 by default. If you need to change the baud rate, for example 9600, you can add the parameter -b 9600.
  • The user UART device of Raspberry Pi 2B/Zero is ttyAMA0, and ttyS0 of Raspberry Pi 3B.

4. Take the AT synchronization test as an example, and send related commands, as shown in the picture below:


Minicom can enter the setting mode by pressing Ctrl+A then pressing Z, and selecting X to exit.

Download the demo

1. Insert the module into the Raspberry Pi
2. Download the demo to /home/pi/ directory:

wget https://www.waveshare.com/w/upload/2/29/SIM7600X-4G-HAT-Demo.7z
sudo apt-get install p7zip-full
7z x SIM7600X-4G-HAT-Demo.7z   -r -o/home/pi
sudo chmod 777 -R /home/pi/SIM7600X-4G-HAT-Demo

3. Enter the bcm2835 directory, compile and install the BCM2835 library:

chmod +x configure && ./configure && sudo make && sudo make install

4. Enter to the corresponding demo directory, compile and run the demo, here we take PhoneCall demo as an example:

sudo make clean          //Clear the original execution file
sudo make              //recompile
sudo ./PhoneCall       //Run the program

Combination command:

sudo make clean && sudo make && sudo ./PhoneCall



SMS message sending and receiving demo


GPS positioning


TCP network communication demo


FTP download and upload demo