public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Need to identify USB device by port
@ 2007-04-04 23:39 Mike Diehl
  2007-04-05 16:06 ` ds
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Diehl @ 2007-04-04 23:39 UTC (permalink / raw
  To: gentoo-user

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
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-04-06  5:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-04 23:39 [gentoo-user] Need to identify USB device by port Mike Diehl
2007-04-05 16:06 ` ds
2007-04-06  1:46   ` Mike Diehl
2007-04-06  4:39     ` Walter Dnes
2007-04-06  5:11       ` Mike Diehl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox