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.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了