Hi all.
I need to identify a device using udev by looking at which USB port it is
plugged into. The device doesn't have a serial number and I've got two of
the same type of device which I need to discriminage against.
My first try was a udev rule like: (each on one line.)
BUS=="usb" SYMLINK="mouse_1" SYSFS{manufacturer}=="Logitech"
PHYSDEVPATH=="*:00:02.0/usb2/2-9" OPTIONS+="last_rule"
BUS=="usb" SYMLINK="mouse_2" SYSFS{manufacturer}=="Logitech"
PHYSDEVPATH=="*:00:02.0/usb2/2-10" OPTIONS+="last_rule"
When I plug them in, I get:
===========================================
Apr 4 17:34:58 localhost kernel: usb 2-9: new low speed USB device using
ohci_hcd and address 37
Apr 4 17:34:58 localhost kernel: usb 2-9: configuration #1 chosen from 1
choice
Apr 4 17:34:58 localhost kernel: input: Logitech USB-PS/2 Optical Mouse
as /class/input/input35
Apr 4 17:34:58 localhost kernel: input: USB HID v1.10 Mouse [Logitech
USB-PS/2 Optical Mouse] on usb-0000:00:02.0-9
===========================================
and
===========================================
Apr 4 17:39:10 localhost kernel: usb 2-10: new low speed USB device using
ohci_hcd and address 38
Apr 4 17:39:11 localhost kernel: usb 2-10: configuration #1 chosen from 1
choice
Apr 4 17:39:11 localhost kernel: input: Logitech USB-PS/2 Optical Mouse
as /class/input/input36
Apr 4 17:39:11 localhost kernel: input: USB HID v1.10 Mouse [Logitech
USB-PS/2 Optical Mouse] on usb-0000:00:02.0-10
===========================================
Any ideas about what I'm doing wrong?
TIA,
--
Mike Diehl
--
[email protected] mailing list