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.

posted on   lydstory  阅读(1176)  评论(0编辑  收藏  举报

编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示