1. 先列出 USB 資料,
    1. 以前都是去 查詢 /proc/bus/usb/devices
      $ cat /proc/bus/usb/devices
    2. Ubuntu 9.10 以後請改用
      $ usb-devices
      $ lsusb (可以加上所需要的參數)
  2. 以 Touch Screen 為例,我們會得到下面資料。
    Manufacture/Product 可能和 lsusb 不同,因為 lsusb 是由 usb.ids 得到裝置名稱。
    1. 範例一(Cando)
      T:  Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
      D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs=  1
      P:  Vendor=2087 ProdID=0b03 Rev=02.02
      S:  Manufacturer=Cando     
      S:  Product=11.6 
      C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
      I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
    2. 範例二(eGalax)
      T:  Bus=01 Lev=02 Prnt=02 Port=05 Cnt=03 Dev#=  5 Spd=12  MxCh= 0
      D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
      P:  Vendor=0eef ProdID=72aa Rev=10.00
      S:  Manufacturer=eGalax Inc.
      S:  Product=USB TouchController
      C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
      I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid
  3. 裡面的意思 (截錄自網路文章) (tbd)
    1. T is the topology.
      1. Bus indicates which bus the device is on.
      2. Lev level of the device, starting at level 00 for the root hub, level 01 for any device attached to the root hub, level 02 for devices attached to hubs at level 01, and so on
      3. Prnt is the parent device for this device (always 00 for the root hub, and 01 for the devices attached to the root hub).
      4. Port is the port on the parent device, starting at 00 for the first port on each device.
      5. Cnt is indicates what number device this is, at this level, based on the enumeration order within that level of the topology, starting at 01 for the first device.
      6. Dev# indicates what number device this is, irrespective of level, based on the bus enumeration order. This is unique per bus.
      7. Spd indicates what speed this device is running at, in Mbps (either 1.5 or 12 with the current version of USB).
      8. MxCh indicates how many devices can be connected to this device, and is 00 for anything except a hub.
    2. D information from the device descriptor.
      1. Ver indicates which USB specification version the device claims to meet.
      2. Cls indicates which device class the device is claiming to meet, in both hexadecimal and as a string. A Cls entry of 00(>ifc) indicates that the device class specification compliance is interface dependent, and the interface descriptor should be read for device class information.
      3. Sub indicates which sub-class (within the Cls entry), the device meets.
      4. Prot indicates which protocol within a class or sub-class the device claims to meet.
      5. MxPS indicates how big the packets from Endpoint 0 are.
      6. Cfgs indicates how many configurations this device has.
    3. P is information from the device descriptor. 
      1. Vendor indicates the Vendor Identification code for the device.
      2. ProdID indicates the Product Identification code for the device.
      3. Rev indicates the product revision number.
    4. R (目前沒有,先跳過)
    5. S are the vendor and product strings that the device returned.
      1. Manufacturer
      2. Product
    6. C information from the configuration descriptor
      1. #Ifs indicates how many interfaces the device has.
      2. Cfg# indicates which configuration is being described.
      3. Atr is a hexadecimal indication of the device attributes (0x80 for bus-powered, 0x40 for self-powered, 0x20 for remote wake-up capable).
      4. MxPwr is the maximum power draw for this device configuration, in milliamps.
    7. I is information from the interface descriptor.
      1. If #indicates which interface is being described within a given device configuration.
      2. Alt indicates which alternate setting of this interface is being described.
      3. #EPs indicates how many endpoints there are within the alternate setting for this endpoint.
      4. Cls indicates which class the alternate setting of the interface corresponds to, in both hexadecimal and as a character string.
      5. Sub indicates which sub-class the alternate setting of the interface belongs to.
      6. Prot indicates which interface protocol (within a class and sub-class tuple) the alternate setting of the interface conforms to.
      7. Driver indicates which of the various USB drivers has claimed this interface.


  • 透過 usbview  顯示 eGalax TouchScreen的資料。 
  • 上面兩個 TouchScreen的 protocol 是不一樣的(一個是02 ,一個是01)
    根據 Device Class Definition for HID 1.11/Device Class Definition for Human Interface Devices (HID)4.3 Protocols/Protocol Codes (http://www.usb.org/developers/devclass_docs/HID1_11.pdf)
    Protocol Code Description
    0 None
    1 Keyboard
    2 Mouse
    3-255 Reserved



Ed32. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com