Help with matching a HID device (udev rules troubles)

Kay Sievers kay.sievers at vrfy.org
Thu Jul 2 02:48:37 PDT 2009


On Thu, Jul 2, 2009 at 10:14, Richard Hughes<hughsient at gmail.com> wrote:
> I'm trying to fix UPS support in DeviceKit-power. It's basically all
> down to incorrect udev rules. The device I'm trying to match is the
> last one in the chain, i.e. the one with DEVNAME=/dev/usb/hiddev0 :

> It's easy to match all devices with something like SUBSYSTEM=="usb",
> ATTRS{idVendor}=="0463", ATTRS{idProduct}=="ffff", but then this
> matches all devices, and I only want the hiddev0 device, not the
> hidraw1 device. Ideas welcome. Thanks.

Please don't dump the database, you can't really see anything there. Use:
  udevadm info --attribute-walk -p /sys/class/usb/hiddev0
or whatever path the device has. It will tell you what to match against.

I would expect you just do something like:
  KERNEL=="hiddev*", ATTRS{idVendor}=="0463", ATTRS{idProduct}=="ffff", ...

Kay


More information about the devkit-devel mailing list