未知的USB设备(配置描述符失败)
2026-08-04
本文链接为:http://www.usbzh.com/article/detail-1782.html ,欢迎转载,转载请附上本文链接。
HID开发时,配错了中断端点的大小,USB-HID设备枚举失败。
在设备管理器中提示:未知的USB设备(配置描述符失败)
由于该设备有问题,Windows 已将其停止。 (代码 43)
USB 设备返回的 USB 配置描述符无效。

通过USB总线分析仪抓包,可以看到主机重试了3次,最终失败,挂起。
从抓包来看,很明显,这里获取了配置描述符之后,主机复位设备重试。结合设备管理器看到的,就是因为配置描述符中的内容引起的。
通过对获取到的配置描述符进行解析,发现其中断端点描述符设置为128字节,而设备为全速设备,最高支持到64字节,明显超过规范定义,所以失败。
0x09, // bLength
0x02, // bDescriptorType (Configuration)
0x29, 0x00, // wTotalLength 41
0x01, // bNumInterfaces 1
0x01, // bConfigurationValue
0x00, // iConfiguration (String Index)
0xA0, // bmAttributes Remote Wakeup
0x32, // bMaxPower 100mA
0x09, // bLength
0x04, // bDescriptorType (Interface)
0x00, // bInterfaceNumber 0
0x00, // bAlternateSetting
0x02, // bNumEndpoints 2
0x03, // bInterfaceClass:(HID)
0x00, // bInterfaceSubClass
0x00, // bInterfaceProtocol
0x00, // iInterface (String Index)
0x09, // bLength
0x21, // bDescriptorType (HID)
0x11, 0x01, // bcdHID 1.11
0x00, // bCountryCode
0x01, // bNumDescriptors
0x22, // bDescriptorType[0] (HID)
0x1E, 0x00, // wDescriptorLength[0] 30
0x07, // bLength
0x05, // bDescriptorType (Endpoint)
0x01, // bEndpointAddress (OUT/H2D)
0x03, // bmAttributes (Interrupt)
0x80, 0x00, // wMaxPacketSize 128
0x01, // bInterval 1 (unit depends on device speed)
0x07, // bLength
0x05, // bDescriptorType (Endpoint)
0x82, // bEndpointAddress (IN/D2H)
0x03, // bmAttributes (Interrupt)
0x80, 0x00, // wMaxPacketSize 128
0x01, // bInterval 1 (unit depends on device speed)
// 41 bytes
本文链接为:http://www.usbzh.com/article/detail-1782.html ,欢迎转载,转载请附上本文链接。
HID人机交互QQ群:564808376
UAC音频QQ群:218581009
UVC相机QQ群:331552032
BOT&UASP大容量存储QQ群:258159197
STC-USB单片机QQ群:315457461
USB技术交流QQ群2:580684376
USB技术交流QQ群:952873936 USB技术交流3:1031974172
HID开发笔记





