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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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.