Created
April 28, 2023 05:42
-
-
Save projectgus/bba6e161d5b0bd72e6148427bc6d5e68 to your computer and use it in GitHub Desktop.
udev rule to create symlinks /dev/serial/usb/VID:PID for usb serial devices
This file contains hidden or 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
# Create a /dev/serial/usb/VID:PID symlink for each usb serial device | |
# | |
# - Kernel will manage multiple devices with the same VID:PID so the symlink points to the latest attached (I think). | |
# - Doesn't handle devices with >1 port, looks like it links the first one(?). /dev/serial/by-id probably better for that. | |
SUBSYSTEMS=="tty", ENV{ID_BUS}=="usb", SYMLINK+="serial/usb/$env{ID_USB_VENDOR_ID}:$env{ID_USB_MODEL_ID}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment