標籤:
USB(Universal Serial BUS,通用序列匯流排)協議規定,所有的USB裝置都有VID(Vendor ID,供應商識別碼)和PID(Product ID,產品識別碼)。VID由供應商向USB-IF(Implementers Forum,應用者論壇)申請。每個供應商的VID是唯一的,PID由供應商自行決定。主機通過VID和PID來識別不同裝置,根據它們(以及裝置的版本 號),可以給裝置載入或安裝相應的驅動程式。VID和PID的長度都是兩個位元組的。
常見的各大供應商的VID和PID,可以在這裡查詢到:http://www.linux-usb.org/usb.ids
USB定義了種類代碼資訊,它被用來識別裝置的功能,根據這些功能,以載入裝置驅動。這種資訊包含在名為基類,子類和協議的3個位元組裡(注意:“基類”在本文中,用來標識三個位元組的種類代碼的的首位元組;在USB規範中沒有使用這個術語)。裝置中有兩個地方可以存放種類代碼資訊,一個是裝置描述符,另一個是介面描述符。已經定義的種類代碼,有些只能用在裝置描述符裡,有些只能用在介面描述符裡,有些兩種描述符裡都可用。下表給出現在已經定了的基類的值的集合,通常用法是什麼,基類用在什麼場合(裝置描述符或介面描述符)。
其具體定義參見USB官方網址:http://www.usb.org/developers/defined_class
各種類的定義參見:http://www.usb.org/developers/devclass_docs
|
Base Class |
Descriptor Usage |
Description |
|
00h |
Device |
Use class information in the Interface Descriptors 種類資訊定義在介面描述符中 |
|
01h |
Interface |
Audio 音訊裝置 |
|
02h |
Both |
Communications & CDC 通訊裝置(手機,Class_02&SubClass_02&Prot_01) |
|
03h |
Interface |
HID (Human Interface Device) 人機介面裝置 |
|
05h |
Interface |
Physical 物理裝置 |
|
06h |
Interface |
Image 映像裝置(可能是IPhone手機,Class_06&SubClass_01&Prot_01) |
|
07h |
Interface |
Printer 印表機 |
|
08h |
Interface |
Mass Storage 大型存放區(可能是手機,Class_08&SubClass_06&Prot_50) |
|
09h |
Device |
Hub 集線器 |
|
0Ah |
Interface |
CDC-Data 通訊裝置(手機,Class_0A&SubClass_00&Prot_00) |
|
0Bh |
Interface |
Smart Card 智慧卡 |
|
0Dh |
Interface |
Content Security Alibaba Content Security Service裝置 |
|
0Eh |
Interface |
Video 視頻裝置(網路攝影機,Class_0e&SubClass_03&Prot_00) |
|
0Fh |
Interface |
Personal Healthcare 個人醫療設備 |
|
10h |
Interface |
Audio/Video Devices 音頻/視頻裝置 |
|
DCh |
Both |
Diagnostic Device 診斷裝置(USB2相容裝置) |
|
E0h |
Interface |
Wireless Controller 無線控制器(藍牙裝置等) |
|
EFh |
Both |
Miscellaneous 雜項(ActiveSync,PalmSync,各種協會等) |
|
FEh |
Interface |
Application Specific 應用專有規範(韌體升級,紅外,USB測試與測量等) |
|
FFh |
Both |
Vendor Specific 供應商自訂規範(手機,Class_FF&SubClass_FF&Prot_FF) |
USB的VID和PID,以及分類(Class,SubClass,Protocol)