#navi(../)
* USBデバイス情報の調べ方 [#o684ee6d]
lsusbコマンドを使用するとUSBに接続されているデバイスを簡単に調べることができます。
#contents
#htmlinsertpcsp(linux_ads_top.html,linux-sp.html)
* 実行結果 [#u035dfcf]
以下、USBメモリを接続して操作を行っています。~
尚、以下の操作はUbuntuで操作した例です。~
CentOSの場合は、一般ユーザにlsusbのパスが通っていません。~
/sbin/lusbとパスを指定して実行することができます。(rootになればパスが通っています。)~
確認デバイスによってはroot権限が必要な場合があります。
USBメモリ接続前、接続後の出力です。
#ref(lsusb-01.gif)
**詳細な情報を出力 [#y9459dbd]
上記の出力結果にBusとDeviceの値が表示されています。~
その値を設定すると詳細な情報を見ることができます。~
lsusb -s bus:dev -v
以下に2つの実行結果を記します。
- 一般ユーザにて確認(Operation not permittedが出力された)
sakura@ubuntu-ppc:~$ lsusb -s 001:002 -v
Bus 001 Device 002: ID 1687:6211 Kingmax Digital Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1687 Kingmax Digital Inc.
idProduct 0x6211
bcdDevice 2.00
iManufacturer 1
iProduct 2
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 8192
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 200mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk (Zip)
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 0
can't get device qualifier: Operation not permitted
can't get debug descriptor: Operation not permitted
cannot read device status, Operation not permitted (1)
- 管理者権限(root)でlsusbを実行。
以下、Ubuntuで実行したのでsudoを付加し実行した。
sakura@ubuntu-ppc:~$ sudo lsusb -s 001:002 -v
[sudo] password for sakura:
Bus 001 Device 002: ID 1687:6211 Kingmax Digital Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1687 Kingmax Digital Inc.
idProduct 0x6211
bcdDevice 2.00
iManufacturer 1 Kingmax
iProduct 2 USB2.0 FlashDisk
iSerial 3 2009102400000000000004ED
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 8192
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 200mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk (Zip)
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
#br
#htmlinsertpcsp(linux_ads_btm.html,linux-sp.html)
#br