0

This is a linux question, how do I figure out where a usb controller is in /dev?

I have tried doing ls /dev > before.txt ls /dev > after.txt diff before.txt after.txt pluging the device in when I go to take the after text file. I still can not find the device. dmesg reports:

[50276.080032] usb 5-1: new full-speed USB device number 3 using uhci_hcd
[50276.298047] usb 5-1: New USB device found, idVendor=1430, idProduct=4748
[50276.298054] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[50276.298058] usb 5-1: Product: Guitar Hero X-plorer  
[50276.298061] usb 5-1: Manufacturer: RedOctane Inc(c)2006 
[50276.298065] usb 5-1: SerialNumber: 05D18E3
[50276.301272] input: RedOctane Guitar Hero X-plorer as /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0/input/input12

but I dont know where that is. how can I find this device?

  • 1
    Are you looking for a USB device or a USB (host) controller? USB controllers do not have nodes in /dev, just like network devices (e.g. eth0) do not. – sawdust Dec 23 '16 at 2:40
2

If the device has a name in /dev, then the simplest answer, since you already have the DEVPATH, i.e. /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0/input/input12, is to use udevadm:

udevadm info -q all /sys/devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0/input/input12 | grep DEVNAME
  • 1
    And additionally, if the kernel doesn't recognize the device because there's no matching driver and/or nor matching udev rules, then there will be no device node (what is probably meant by "usb controller" in the question) in /dev. – dirkt Dec 23 '16 at 7:00
0

lsblk will provide you a nicer overview about your currently plugged in block devices. It reads the sysfs filesystem to get the information.

  • its not a block device, its a controller, (a character device). and lsblk shows nothing for it. (of course) – j0h Dec 22 '16 at 14:30
  • oh, right. please check if lsusbprovide you the desired output. – Julian Berger Dec 22 '16 at 14:36
  • lsusb doesnt show the file in /dev I also tried lsusb -v – j0h Dec 22 '16 at 14:44
  • 1
    I'm sure this should be helpful! unix.stackexchange.com/questions/144029/… – Julian Berger Dec 22 '16 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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