Menu

time out error with usb_interrupt_read

Help
2008-06-06
2012-12-06
  • decrouez marion

    decrouez marion - 2008-06-06

    Hi,
    I have a time out error using the usb_interrupt_read method. I would like to know why does this error occur? Is it possible to check the endpoint before the interruption so that it will not stall?

    Thanks.

     
    • andi

      andi - 2008-06-08

      Hi

      The cause for the timeout error is simple: the endpoint returns no data.

      It is not possible to check if some data is available with the current libusb implementation (synchronous transfers). For more information about asynchronous transfers have a look on the libusb mailing list.

      What you can do: catch the timeout exception and try again. A timeout exceptions indicates that the device is still working ok. So you can try to read from the endpoint again.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.