I am working in a research team that has the Jetson AGX Orin as our host system. I am in charge of interfacing a radar device to the Orin. To do so, I need to read and write serial data to the radar over UART via a COM Port (/dev/ttyACM0).
I am using python and the py-serial library. I initially developed the software for a windows x86 machine (where it worked perfectly) and now have to move it across to the Orin. My issue is that while I can successfully open the serial port in python I can’t seem to read any responses from the device. The serial.read() function just returns an empty bytes object. I have been told the issue could be with the fact that we are using Ubuntu for ARM instead just plain Ubuntu.
Does anyone know how to get around this or if there is a different library I should be using for Ubuntu for ARM or what exactly the issue could be?
I’m not a Python person, but provided each end is configured the same, then it should just be an open->read/write->close paradigm. If both ends are not the same setting, then it might send/receive garbage, or just appear to do nothing. The default on the Linux side would be 115200 8N1, no CTS/RTS flow control. If you do use flow control, then you’d need to be sure CTS/RTS is correctly used.
One trick to test is to use loopback mode. If you have your Python program talking to the port, and if the port has TX connected to RX (and optionally CTS to RTS for flow control), then whatever you send should echo back. This is how you know the Linux side is working. If it is, but the other end does not respond, then either voltage levels are wrong, or else port settings are mismatched.