首先, 我的设备是一个KNX无线接受模块, 利用UART与主机相连, 看到的设备就是ttyUSBx

利用libusb写了一个程序, 调用同步I/O 的API, 即libusb_bulk_transfer来传输数据给KNX模块, 代码片段如下:

.....

前面一系列的libusb_init()libusb_open_with_vid_pid() libusb_claim_interface()调用均已成功;

......

(buffer里面随便存放了一些AAABBBCCC之类的数据以供测试)

r = libusb_bulk_transfer(device_handle, LIBUSB_ENDPOINT_OUT, buffer, 64, &actual_length, 0);

返回r = -1, 即LIBUSB_ERROR_IO (input/output error);

请各位大牛指导一下, 谢谢。

LIBUSB_TRANSFER_ERROR的更多相关文章

  1. 转-Asynchronous bulk transfer using libusb

    https://falsinsoft.blogspot.jp/2015/02/asynchronous-bulk-transfer-using-libusb.html The 'linusb' is ...

随机推荐

  1. 那些年踩过的坑之Redis报错:All sentinels down, cannot determine where is mymaster master is running...

    1. 异常信息: All sentinels down, cannot determine where is mymaster master is running... 通过测试: @Test pub ...

  2. 菜鸟系列k8s——快速部署k8s集群

    快速部署k8s集群 1. 安装Rancher Rancher是业界唯一完全开源的企业级容器管理平台,为企业用户提供在生产环境中落地使用容器所需的一切功能与组件. Rancher2.0基于Kuberne ...

  3. jstack 命令

    NAME jstack - Prints Java thread stack traces for a Java process, core file, or remote debug server. ...

  4. [bzoj3193][JLOI2013]地形生成_排列组合_贪心

    [JLOI2013]地形生成 题目链接:https://www.lydsy.com/JudgeOnline/problem.php?id=3193 题解: 这种求总排列的题,一种常规做法就是所有的元素 ...

  5. linux各种IPC机制

    docker中的资源隔离,一种就是IPC的隔离.IPC是进程间通信. 下面的文章转载自https://blog.csdn.net/yyq_9623/article/details/78794775 原 ...

  6. http请求之of_ordering_getmiditem

    //Public function of_ordering_getmiditem (string as_instr,string as_key) returns string //string as_ ...

  7. Boot-crm管理系统开发教程(一)

    ps:上周就把这个项目写完了,一直忘记记录,现在补上. Boot-crm是书上第十八章的内容,书上提供了前端的代码,所以只需要写后端的代码就可以了,①所以我们先把前端的代码移植到项目中. ②然后在li ...

  8. 论文笔记-IGCV3:Interleaved Low-Rank Group Convolutions for Efficient Deep Neural Networks

    论文笔记-IGCV3:Interleaved Low-Rank Group Convolutions for Efficient Deep Neural Networks 2018年07月11日 14 ...

  9. es6 getter setter

    https://stackoverflow.com/questions/34517538/setting-an-es6-class-getter-to-enumerable 1. 我要 getter ...

  10. Java 常提到的自然序(Natural Ordering)

    Natural Ordering常在容器中被提到,和迭代器一起出现. 在Comparable接口的API规范中找到了描述. (https://docs.oracle.com/javase/8/docs ...