We have a problem with reading from serial port via USB on Jetson Nano and Xavier NX from our custom controller. It worked in the past but now it sometimes works for a while (might vary from several seconds to 1 hours or so) and then stops receiving telemetry at all. Only manual USB cable reconnection helps.
The issue occurs when we activate 3 inductive loads at the same time and they are: a brushless DC motor, a contactor, the motor’s brake. There seems to be some EMI generated by one or several of those at the time we activate them.
It behaves perfectly on Windows 10, Ubuntu non ARM based PCs no matter what but doesn’t work properly on Jetsons.
Both Python code like this
from serial import Serial
port = “/dev/serial/by-id/OUR_CONTROLLER_NAME”
serialPort = Serial()
serialPort.port = port
serialPort.baudrate = 115200
serialPort.bytesize = 8
serialPort.timeout = 1
serialPort.parity = ‘N’
serialPort.stopbits = 1
data_raw = serialPort.readline().decode(‘ascii’)
and socat (tail has the same behavior)
sudo socat stdio /dev/serial/by-id/OUR_CONTROLLER_NAME
have the same behavior. It just stops receiving any data but port stays open. Closing and reopening from the code (Python) doesn’t make any difference. Only manual reconnecting of USB helps.
We would really appreciate your help!