Persistent names for usb-serial devices

Many usb-serial devices appear as /dev/ttyUSBX or /dev/ttyACMX in the system, the link changing every time several of these devices are plugged in. This is unsatisfying if you want to access these devices from a script. One solution is to use a UDEV ruleset to make a symbolic link for each device. Here is how to do it.

Determine vendor and product id of the usb-serial device:

Determine serial number of the device:

Create a UDEV ruleset that makes a symbolic link for each device:

sudo nano /etc/udev/rules.d/99-usb-serial.rules

and add and adapt to your needs:

SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="DAE0011W", SYMLINK+="1wire"

after replugging the device, there will be a symbolic link ‚1wire‘ be created for your device.

Schreibe einen Kommentar