/dev/ttyTHS0 is not able to reset the slave UART device

The issue here is I’ve been using the ros_serial_arduino package to exchange data between my arduino nano and jetson orin agx dev kit.

So initially i tested the communication using USB Serial (/dev/ttyUSB0), and the expected behaviour is that the arduino resets every time I initiate communication(i.e while i run the ros_serial node) on the jetson.

But while using the GPIO UART header (ie /dev/ttyTHS0), the communication does work fine as expected, but the arduino does not get reset while I initiate communication (ie while i run the ros_serial node). Even the ros service ~/reset_arduino, does not do anything to the arduino when connected to /dev/ttyTHS0, but does work when the arduino is connected via USB (/dev/ttyUSB0)

As far as my research, I suspect it has something to do with the setting of DTR bit, which triggers the reset of the arduino.

Hi JK_Roopan,

Are you using the devkit or custom board for AGX Orin?
What’s your Jetpack version in use?

Could you share the block diagram of your connection?
You mentioned about DTR(Data Terminal Ready), which is used in RS232.

Have you verified the UART loopback test for /dev/ttyTHS0 before use?
Please also share the full dmesg and device tree for further check.

I’m using the Jetson ORIN AGX Devkit.
Jetpack Version: Jetpack 5.1.2 [L4T 35.4.1]

Block Diagram of my connection (Both are connected to common ground):

I’ve seen in this thread that Arduino’s are supposed to reset when a serial port is opened, which also happens with the jetson if the nano is connected via USB serial to the jetson. I’ve also read something about DTR, and the arduino waiting for a new sketch to be uploaded during serial comm init, but i’m unable to find the ref. I’m just guessing here.

No I have not verified loopback test, kindly guide me through it. Also what commands do i use for the dmesg info you asked.

Sorry that I’m not clear about how to reset the serial on Arduino board. Please ask for the detailed usage from your vendor of Arduino.

You can just short UART1_TX and UART1_RX on your devkit and run the following command to verify loopback test.

$ sudo su
# stty -F /dev/ttyTHS0 115200 raw -echo
# cat /dev/ttyTHS0 &
# echo "test" > /dev/ttyTHS0

I’ve temporarily solved the issue by the means other API calls which reset my data rather than the Arduino itself. So this is not an issue as of now.