Jetson detects no Serial ports

I’m attempting to attach a USB camera into the Jetson Nano, but nothing is being detected in the serial ports (I’m using pyserial). I found the following method to check what the serial ports are, and this code runs, but it outputs that there aren’t any serial ports, which is confusing because the Jetson obviously has serial ports. I’m wondering why no serial ports are being detected, and how I could make it so they are detected and usable.

import sys
import glob
import serial


def serial_ports():
    """ Lists serial port names

        :raises EnvironmentError:
            On unsupported or unknown platforms
        :returns:
            A list of the serial ports available on the system
    """
    if sys.platform.startswith('win'):
        ports = ['COM%s' % (i + 1) for i in range(256)]
    elif sys.platform.startswith('linux') or sys.platform.startswith('cygwin'):
        # this excludes your current terminal "/dev/tty"
        ports = glob.glob('/dev/tty[A-Za-z]*')
    elif sys.platform.startswith('darwin'):
        ports = glob.glob('/dev/tty.*')
    else:
        raise EnvironmentError('Unsupported platform')

    result = []
    for port in ports:
        try:
            s = serial.Serial(port)
            s.close()
            result.append(port)
        except (OSError, serial.SerialException):
            pass
    return result


if __name__ == '__main__':
    print(serial_ports())

Moving into Jetson Nano forum.

hello AJetsonDev,

it’s going through v4l2 interface, kernel driver will register USB camera as a video device and generate node, for example, /dev/video1.
please check Applications Using GStreamer with V4L2 Source Plugin for the sample command-line to using USB camera.
thanks

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