Jetson Nano recognizes USB ACM device but can't read data

On a PC I set up an Arduino Mega 2560 R3 to send out serial data. I verified it was working using PUTTY on the laptop.

From a terminal on the Nano I run dmesg --follow and when I plug in the USB cable it prints ttyACM): USB ACM device

I run this code on the Nano. It runs but prints out Serial incoming data: b’’ (or if I use readlines).

The Nano seems to see the device correctly. I tried all 4 USB ports with no luck and they all work with cameras and keyboard. Any suggestions are greatly appreciated. Seems like a simple problem but I haven’t seen the cause and solution after a lot of searching.

import serial, sys
from serial import SerialException

Install using pip3 install --user pyserial

if name == “main”:
serial_comm = serial.Serial()
# Configure the baud rate and it should be equal to the Arduino code serial communication baud rate
serial_comm.baudrate = 9600
# Configure the COM port as needed ‘/dev/ttyXXXX’ is applicable for Linux systems
serial_comm.port = ‘/dev/ttyACM0’
#Configure timeout seconds
serial_comm.timeout = 10
try:
serial_comm.open()
except serial.SerialException:
# Print an error when the serial communication isn’t available
print (“Could not open port”)
while (True):
if serial_comm.isOpen():
print (“Serial Incoming Data: {}”.format(serial_comm.readline()))
else:
print (“Exiting”)
break
sys.exit()

hello dexter.smith79,

please setup uart ports for serial data to have communication.
you may access Jetson Nano Product Design Guide from download center, please check UART chapter for more detials.
thanks

Hi, it seems that the issue is because I set up the Arduino on a Windows 10 laptop and then connected it to the Nano. The Arduino install for Linux has 2 files. One standard and another that removes an interfering modem manager https://forum.arduino.cc/index.php?topic=632039.0.

This can be different baud rate or framing (7- or 8-bits, 1 or 2 stop bits etc).

hello dexter.smith79,

FYI, the default baud rate setting for UART serial console is using 115200/8n1.
thanks