Armando
unread,Oct 21, 2014, 10:00:15 AM10/21/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to usb4...@googlegroups.com
Hello!
I have a problem:
the error happens when I try to send a message to a device
try
{
// Use device handle here
ByteBuffer buffer = ByteBuffer.allocateDirect(8);
buffer.put(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8 });
int transfered = LibUsb.controlTransfer(handle,
(byte) (LibUsb.REQUEST_TYPE_CLASS |
LibUsb.RECIPIENT_INTERFACE),
(byte) 0x9F27, (short) 01, (short) 80, buffer,
250);
if (transfered < 0) throw new
LibUsbException("Control transfer failed", transfered);
System.out.println(transfered + " bytes sent");
}
Exception in thread "main" org.usb4java.LibUsbException: USB error 1:
Control transfer failed: Input/Output Error
at com.symetry.devices.ComunicacionPinPad.main