TTY device usable only once after being connected on the Jetson AGX Orin

Hello,

I have a connection issue with a barcode scanner connected by usb to the Jetson Orin. Right now, when I first connect the scanner (MS4717) everything works fine. I can run my project or any tool interacting with the device for as long as I want. But if I quit and restart the project or any of the multiple tools I have tried, the Jetson is no longer receiving any data from the scanner.

The scanner is always mounted correctly (usually at /dev/ttyACM0) and communicates by SSI over USB CDC. I’ve tried monitoring with pyserial’s miniterm and with screen /dev/ttyACM0 9600 but the same problem arises, if I ever stop the program I can’t connect to the scanner anymore afterwards (f.e. screen just says [screen is terminating])

I haven’t encountered this issue on any other computer, so I believe it might be an issue with the Jetson rather than the scanner.

In the project I’m trying to run, I use pyserial to interact with the device. Here is an extract of the code to give you an idea of how I use it:

import serial
serial_port = "/dev/ttyACM0"
baud_rate = 9600
 with serial.Serial(serial_port, baud_rate, timeout=0.1) as device_serial:
            device_serial.flush()
            while True:
                try:
                    # read a line from the serial port
                    barcode_byte_string = device_serial.readline()
                    if len(barcode_byte_string) > 0:
                        # convert the byte string to a string and strip the newline character
                        barcode = barcode_byte_string.decode("utf-8").rstrip()
                        # publish the barcode to the topic
                        self.publish_barcode(barcode, serial_port)
                except serial.SerialException as e:
                    # exit with error code 1. This will cause the application to be restarted.
                    sys.exit(1)
                except Exception as e:
                    break

Thanks

hello user50680,

could you please have a try to disable getty service.
for example,
$ sudo systemctl stop nvgetty.service
$ sudo systemctl disable nvgetty.service

Hi JerryChang,
I’ve disabled getty service, but sadly it didn’t solve the problem

hello user50680,

actually, /dev/ttyACM0 is used by Orin as combined uart for sending logs.
how you connect your barcode scanner, had you tried connect it to Orin platform after system boot-up?

I don’t seem to have anything on /dev/ttyACM0 at startup, unless I have the barcode scanner already plugged. Here is a screenshot of my /dev/ folder:

hello user50680,

as you can see… USB micro-B for Debug UART.
you should see that node created after you connect the port to monitor the Debug UART.

I can see the four devices mounted as /dev/ttyACM[0-4] on the host pc, but nothing new appears on the Orin

Hello,
I am still experiencing the same issue. I tried using a different barcode scanner and the same issue still arises. Is there a known communication problem between arm64 devices and tty devices that could be the reason?

It seems the problem happens only on the Jetson Orin, I was able to use the same barcode scanner without issues on the Jetson AGX Xavier with the same JetPack 5.0.2