Last active
February 28, 2019 16:00
-
-
Save sven-bock/56f4e6548a9d9d24312bf573a1056b91 to your computer and use it in GitHub Desktop.
Setting a fixed port (with a simlink) to a USB device (udev/rules)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Example: | |
#get some info with: | |
udevadm info -a -n /dev/ttyUSB0 | grep serial | |
udevadm info -a -n /dev/ttyUSB0 | grep idProduct | |
udevadm info -a -n /dev/ttyUSB0 | grep idVendor | |
#or | |
udevadm info -a -n /dev/ttyUSB0 | grep -E 'idVendor|idProduct|serial' | |
#setup a udev rule in /etc/udev/rules.d/99-usb.rules | |
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{serial}=="12345", SYMLINK+="ttyLaser" | |
#reload udev rules | |
udevadm control --reload-rules && udevadm trigger | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment