Help with matching a HID device (udev rules troubles)
Richard Hughes
hughsient at gmail.com
Thu Jul 2 01:14:02 PDT 2009
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 :
P: /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.1
N: bus/usb/001/007
S: char/189:6
E: DEVPATH=/devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.1
E: MAJOR=189
E: MINOR=6
E: DEVTYPE=usb_device
E: DRIVER=usb
E: DEVICE=/proc/bus/usb/001/007
E: PRODUCT=463/ffff/4241
E: TYPE=0/0/0
E: BUSNUM=001
E: DEVNUM=007
E: DEVNAME=/dev/bus/usb/001/007
E: ID_VENDOR=MGE_UPS_SYSTEMS
E: ID_VENDOR_ENC=MGE\x20UPS\x20SYSTEMS
E: ID_VENDOR_ID=0463
E: ID_MODEL=ELLIPSE
E: ID_MODEL_ENC=ELLIPSE
E: ID_MODEL_ID=ffff
E: ID_REVISION=4241
E: ID_SERIAL=MGE_UPS_SYSTEMS_ELLIPSE_APEF3800P
E: ID_SERIAL_SHORT=APEF3800P
E: ID_BUS=usb
E: ID_USB_INTERFACES=:030000:
E: DKP_VENDOR=MGE Systems
E: DKP_BATTERY_TYPE=ups
E: DEVLINKS=/dev/char/189:6
P: /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.1/1-4.1:1.0
E: DEVPATH=/devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.1/1-4.1:1.0
E: DEVTYPE=usb_interface
E: DRIVER=usbhid
E: DEVICE=/proc/bus/usb/001/007
E: PRODUCT=463/ffff/4241
E: TYPE=0/0/0
E: INTERFACE=3/0/0
E: MODALIAS=usb:v0463pFFFFd4241dc00dsc00dp00ic03isc00ip00
P: /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.1/1-4.1:1.0/0003:0463:FFFF.0002
E: DEVPATH=/devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.1/1-4.1:1.0/0003:0463:FFFF.0002
E: DRIVER=generic-usb
E: HID_ID=0003:00000463:0000FFFF
E: HID_NAME=MGE UPS SYSTEMS ELLIPSE
E: HID_PHYS=usb-0000:00:1a.7-4.1/input0
E: HID_UNIQ=APEF3800P
E: MODALIAS=hid:b0003v00000463p0000FFFF
P: /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.1/1-4.1:1.0/0003:0463:FFFF.0002/hidraw/hidraw1
N: hidraw1
S: char/249:1
E: DEVPATH=/devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.1/1-4.1:1.0/0003:0463:FFFF.0002/hidraw/hidraw1
E: MAJOR=249
E: MINOR=1
E: DEVNAME=/dev/hidraw1
E: DEVLINKS=/dev/char/249:1
P: /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.1/1-4.1:1.0/usb/hiddev0
N: usb/hiddev0
S: char/180:96
E: DEVPATH=/devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.1/1-4.1:1.0/usb/hiddev0
E: MAJOR=180
E: MINOR=96
E: DEVNAME=/dev/usb/hiddev0
E: DEVLINKS=/dev/char/180:96
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.
Richard.
More information about the devkit-devel
mailing list