momo zone

调核人的blog

实用小工具usbutils和pciutils

lsusb 列出系统中所有usb的vendor id ,product id 以及对应的厂商字符串和设备字符串。

linux-hm12:~ # lsusb
Bus 002 Device 004: ID 05ac:0304 Apple, Inc. Optical USB Mouse [Mitsumi]
Bus 002 Device 003: ID 05ac:0220 Apple, Inc. Aluminum Keyboard
Bus 002 Device 002: ID 05ac:1006 Apple, Inc. Hub in Aluminum Keyboard
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 006: ID 05e3:0717 Genesys Logic, Inc. USB 2.0 SD Reader
Bus 001 Device 002: ID 0bda:8187 Realtek Semiconductor Corp. RTL8187 Wireless Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
不过这个程序是通过一个文件查找id对应的字符串的,所以有未知厂商和设备id就可以通过编辑那个文件来增加:
位置:/usr/share/usb.ids

05e1  Syntek Semiconductor Co., Ltd
        0500  DC-112X WebCam
        0501  DC-1125 WebCam
        0890  STK011 Camera
        0892  STK013 Camera
        0895  STK016 Camera
        0896  STK017 Camera
05e2  ElecVision, Inc.
05e3  Genesys Logic, Inc.
        000a  Keyboard with PS/2 Port
        000b  Mouse
        0100  Nintendo Game Boy Advance SP
        0120  Pacific Image Electronics PrimeFilm 1800u slide/negative scanner
        0131  CF/SM Reader/Writer
        0142  Multiple Slides Scanner-3600
        0143  Multiple Frames Film Scanner-36series
        0180  Plustek Scanner
        0182  Wize Media 1000

同样还有一个lspci ,属于包pciutils,不过这个是属于GNU社区的软件。
比usbutiles强的是它自带一个update 程序可以更新ids (id识别)文件。
linux-hm12:~ # update-pciids
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  157k  100  157k    0     0   6712      0  0:00:24  0:00:24 –:–:–  8749
ids文件位置 : /usr/share/pci.ids.d/
属于包pciutils-ids
Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: