Instantly share code, notes, and snippets.

Embed
What would you like to do?
udev rules example for lots of serial devices (put in /etc/udev/rules.d)
# serial devices
# get attributes using: udevadm info -a -n /dev/ttyUSBn
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", ATTRS{product}=="Flyswatter2", ENV{ID_USB_INTERFACE_NUM}=="00", SYMLINK+="serial/flyswatter-jtag"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", ATTRS{product}=="Flyswatter2", ENV{ID_USB_INTERFACE_NUM}=="01", SYMLINK+="serial/flyswatter-tty"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", ATTRS{product}=="Dual RS232-HS", ENV{ID_USB_INTERFACE_NUM}=="00", SYMLINK+="serial/unleashed-jtag"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", ATTRS{product}=="Dual RS232-HS", ENV{ID_USB_INTERFACE_NUM}=="01", SYMLINK+="serial/unleashed-tty"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ATTRS{product}=="Quad RS232-HS", ENV{ID_USB_INTERFACE_NUM}=="00", SYMLINK+="serial/zodiac-jtag0"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ATTRS{product}=="Quad RS232-HS", ENV{ID_USB_INTERFACE_NUM}=="01", SYMLINK+="serial/zodiac-jtag1"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ATTRS{product}=="Quad RS232-HS", ENV{ID_USB_INTERFACE_NUM}=="02", SYMLINK+="serial/zodiac-tty"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ATTRS{product}=="Quad RS232-HS", ENV{ID_USB_INTERFACE_NUM}=="03", SYMLINK+="serial/zodiac-pic"
SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", ATTRS{product}=="USB-Serial Controller D", ENV{ID_USB_INTERFACE_NUM}=="00", SYMLINK+="serial/greycable-tty"
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea70", ATTRS{serial}=="00xxxxxx", ENV{ID_USB_INTERFACE_NUM}=="00", SYMLINK+="serial/imx8m-tty"
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea70", ATTRS{serial}=="00xxxxxx", ENV{ID_USB_INTERFACE_NUM}=="01", SYMLINK+="serial/imx8m-jtag"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment