接続されているUSBデバイスの情報


cat /proc/bus/usb/devices

  接続されているUSBデバイスの情報を表示する。
 
  cat /proc/bus/usb/devices
  T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 1
  B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
  D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
  P:  Vendor=0000 ProdID=0000 Rev= 0.00
  S:  Product=USB SL811HS Root Hub
  S:  SerialNumber=0
  C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
  I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
  E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms
  T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
  D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
  P:  Vendor=05db ProdID=0005 Rev= 0.01
  S:  Manufacturer=Sun Corporation SCC div.
  S:  Product=SUNTAC U-Cable P
  C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
  I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=serial  
  E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl= 16ms
  E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl= 16ms
  E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=  4ms

  「T:]から次の「T:」の直前までが1つのUSBデバイスを表す。
  「P:」がVendor ID、Prod ID
  「S:」ベンダ名称、商品名称
  「I:」クラスID (デバイスの種類)
    00 Interface
    01 Audio
    02 Communications
    03 Human Interface Devices
    06 Imaging
    07 Printer
    08 Mass Storage
    09 Hub


usbutils(lsusb)を使う
   最新のusb.ids http://www.linux-usb.org/usb.ids


 
  # cp lsusb /usr/local/bin/lsusb
  # mkdir /usr/local/share
  # cp usb.ids /usr/local/share/usb.ids 

  USBデバイス情報をサマリー表示 lsusb
 
  # lsusb
  Bus 001 Device 001: ID 0000:0000  
  Bus 001 Device 002: ID 05db:0005 Sun Corp. (Suntac?)  

  USBデバイス情報の詳細表示 lsusb -v
 
  # lsusb -v
  Bus 001 Device 001: ID 0000:0000  
  Device Descriptor:
    bLength                18
    bDescriptorType         1
    bcdUSB               1.10
    bDeviceClass            9 Hub
    bDeviceSubClass         0 Unused
    bDeviceProtocol         0 
    bMaxPacketSize0         8
    idVendor           0x0000 
    idProduct          0x0000 
    bcdDevice            0.00
    iManufacturer           0 
    iProduct                2 USB SL811HS Root Hub
    iSerial                 1 0
    bNumConfigurations      1
    Configuration Descriptor:
      bLength                 9
      bDescriptorType         2
      wTotalLength           25
      bNumInterfaces          1
      bConfigurationValue     1
      iConfiguration          0
      bmAttributes         0x40
        Self Powered
      MaxPower                0mA
      Interface Descriptor:
        bLength                 9
        bDescriptorType         4
        bInterfaceNumber        0
        bAlternateSetting       0
        bNumEndpoints           1
        bInterfaceClass         9 Hub
        bInterfaceSubClass      0 Unused
        bInterfaceProtocol      0 
        iInterface              0 
        Endpoint Descriptor:
          bLength                 7
          bDescriptorType         5
          bEndpointAddress     0x81  EP 1 IN
          bmAttributes            3
            Transfer Type            Interrupt
            Synch Type               none
          wMaxPacketSize          2
          bInterval             255
    Language IDs: (length=4)
       0000 (null)((null))

 
  Bus 001 Device 002: ID 05db:0005 Sun Corp. (Suntac?) 
  Device Descriptor:
    bLength                18
    bDescriptorType         1
    bcdUSB               1.00
    bDeviceClass            0 (Defined at Interface level)
    bDeviceSubClass         0 
    bDeviceProtocol         0 
    bMaxPacketSize0         8
    idVendor           0x05db Sun Corp. (Suntac?)
    idProduct          0x0005 
    bcdDevice            0.01
    iManufacturer          17 Sun Corporation SCC div.
    iProduct               18 SUNTAC U-Cable P
    iSerial                 0 
    bNumConfigurations      1
    Configuration Descriptor:
      bLength                 9
      bDescriptorType         2
      wTotalLength           39
      bNumInterfaces          1
      bConfigurationValue     1
      iConfiguration          0
      bmAttributes         0x80
      MaxPower              100mA
      Interface Descriptor:
        bLength                 9
        bDescriptorType         4
        bInterfaceNumber        0
        bAlternateSetting       0
        bNumEndpoints           3
        bInterfaceClass       255 Vendor Specific Class
        bInterfaceSubClass      0 
        bInterfaceProtocol      0 
        iInterface              0 
        Endpoint Descriptor:
          bLength                 7
          bDescriptorType         5
          bEndpointAddress     0x81  EP 1 IN
          bmAttributes            2
            Transfer Type            Bulk
            Synch Type               none
          wMaxPacketSize         64
          bInterval              16
        Endpoint Descriptor:
          bLength                 7
          bDescriptorType         5
          bEndpointAddress     0x01  EP 1 OUT
          bmAttributes            2
            Transfer Type            Bulk
            Synch Type               none
          wMaxPacketSize         64
          bInterval              16
        Endpoint Descriptor:
          bLength                 7
          bDescriptorType         5
          bEndpointAddress     0x82  EP 2 IN
          bmAttributes            3
            Transfer Type            Interrupt
            Synch Type               none
          wMaxPacketSize          8
          bInterval               4
    Language IDs: (length=4)
       0409 English(US)




  更新日時: 2005/05/08 23:38:43

  お問い合わせ:
  本サイトに対する御意見・質問等はこのページからお願いします。

 Top に戻る