hi,
Am getting following exception while reading data from USB: -
ch.ntb.usb.USBTimeoutException: LibusbJava.usb_bulk_read: usb_reap: timeout error
Can anybody explain what the problem is?
Here is the code:-
Device dev = USB.getDevice((short) 0x1559, (short) 0x0002); try { dev.open(1, 0, -1); byte[] readData = new byte[16]; int ir = dev.readBulk(0x81, readData, readData.length, 2000, false); logData(readData); }catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { try { dev.close(); } catch (USBException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
Log in to post a comment.
hi,
Am getting following exception while reading data from USB: -
ch.ntb.usb.USBTimeoutException: LibusbJava.usb_bulk_read: usb_reap: timeout error
Can anybody explain what the problem is?
Here is the code:-
Device dev = USB.getDevice((short) 0x1559, (short) 0x0002);
try {
dev.open(1, 0, -1);
byte[] readData = new byte[16];
int ir = dev.readBulk(0x81, readData, readData.length, 2000, false);
logData(readData);
}catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
try {
dev.close();
} catch (USBException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}