Just for the summary:
You may filter for:
- idVendor
- idProduct
- serial
And use:
== Compare for equality.
!= Compare for inequality.
= Assign a value to a key. Keys that represent a list are reset and only this single value is assigned.
+= Add the value to a key that holds a list of entries.
:= Assign a value to a key finally; disallow any later changes.
You may give a specific device a specific new path in /dev/...
Example:
KERNEL=="hiddev*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", ATTRS{serial}=="1234567", GROUP="cdrom", OWNER="user28", MODE="0640", SYMLINK+="myhid"
Results in:
You can access the device via '/dev/hiddevx' or via '/dev/myhid' easyly, every user in group 'cdrom' may read from the device. Owner 'user28' may read and write.
or simplest:
KERNEL=="hiddev*", ATTRS{idVendor}=="16c0", MODE="0666"
Results in:
Every user may access every hiddevice from Vendor 0x16c0
For details see: Docs
.rules
extension. A file with a.conf
extension won't work. – cherno Jun 26 '15 at 05:02lsusb -vvv
to get the idProduct and idVendor – Xavier13 May 21 '16 at 15:26lsusb
is a good start to see what's connected and IDs.idVendor
andidProduct
matches seem case-sensitive, so IDDA77
doesn't work for me butda77
does. (Handy diagnostic:udevadm info --attribute-walk /dev/bus/usb/008/023
, bus 008 device 023 my example;lsusb
for yours.) After adding a rule,sudo udevadm control --reload-rules
and thensudo udevadm trigger
avoids reboot: changes are seconds after that. ATTR vs ATTRS made no odds. My .rules file reads:SUBSYSTEM=="usb", ATTR{idVendor}=="da77", ATTR{idProduct}=="d12e", GROUP="users", MODE="0666"
. – El Zorko Aug 29 '16 at 12:40ATTR
works fine (another poster said to use ATTRS) and I did not need a colon after MODE. This was for a delcom led:SUBSYSTEM=="usb", ATTR{idVendor}=="0fc5", ATTR{idProduct}=="b080", MODE="0666"
– Evan de la Cruz May 11 '17 at 20:39