Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How can I uniquely identify which device is on USB hub 6-0:1.0: port 2?

I receive messages in my dmesg every now and then and I want the system to tell me which device is connected to that port.

EDIT: OK, I can figure out which hub it is, but how can I figure out which device is on port 2 (out of four).

udevadm info -q all -p /sys/bus/usb/devices/6-0:1.0
P: /devices/pci0000:00/0000:00:1d.0/usb6/6-0:1.0
E: DEVPATH=/devices/pci0000:00/0000:00:1d.0/usb6/6-0:1.0
E: DEVTYPE=usb_interface
E: DRIVER=hub
E: INTERFACE=9/0/0
E: MODALIAS=usb:v1D6Bp0001d0302dc09dsc00dp00ic09isc00ip00
E: PRODUCT=1d6b/1/302
E: SUBSYSTEM=usb
E: TYPE=9/0/0
E: UDEV_LOG=3
share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

I don't know of any utility that can give you this information directly, but you can get it by using a few different utilities.

Shortest route:

udevadm info -q all -p /sys/bus/usb/devices/6-0:1.0

This will give you output of which one of the lines will look like the following (obviously this output won't match your system):

E: DEVICE=/proc/bus/usb/006/053

Then run lsusb and look for the device at Bus 006 Device 053 (from the 006/053 in the above line), this will be your device.

.

For more info, you can poke around in that /sys/bus/usb/devices/6-0:1.0 if you want. You can also change the udevadm command to udevadm info -a -p ... instead which will walk up the udev tree.

share|improve this answer
    
Added my comment to the question. With your help I am able to figure out that 6-0:1.0 is a hub, but what's on port 2? –  jippie May 8 '12 at 6:53
1  
@jippie are you sure the problem isnt with the hub? Each device on the hub gets its own device ID, so if the device has a problem, it should give you the device ID of the device having the problem. –  Patrick May 8 '12 at 11:58
    
Starting to look like it indeed. –  jippie May 9 '12 at 6:37
    
Changed the cabling to the hub, haven´ t had problems yet –  jippie May 12 '12 at 20:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.