hidapi icon indicating copy to clipboard operation
hidapi copied to clipboard

"hidraw" udev rules does not work with vid/pid

Open terrancewong opened this issue 8 months ago • 1 comments

udev/99-hid.rules mentions:

# HIDAPI/hidraw
KERNEL=="hidraw*", ATTRS{busnum}=="1", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="003f", MODE="0666"

but this does not really work with /dev/hidraw*.

I tested some different approaches, only busnum works, neither idVendor nor idProduct does.

So my solution is

SUBSYSTEM=="usb", ACTION=="add",  ATTR{idVendor}=="$someVid", MODE:="0660", GROUP="$someGroup"
KERNEL=="hidraw*", ACTION=="add", MODE:="0660", GROUP="$someGroup"

udevadm info /dev/hidraw5 also shows no VID/PID of the device.

tested Debian Trixie, kernel 6.12.27-amd64

terrancewong avatar May 12 '25 06:05 terrancewong

Please see https://github.com/signal11/hidapi/issues/468 and consider closing this issue.

Youw avatar May 12 '25 08:05 Youw