1.關於usb的specification,可以去usb org官網下載:
http://www.usb.org/developers/docs/
USB 2.0 Specification
Universal Serial Bus Revision 2.0 specification (.zip file format, size 11.3 MB)
2.其中關於usb的bInterfaceClass,即有哪些大的分類,可以去這裏:
http://www.usb.org/developers/devclass/
看到官方的解釋:
http://www.usb.org/developers/defined_class
Base Class |
Descriptor Usage |
Description |
00h |
Device |
|
01h |
Interface |
|
02h |
Both |
|
03h |
Interface |
|
05h |
Interface |
|
06h |
Interface |
|
07h |
Interface |
|
08h |
Interface |
|
09h |
Device |
|
0Ah |
Interface |
|
0Bh |
Interface |
|
0Dh |
Interface |
|
0Eh |
Interface |
|
0Fh |
Interface |
|
DCh |
Both |
|
E0h |
Interface |
|
EFh |
Both |
|
FEh |
Interface |
|
FFh |
Both |
3.其中關於HID類的具體的詳細含義,包括bInterfaceSubClass和bInterfaceProtocol的解釋,可以去這裏:
http://www.usb.org/developers/devclass_docs#approved
中的:
http://www.usb.org/developers/hidpage/
下載對應官方文檔:
Device Class Definition for HID 1.11
http://www.usb.org/developers/devclass_docs/HID1_11.pdf
其中關於bInterfaceSubClass解釋:
Subclass Code |
Description |
0 |
No Subclass |
1 |
Boot Interface ubclass |
2 - 255 |
Reserved |
bInterfaceProtocol的解釋:
Protocol Code |
Description |
0 |
None |
1 |
Keyboard |
2 |
Mouse |
3- 255 |
Reserved |
4.USB協議太龐大了,所以很難搞懂,老外對此寫了個教程,從軟件和硬件等方面,宏觀地介紹了USB的協議及常用到的那部分的技術細節,此文檔叫做:
USB in a NutShell - Making sense of the USB standard
網頁版:http://www.beyondlogic.org/usbnutshell/usb1.shtml
PDF版:http://www.beyondlogic.org/usbnutshell/usb-in-a-nutshell.pdf
5. USB HID設備的簡介以及如何檢測及操作,老外寫的這個文章很不錯,值得看看:
Using the HID class eases the job of writing USB device drivers
PDF版本:http://www.edn.com/file/18538-243218.pdf
對應的整套源碼,可以去這裏找到下載地址:http://www.hackchina.com/en/cont/43815
6. 《USB Complete》一本老外寫的,可以稱爲USB大全的參考書,USB的來龍去脈和幾乎所有技術細節都有所涉及,是個很不錯的參考書和學習資料,google中搜索"USB Complete"即可找到下載地址:
USB Complete: Everything You Need to Develop USB Peripherals 3rd Edition
USB Complete: The Developer's Guide, Fourth Edition by Jan Axelson
http://zaha.isloco.com/attachment/9600664620.pdf
作者的主頁裏面,有很多USB相關的資源和文章,內容很全:
(1)主要資源,都可以在這個頁面中找到:
包括USB的News,USB 2.0,USB 3.0,USB-IF,Wireless USB,many resources,For end users。
(2)USB Complete的主頁:
(3)USB Mass Storage :
http://www.lvr.com/mass_storage.htm
(4)USB Mass Storage - Designing and Programming Devices and Embedded Hosts
7.一個叫做Jungo的公司,實現了一套USB驅動,叫做WinDriver,支持多個平臺,其對應的Manual中,也包含了很多USB技術信息,也值得一看:
WinDriver USB v8.11 User's Manual - Jungo Ltd
http://www.jungo.com/st/support/documentation/windriver/811/wdusb_man_mhtml/html_wdusb_man.html
8.有個公司“Catalyst Enterprises, Inc.”開發了一套硬件加上對應的軟件,叫做SBAE USB
Analyzer/Exerciser,用來分析USB協議數據。
目前好像很多版本是SBAE-20,SBAE-30,但是我見過的還有SBAE 7.1和網上說的SBAE 7.2版本。
此硬件加軟件,功能非常強大,具體可以參見:
http://ms-n.org/DataSheets/bits/sbae20_3.pdf
關於其介紹,截個圖看看:
其需要硬件加軟件配套使用。不過軟件也可以以模擬硬件的方式,去打開從別處另存出來的.smp文件,分析其中的數據。
對應的SBAE軟件,網上找了下,貌似這裏可以下載:
http://sbae-usb.software.informer.com/
9.USB Mass Storage
(1)關於U盤的實現的簡介,實現邏輯解釋的還不錯:
http://wenku.baidu.com/view/03ed1a88680203d8ce2f240e.html
(2)Jan Axelson的USB Mass Storage一書:
的第一章:
http://www.lvr.com/files/usb_mass_storage_chapter_1.pdf
10. 關於USB的VID和PID,這裏有比較全的列表:
http://www.linux-usb.org/usb.ids
11. USB HID方面的資源(書,範例代碼等),可以去這裏找: