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 內容安全設備 |
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) |