libusb_open(device, &deviceHandle);
returns 0
but
libusb_bulk_transfer(deviceHandle, 0x81, data1, 512, &len, 0);
return -5
so I try to find error code -5
using printf
LIBUSB_ERROR_TIMEOUT
LIBUSB_ERROR_PIPE
LIBUSB_ERROR_OVERFLOW
LIBUSB_ERROR_NO_DEVICE
LIBUSB_ERROR_IO
LIBUSB_TRANSFER_ERROR
LIBUSB_ERROR_INTERRUPTED
LIBUSB_ERROR_ACCESS
LIBUSB_ERROR_BUSY
LIBUSB_ERROR_NO_MEM
LIBUSB_ERROR_COUNT
LIBUSB_ERROR_INVALID_PARAM
But none... and can't find anywhere in google...
What's the meaning of error code -5
in libusb_bulk_transfer
?
Help me!
LibUSB error codes can be found in the libusb documentation, which is available online here.
The functions libusb_error_name
and libusb_strerror
can also be used to get a string corresponding to the error code.
-5
is LIBUSB_ERROR_NOT_FOUND
: Entity not found.
Google suggest checking that you have successfully claimed the interface (you must claim the interface you want to use, with libusb_claim_interface
before doing IO).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With