I am writing an application to communicate with a magnetic band reader through the libusb. in ubuntu 14.04 it works perfectly but in the pi rasperry when I execute the same code it shows me this error:
libusb: error [reap_for_handle] reap failed error -1 errno=14 libusb: error [handle_events] backend handle_events failed with error -1 libusb: error [sync_transfer_wait_for_completion] libusb_handle_events failed: LIBUSB_ERROR_IO, cancelling transfer and retrying,
This happens when he tries to read what comes through the port with the function:
u_char * answer ={'\0'};
u_char epAdress;
epAdress=0x81;
r=libusb_bulk_transfer(dev_handle,epAdress,answer,sizeof(answer),&actual, 0);