Welcome to DOFBOT Pro repository
6. External device serial communication
External device serial port communication
1. Preparation
This section tests the serial port's self-transmitting and receiving functions of Jetson Nano. The serial port device number of Jetson Orin NX and Jetson Orin Nano motherboards needs to be modified to /dev/ttyTHS0.
From the figure below, you can see that the TXD and RXD pins of the serial port of JETSON NANO correspond to physical pins 8 and 10 respectively.

Wiring: JETSON NANO pin 8 (TXD) → JETSON NANO pin 10 (RXD)

2. Use the routine to test the serial port function
Download a serial port communication case from github. The source code and explanation can be viewed at this github link
git clone https://github.com/JetsonHacksNano/UARTDemo
Enter the folder
xxxxxxxxxxcd UARTDemo
If you do not plan to use the serial console on the UART, you should disable the serial console (it depends on your choice):
xxxxxxxxxxsystemctl stop nvgettysystemctl disable nvgettyudevadm trigger
Install serial module