libusb 3.0

1)usb3.0 在windows使用winusb时,出现ReadFile的input buffer 太大时,读不到数据问题?

2)linux下,usb 3.0 libusb_claim_interface fail ,error=-5

对于一些linux标准支持的设备(如HID设备),可能需要使用libusb_detach_kernel_driver,或libusb_set_auto_detach_kernel_driver,将kernel提供的驱动卸载掉,否则会与libusb的通信产生冲突。对于支持多configuration的设备,还需要使用libusb_set_configuration,选择要使用的configuration number。之后,调用libusb_claim_interface,选择要使用的interface。
  以下为原文
  OS: Centos 6.2
Kernel: 2.6.32
Controller: NEC Corporation uPD720200 USB3.0 controller

when using "libusb_bulk_transfer()" to get 16MB data from device (using 16 times, ask for 1MB at once), returned error code -99 (other error), use "dmesg" can found the following information:

usb 7-1: usbfs: process 6833 (test) did not claim inteRFace 0 before use
xhci_hcd 0000:01:00.0: ERROR no room on ep ring
usb 7-1: usbfs: usb_submit_urb returned -12

the strange is that when add a wait for 1s between each time,the function return success.

猜你喜欢

转载自www.cnblogs.com/hshy/p/11745659.html
今日推荐