libusb_interrupt_transfer以LIBUSB_ERROR_IO结束

时间:2015-10-13 10:58:19

标签: c++ stm32 libusb libusb-1.0 lsusb

使用libusb_interrupt_transfer(...)写入设备,始终以LIBUSB_ERROR_IO结束。 Libusb版本:libusb-1.0.4 STM32F103代码 - 隐藏设备的示例

经过:

  1. 代码中的端点设置为lsusb:0x81
  2. 在usbmon中我可以看到描述符等的请求但是当我触发libusb_interrupt_transfer(...)时没有通信(没有登录usbmon)
  3. STM32板永远不会进入指定的中断端点
  4. 使用的设备句柄正确
  5. 追踪问题的后续步骤是什么?

    这是lsusb输出:

    Bus 001 Device 005: ID 0483:5750 STMicroelectronics Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x0483 STMicroelectronics idProduct 0x5750 bcdDevice 2.00 iManufacturer 1 STMicroelectronics iProduct 2 STM32 Custm HID iSerial 3 8D8316685052 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 41 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 163 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0002 1x 2 bytes bInterval 32 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0002 1x 2 bytes bInterval 32 Device Status: 0x0001 Self Powered

0 个答案:

没有答案