HID设备描述符请求及实例分享
2022-05-06
815
0
使用BUSHOUND拆包,获取设备描述符使用GET_DESCRIPTOR请求,其内容如下:
Device Length Phase Data Description
------ -------- ----- -------------------------------------------------- ----------------
72.0 CTL 80 06 00 01 00 00 12 00 GET DESCRIPTOR
72.0 18 IN 12 01 00 02 00 00 00 40 1e 35 5d 02 00 01 01 02 .......@.5].....
03 01 ..
系统返回标准的18字节设备描述符,其内容可对照设备描述符结构进行分析,这里使用工具http://www.usbzh.com/tool/usb.html 进行分析如下:
USB标准请求命令GET_DESCRIPTOR
0x80, // bmRequestType: Dir: D2H, Type: Standard, Recipient: Device
0x06, // bRequest (Get Descriptor)
0x00, // wValue[0:7] Desc Index: 0
0x01, // wValue[8:15] Desc Type: (Device)
0x00, 0x00, // wIndex Language ID: 0x00
0x12, 0x00, // wLength = 18
// 8 bytes
// best guess: USB Standard Request
设备描述符内容:
0x12, // bLength
0x01, // bDescriptorType (Device)
0x00, 0x02, // bcdUSB 2.00
0x00, // bDeviceClass (Use class information in the Interface Descriptors)
0x00, // bDeviceSubClass
0x00, // bDeviceProtocol
0x40, // bMaxPacketSize0 64
0x1E, 0x35, // idVendor 0x351E
0x5D, 0x02, // idProduct 0x025D
0x00, 0x01, // bcdDevice 2.00
0x01, // iManufacturer (String Index)
0x02, // iProduct (String Index)
0x03, // iSerialNumber (String Index)
0x01, // bNumConfigurations 1
// 18 bytes
// best guess: USB Standard Descriptor
HID人机交互QQ群:564808376
UAC音频QQ群:218581009
UVC相机QQ群:331552032
BOT&UASP大容量存储QQ群:258159197
STC-USB单片机QQ群:315457461
USB技术交流QQ群2:580684376
USB技术交流QQ群:952873936