Skip to content

Persistent names for USB serial devices

inkyusa edited this page Aug 20, 2017 · 1 revision
  1. Find out the serial number of the device using

    $ udevadm info -a -n /dev/ttyUSB* | grep '{serial}' | head -n1 ATTRS{serial}=="A400BCLG"

  2. Put the attribute in a udev rule file with an appropriate name e.g. 90-matrice.rules
# Rules for persistent naming of autopilot, laser altimeter and usb gps
# Put in /etc/udev/rules.d/
SUBSYSTEM=="tty", ATTRS{serial}=="AH01NA56", SYMLINK+="autopilot"
SUBSYSTEM=="tty", ATTRS{serial}=="DJ00EQOP", SYMLINK+="laser_altimeter"
SUBSYSTEM=="tty", ATTRS{serial}=="0000:00:14.0", SYMLINK+="usb_gps"

Source

Clone this wiki locally