How to identify multiple USB-serial adapters under Ubuntu 10.1

后端 未结 7 1403
无人共我
无人共我 2020-12-29 13:54

I am reading data from multiple identical USB-serial adapters under Ubuntu 10.1.

On occasion, their /dev/tty path changes (eg if other USB devices are connected on s

7条回答
  •  情歌与酒
    2020-12-29 14:27

    Look with $ udevadm info -n /dev/ttyUSB0 -a which port your USB device is plugged in. The variable KERNELS of one of the parent devices should be something like KERNELS=="1-1.2:1.0".

    Create a udev rule:

    SUBSYSTEM=="tty", KERNELS=="1-1.2:1.0", SYMLINK+="ttyUSB42"
    SUBSYSTEM=="tty", KERNELS=="1-1.3:1.0", SYMLINK+="usb-serial"
    

    and trigger udev

    $ udevadm trigger
    

提交回复
热议问题