You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone. I am trying to read the content of my USB device.
I can successfully list the content of the USB key, list files etc ..
I am supposed to have a file named "network.ini" on the USB key. The file is well listed
Problem
When I try to read the content of the file, i get the error: java.io.IOException: MAX_RECOVERY_ATTEMPTS Exceeded while trying to transfer command to device, please reattach device and try again
After having looked at the logcat, I saw that the Stack trace of the error mentions the error : System.err: Caused by: java.io.IOException: Could not read from device, result == -1 errno 0 null
So following the documentation advices, I tried to use libusb:
Adding the right implementation in gradle dependencies
An still get an error when try to read the InputStream: java.io.IOException: MAX_RECOVERY_ATTEMPTS Exceeded while trying to transfer command to device, please reattach device and try again
But this time logcat is not pointing the same one on the stack trace: Caused by: me.jahnen.libaums.libusbcommunication.LibusbException: libusb control transfer failed: Input/output error [-1]
Expected behavior
What I want is to convert the content of the file into a String. (its content is very light)
How I do that after having accessed the fileSystem of the UsbMassStorageDevice:
Hello everyone. I am trying to read the content of my USB device.
I can successfully list the content of the USB key, list files etc ..
I am supposed to have a file named "network.ini" on the USB key. The file is well listed
Problem
When I try to read the content of the file, i get the error: java.io.IOException: MAX_RECOVERY_ATTEMPTS Exceeded while trying to transfer command to device, please reattach device and try again
After having looked at the logcat, I saw that the Stack trace of the error mentions the error : System.err: Caused by: java.io.IOException: Could not read from device, result == -1 errno 0 null
So following the documentation advices, I tried to use libusb:
An still get an error when try to read the InputStream: java.io.IOException: MAX_RECOVERY_ATTEMPTS Exceeded while trying to transfer command to device, please reattach device and try again
But this time logcat is not pointing the same one on the stack trace: Caused by: me.jahnen.libaums.libusbcommunication.LibusbException: libusb control transfer failed: Input/output error [-1]
Expected behavior
What I want is to convert the content of the file into a String. (its content is very light)
How I do that after having accessed the fileSystem of the UsbMassStorageDevice:
I spent a lot of time on this issue and have no more ideas to solve this quite urgent problem ...
Thanks for your help
The text was updated successfully, but these errors were encountered: