USB device detection in Linux

Source: Internet
Author: User
If the USB device in Linux works properly, you must insert a USB bridge module into the system. At the beginning of the check, it is generally necessary to check whether the/proc/bus/usb directory exists. if not, try to insert the USB bridge module. There are two types of USB bridging modules: UHCI and OHCI. In...
If the USB device in Linux works properly, you must insert a USB bridge module into the system. At the beginning of the check, it is generally necessary to check whether the/proc/bus/usb directory exists. if not, try to insert the USB bridge module. There are two types of USB bridging modules: UHCI and OHCI. When deciding to insert the bridge module, you can view the/proc/pci file. Open this file. if you find that the USB node is in the I/O at 0xHHHH format (for example, I/O at 0xe000 [0xe01f]), HHHH is a hexadecimal number, the bridge type is UHCI. If it is in the format of 32 bit memory at 0xHH000000 (for example, 32 bit memory at 0xee000000) and HH is a hexadecimal number, the bridge type is OHCI. However, if your bridge type does not meet any of the above conditions, the only solution is to try to insert the two modules until they are successful. Generally, the insertion module of the UHCI Bridge is uhci or usb-uhci (determined by the kernel version ); for the OHCI bridge, its insertion module is ohci or usb-ohci. After you have correctly inserted the bridge module, the USB device directory will appear in the/proc file system. However, the directory is empty and there are no files. In this case, you must connect to the USB devfs file system, and then detect the connected device through this file system. After the usb file system is mounted, the file/proc/bus/usb/devices,/proc/bus/usb/drivers and directory/proc/bus/usb/busNo are generated. To mount a usbdevfs file, you can perform the following operations: mount-t usbdevfs none/proc/bus/usb or add none/proc/bus/usb usbdevfs defaults 0 0 to/proc/bus/usb/devices file content, you can obtain information about the connected device, including the device identification and manufacturing trademark. Usb device type description: www.2cto.com device specification device class code interface class code application specific-0xFE sound interface 0x00 0x01 communication device 0x02-CDC control interface-0x02 CDC data interface-0x0A HID 0x00 0x03 HUB 0x09 0x09 bulk storage device 0x00 0x08 monitor same as HID power supply device same as HID physical device-0 x 05 printer-0x07 supplier specific-0xFF 5.2 usb file system introduction T = bus topology (lev, prnt, Port, Cnt, etc.), refers to the connection mode between the USB device and the host B = bandwidth (only for the USB master controller) D = Device Description Information P = product identification information S = string descriptor C = configuration description (* indicates activity configuration) I = interface description information E = Terminal description information general format: d = decimal number x = hexadecimal number s = String topology information T: bus = dd lev= dd Prnt = dd Port = dd Cnt = dd Dev # = ddd Spd = ddd MxCh = dd | ||||||__ maximum sub-device | | |__ device speed (Mbps) | |__ device number | ||__ number of devices on this layer ||||__ parent connector/Port of this device |||__ parent device number ||__ level of the bus in the topology |__ bus number |__ topological information Mark www.2cto.com bandwidth information B: alloc = ddd/ddd us (xx %), # Int = ddd, # Iso = ddd | |__ synchronous request no. ||__ interrupt request no. |__ total bandwidth allocated to this bus |__ bandwidth information flag device description and product ID information D: ver = x. xx Cls = xx (s) Sub = xx Prot = xx MxPS = dd # Cfgs = ddP: Vendor = xxxx ProdID = xxxx Rev = xx. xxD: Ver = x. xx Cls = xx (sssss) sub = xx Prot = xx MxPS = dd # Cfgs = dd | ||__ configuration number |||||||______ maximum package size of the default terminal point |||| | | |__ device protocol |||__ device subtype ||__ device type |__ device USB version |__ device information flag #1 P: vendor = xxxx ProdID = xxxx Rev = xx. xx | |__ product revision number ||__ product identification code |__ manufacturer identification code |__ device information identification number #2 string description information S: manufacturer = ssss | |__ Manufacturer information read from the device |__ string description information www.2cto.com S: Product = ssss |__ Product description read from the device, for the USB master controller, this field is "USB * HCI Root Hub" |__ string description information S: SerialNumber = ssss |__ serial number read on the device, for the USB master controller, it is a generated string that represents the device identifier |__ string description information configuration description information C: # Ifs = dd Cfg # = dd recognition = xx MPwr = dddmA ||||__ maximum current (mA) | |__ property ||__ configuration number |__ number of interfaces |__ configuration information flag interface description information (can be multiple) I: if # = dd Alt = dd # EPs = dd Cls = xx (sssss) sub = xx Prot = xx Driver = ssss |||||||__ Driver name ||||||__ interface protocol |||||__ interface subclass | | |__ interface class | |__ number of interrupt points ||__ variable number | |__ interface number |__ interface information Mark www.2cto.com terminal point description information E: ad = xx (s) recognition = xx (ssss) MxPS = dddd Ivl = dddmsE: Ad = xx (s) recognition = xx (ssss) mxPS = dddd Ivl = dddms | ||__ interval |||__ maximum package size of a terminal point ||__ attribute (terminal point type) | |__ terminal point address (I = In, O = Out) |__ fengyv
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.