fereuu.blogg.se

Lsusb module version
Lsusb module version















If you look in 10-2:1.0 ( :1 is the "configuration". We can be sure this is the right device by cating a few of the files: $ cat idVendor idProduct manufacturer product

LSUSB MODULE VERSION SERIAL

$ cd /sys/bus/usb/devices/10-2ġ0-2:1.0 bDeviceClass bMaxPower descriptors ep_00 maxchild remove urbnumĪuthorized bDeviceProtocol bNumConfigurations dev idProduct power serial versionĪvoid_reset_quirk bDeviceSubClass bNumInterfaces devnum idVendor product speedīcdDevice bmAttributes busnum devpath ltm_capable quirks subsystemīConfigurationValue bMaxPacketSize0 configuration driver manufacturer removable uevent The devnum file's contents will match the device number given by lsusb, so you can do something like this: $ grep -l '^3$' /sys/bus/usb/devices/10-*/devnum # the ^ and $ to prevent also matching 13, 31, etc. Unfortunately, over time that mapping breaks down-sysfs re-uses numbers even when device numbers aren't. So 10-2 is a good guess for where to find the APC UPS lsusb gives as bus 10, device 3.

lsusb module version

Initially, lsusb seems to count devices from 1, /sys from 0. These /sys interfaces should be reasonably stable, so if you're writing a shell script, this is probably how you want to do it. You can get the information out of /sys, thought its more painful than lspci. Method 3: Using only basic utilities to read /sys directly (best for scripting or recovery) Once again, this only shows the current driver, not the default. Note that debugfs interfaces are not stable, so different kernel versions may print in a different format, or be missing the file entirely. If you have debugfs mounted, the kernel maintains a file in the same format as usb-devices prints out at /sys/kernel/debug/usb/devices you can view with less, etc. There isn't a way to find the default one. Note that this lists the current driver, not the default one.

lsusb module version

S: Manufacturer=American Power Conversion If you run it, it outputs information about the devices on the system, including which driver is used: $ usb-devices The usbutils package (on Debian, at least) includes a script called usb-devices. Userspace can instruct the kernel to use a different driver (and in the case of my APC UPS, nut has).

lsusb module version

Note that there are two answers to this question: The driver that the kernel would use, and the driver that is currently in use. We're going to try to find out what driver is used for the APC UPS. MX518 Optical Mouseīus 010 Device 003: ID 051d:0002 American Power Conversion Uninterruptible Power Supply Finding the Kernel Driver(s) The victim device $ lsusbīus 010 Device 002: ID 046d:c01e Logitech, Inc.















Lsusb module version