Skip to content

Instantly share code, notes, and snippets.

@laanwj
Last active January 11, 2021 16:54
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laanwj/fb8774b5ca9cd1517df2cd09f0fd0b61 to your computer and use it in GitHub Desktop.
Save laanwj/fb8774b5ca9cd1517df2cd09f0fd0b61 to your computer and use it in GitHub Desktop.
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