Unable to recieve MCU Response via UART

I have the Jetson Nano 4Gb Developer Kit. I am having issues reading an MCU response on /dev/ttyTHS1 using the pyserial API. The UART TX pin on the 40 pin header does output and the MCU responds on the scope. Jetson’s UART port is operating in half-duplex mode. Messages are only received on the RX pin when the /dev/ttyTHS1 port is idle.

Why is the UART port operating this way?

To cover the bases, my user is in the dialout group, and I have disabled the user console following this post:

UPDATE: a USB to UART converter was used, and the pyserial code now operates as expected. Side tangent: is it possible to communicate via the UART DEBUG pins on the automation header? If so, what port is that?

For using ttyTHS1 we would need to do:
Jetson Nano how to use UART on /ttyTHS1

So it still does not work in your set up even though nvgetty is disabled?

Correct, still doesn’t work after disabling nvgetty.

I did this:

sudo usermod -a -G dialout $USER
echo -e 'KERNEL=="ttyTHS0" OWNER="root" GROUP="dialout" MODE="0660"' | sudo tee /etc/udev/rules.d/99-zTHS0.rules
sudo systemctl stop nvgetty.service
sudo systemctl disable nvgetty.service
sudo udevadm trigger

In other words, the UART port is operating in an exclusive mode and I can’t seem to figure out why. Have seen others resort to a USB adapter after giving up.

UPDATE: below is the code that successfully works with a USB adapter, but not /dev/ttyTHS1

#!/usr/bin/env python
import Jetson.GPIO as GPIO
# Core Dependencies
import serial
import time

print('pyserial version:', serial.VERSION)
channel = 12
GPIO.setmode(GPIO.BOARD)# devboard overlay configuration
GPIO.setup(channel, GPIO.OUT, initial = GPIO.LOW) # Relay Signalwire

	#turn on board
	GPIO.output(channel, GPIO.HIGH)
	uart_connection =  serial.Serial('/dev/ttyUSB0', 19200, timeout=1, rtscts=False)
	#initialize motorcontroller
	uart_connection.write('TXPIN CH2\r') # Move tx to ch2 pin
	uart_connection.write('PACE 0\r')
	while True:		
		print('is serial open', uart_connection.is_open)
		print('send baud/r')
		print('response:', uart_connection.read_all())
		uart_connection.write('gospd 10 10\r')

hello user139627,

please access Jetson Nano Product Design Guide,
you should check [Figure 11-5. Jetson Nano UART Connections] for reference,

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.