Skip to content

Instantly share code, notes, and snippets.

@tmcolby
Last active May 28, 2019 17:21
Show Gist options
  • Save tmcolby/6d374907decec2ef07b1453fa74718d9 to your computer and use it in GitHub Desktop.
Save tmcolby/6d374907decec2ef07b1453fa74718d9 to your computer and use it in GitHub Desktop.
helpful udev rules for usb-serial adapters on the raspberry pi
# predictable enumeration based on physical port the usb serial adapter is plugged into
# Hardware : BCM2835 raspberry pi 3b
# Revision : a02082
# view looking at the ports of the pi
# usbSerial0 usbSerial1
# usbSerial2 usbSerial3
KERNELS=="1-1.2", SUBSYSTEMS=="usb", SUBSYSTEM=="tty", ATTRS{devpath}=="1.2", SYMLINK+="usbSerial0", GROUP="dialout", MODE="0666"
KERNELS=="1-1.3", SUBSYSTEMS=="usb", SUBSYSTEM=="tty", ATTRS{devpath}=="1.3", SYMLINK+="usbSerial2", GROUP="dialout", MODE="0666"
KERNELS=="1-1.4", SUBSYSTEMS=="usb", SUBSYSTEM=="tty", ATTRS{devpath}=="1.4", SYMLINK+="usbSerial1", GROUP="dialout", MODE="0666"
KERNELS=="1-1.5", SUBSYSTEMS=="usb", SUBSYSTEM=="tty", ATTRS{devpath}=="1.5", SYMLINK+="usbSerial3", GROUP="dialout", MODE="0666"
# predictable enumeration based on physical port the usb serial adapter is plugged into
# Hardware : BCM2835 raspberry pi 3b+
# Revision : a020d3
# view looking at the ports of the pi
# usbSerial0 usbSerial1
# usbSerial2 usbSerial3
KERNELS=="1-1.1.2", SUBSYSTEMS=="usb", SUBSYSTEM=="tty", ATTRS{devpath}=="1.1.2", SYMLINK+="usbSerial0", GROUP="dialout", MODE="0666"
KERNELS=="1-1.3", SUBSYSTEMS=="usb", SUBSYSTEM=="tty", ATTRS{devpath}=="1.3", SYMLINK+="usbSerial1", GROUP="dialout", MODE="0666"
KERNELS=="1-1.1.3", SUBSYSTEMS=="usb", SUBSYSTEM=="tty", ATTRS{devpath}=="1.1.3", SYMLINK+="usbSerial2", GROUP="dialout", MODE="0666"
KERNELS=="1-1.2", SUBSYSTEMS=="usb", SUBSYSTEM=="tty", ATTRS{devpath}=="1.2", SYMLINK+="usbSerial4", GROUP="dialout", MODE="0666"
# predictable enumeration based on vendor: FTDI FT232 USB-Serial UART (when plugged into any port)
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="usbSerial0", GROUP="dialout", MODE="0666"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment