Creating Persistent names for usbtty devices

I was needing a way to manage and have persistent USB serial device names this was the answer I came up with…
ex. /dev/someUSBtty

Manipulate this command below to gather the information for ID_VENDOR_ID and ID_MODEL_ID

# udevadm info -a -n /dev/ttyUSB1

Create : /etc/udev/rules.d/99-usb-serial.rules

SUBSYSTEM=="tty", ACTION=="add", ENV{ID_VENDOR_ID}=="0403", ENV{ID_MODEL_ID}=="6011", ENV{ID_USB_INTERFACE_NUM}=="00", SYMLINK+="canif"
SUBSYSTEM=="tty", ACTION=="add", ENV{ID_VENDOR_ID}=="0403", ENV{ID_MODEL_ID}=="6011", ENV{ID_USB_INTERFACE_NUM}=="01", SYMLINK+="obd2"
SUBSYSTEM=="tty", ACTION=="add", ENV{ID_VENDOR_ID}=="0403", ENV{ID_MODEL_ID}=="6011", ENV{ID_USB_INTERFACE_NUM}=="02", SYMLINK+="gps"
SUBSYSTEM=="tty", ACTION=="add", ENV{ID_VENDOR_ID}=="0403", ENV{ID_MODEL_ID}=="6011", ENV{ID_USB_INTERFACE_NUM}=="03", SYMLINK+="spare"

Leave a Reply

Your email address will not be published. Required fields are marked *