1)usb3.0 在windows使用winusb時,出現ReadFile的input buffer 太大時,讀不到數據問題?html
2)linux下,usb 3.0 libusb_claim_interface fail ,error=-5linux
對於一些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.windows