Orin fails to handle tty devices correctly

,

We are making a prototype for one of our projects and we are trying to use a Jetson AGX Orin to test its viability on our product. If the results are satisfactory we could choose to use Orins for our final version, but for now we have been having issues that have neither been present on a “standard” amd64 pc, nor on the Jetson Xavier (running on the same Jetpack5.0.2).

I’m connecting a barcode scanner by USB, which is usually mounted as /ttyACM0. And I run this simple script to test 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()
    print("opened port")
    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
                print(barcode)
        except serial.SerialException as e:
            print("Serial exception: %s" % e)
            sys.exit(1)
        except Exception as e:
            print("Error reading barcode: %s" % e)

The test works but only once, meaning that if I run it I can scan as many barcodes that I want for as long as I want but if I stop the test and relaunch it, the Orin can not communicate with the barcode scanner anymore. Mind you, the same test works on every other computer or embedded device I have.

Here is the dmesg log I get when I plug the device and then run the test:

[  143.360437] usb 1-4.1: USB disconnect, device number 4
[  179.679536] usb 1-4.2: new full-speed USB device number 8 using tegra-xusb
[  179.796883] usb 1-4.2: New USB device found, idVendor=05e0, idProduct=1701, bcdDevice= 0.03
[  179.796893] usb 1-4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  179.796898] usb 1-4.2: Product: Symbol Bar Code Scanner::EA
[  179.796901] usb 1-4.2: Manufacturer: Symbol Technologies, Inc, 2008
[  179.796904] usb 1-4.2: SerialNumber: USB CDC Symbol Scanner
[  179.800324] cdc_acm 1-4.2:1.0: ttyACM0: USB ACM device

Nothing new appears when running the test.

I already started another topic before, but since I don’t get any answer anymore I’m starting this one. I’ve since reflashed the Orin to start from a clean installation, but the same problem remains. I hope you can help us figure out the problem here.

this should be duplicated with Topic 239866. let’s keep using the original thread for tracking.

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