Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Persistent names for USB serial devices

Raghav Khanna edited this page Mar 18, 2017 · 2 revisions
  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