I want to send a single package to an USB device (Arduino controller) using Usb4Java's Low-Level API but I receive following error:
org.usb4java.LibUsbException: USB error 9: Pipe error
Here is the code for the critical part:
ByteBuffer buffer = ByteBuffer.allocateDirect(8);
buffer.put(new byte[] {'a', 'b', 'c'});
int transfered = LibUsb.controlTransfer(handle,
(byte) (LibUsb.REQUEST_TYPE_CLASS | LibUsb.RECIPIENT_INTERFACE),
(byte) 0x09,
(short) 256,
(short) 0,
buffer,
1000);
System.out.println(transfered);
if (transfered < 0){
throw new LibUsbException("Control transfer failed", transfered);
I think it could be driver-related or related to the parameters of LibUsb.controlTransfer(...);
Maybe it's worth mentioning:The source machine is running Windows 7.