Template: Jetson Nano

From Waveshare Wiki
Jump to: navigation, search

Jetson Nano Demo

Hardware Connections

Connection diagram

Jetson Nano has an onboard RaspberryPi 40Pin GPIO interface, SIM7600X 4G HAT can be directly connected and used, and Jetson Nano's terminal access the serial port does not affect serial communication with SIM7600X 4G HAT (ie Pin10 and Pin8).


SIM7600X 4G HAT Jetson Nano
5V 5V
GND GND
TXD 10 (Board encoding)
RXD 8 (Board encoding)
PWR 31 (Board code)

Jetson Nano minicom serial port debugging

Sim7600CE-Jetson Nano2.png

1. Connect the SIM7600X 4G HAT to the Jetson Nano, press the PWRKER button for three seconds and then turn it on
2. Use SERIAL to log in to the Jetson Nano terminal, install minicom, and enter:

sudo apt-get install minicom

3. Run minicom to debug the serial port, and enter in the terminal

sudo minicom -D /dev/ttyTHS1 -b 115200

4. Send the AT command to test, press the PWRKEY button for three seconds to start the shutdown, exit the minicom and press Ctrl+A, then X, and finally press ENTER

Python Demos

Sim7600CE-Jetson Nano3.png

After installing the library

sudo apt-get install python3-pip
sudo pip3 install pyserial
sudo apt-get install p7zip

Use the wget tool to download the source code to the specified folder of Jetson Nano, and copy the following command

mkdir -p ~/Documents/SIM7600X_4G_HAT
wget -P ~/Documents/SIM7600X_4G_HAT/ http://www.waveshare.com/w/upload/2/29/SIM7600X-4G-HAT-Demo.7z

Enter the directory where the source code was just created and downloaded, and use the p7zip tool to unzip it to the current directory

cd ~/Documents/SIM7600X_4G_HAT/
sudo p7zip --uncompress SIM7600X-4G-HAT-Demo.7z

AT

Sim7600CE-Jetson Nano4.png

SIM7600X_4G_HAT is connected to Jetson Nano, connected to the antenna, the demo uses the software to power on and off, there is no need to press the button to power on and off, and when you exit, press Ctrl+C to power off the software. Enter the Jetson Nano/AT directory and execute the command:

cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/AT/
sudo python3 AT.py

GPS

Sim7600CE-Jetson Nano5.png

SIM7600X_4G_HAT is connected to Jetson Nano and GNSS antenna. The routine uses software to power on and off. There is no need to press the button to power on and off. When exiting, press Ctrl+C to power off the software. Enter the Jetson Nano/GPS directory and execute the command:

cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/GPS/
sudo python3 GPS.py

PhoneCall

SIM7600X_4G_HAT is connected to Jetson Nano, main antenna and earphone. The demo uses software to power on and off, no need to press the button to switch on and off. This demo uses mobile card to automatically dial 10086. Press Ctrl+C when exiting, and the software will start Shut down. Enter the Jetson Nano/PhoneCall directory and execute the command:

cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/PhoneCall/
sudo python3 PhoneCall.py

Sim7600CE-Jetson Nano-51.png

SMS

Sim7600CE-Jetson Nano-52.png

The SIM7600X_4G_HAT is connected to the Jetson Nano and the main antenna. The demo uses the software to turn it on and off, and there is no need to press the button to turn it on and off. This demo will automatically shut down the software after sending the information www.waveshare.com to the specified number. When users use SMS routines, they must first use tools such as vim to change the number in line 10 of the SMS.py file, replace * with a number, keep the ' symbol, How to use vim.
Enter the Jetson Nano/SMS directory and execute the command:

cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/SMS/
sudo python3 SMS.py

TCP

The SIM7600X_4G_HAT is connected to the Jetson Nano and the main antenna. The demo uses the software to turn it on and off, and there is no need to press the button to turn it on and off.
Enter the Jetson Nano/TCP directory and execute the command:

cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/TCP/
sudo python3 TCP.py

Sim7600CE-Jetson Nano-53.png


More sample programs are continuously updated...