Using Serial Ports on Jetson AGX Orin with Python

Hi there,

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 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?

Best regards
Nicholas Bowden


Welcome to the NVIDIA Developer forums. This is the Omniverse category, your issue belongs in the Jetson forums. I will move it over for you so the support team has visibility.

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.

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