weixin_39637233
weixin_39637233
2020-12-25 16:41

TRANSFER_TIMED_OUT issue

I am attempting to port the code from this blog post to ruby and libusb. It can be found here. I seem to be running into TRANSFER_TIMED_OUT on the first interrupt_read on line 28. Unfortunately, the error does not contain transferred so I think there's nothing to read. Since the C code from the blog post seems to work properly I assume either I am doing something wrong (likely) or there's a bug in ruby-libusb. Any thoughts or suggestions?

该提问来源于开源项目:larskanis/libusb

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_39682560 weixin_39682560 4月前

    You can inspect the USB traffic with wireshark. It can capture USB in real time on Windows and Linux (at least). You can capture the communication with the original program and use this information to build and debug your program. I implemented several unknown USB protocols without source code that way, so given you have the sources, you should certainly get this device under control :grinning:

    What do you mean with transferred ? It is a method of LIBUSB::Error .

    点赞 评论 复制链接分享
  • weixin_39637233 weixin_39637233 4月前

    What do you mean with transferred ? It is a method of LIBUSB::Error .

    e.transferred is empty when I catch the exception.

    点赞 评论 复制链接分享
  • weixin_39682560 weixin_39682560 4月前

    e.transferred is empty when I catch the exception.

    Understood. However devices are very diverse, so I can't give you a general advice, except looking at the transferred packets.

    点赞 评论 复制链接分享
  • weixin_39682560 weixin_39682560 4月前

    The issue is hopefully solved in the meantime, so that I'll close it.

    点赞 评论 复制链接分享

相关推荐