USB error 1: Transfer error on interrupt endpoint: Input/Output Error

1,405 views
Skip to first unread message

phoipha2004

unread,
Jan 14, 2015, 3:10:06 PM1/14/15
to usb4...@googlegroups.com
Hi all,

I'm using usb4java to test how it work in windows 7 64bit; using Eclipse and
High-level (javax-usb) API. I can read all descriptor of my connected usb
keyboard device (configuration's descriptor, interface' descriptor,
endpoints descriptor). I also can open its interface and its endpoint's pipe.
But the problem is when i submit the data to the opening pipe, it has the
error: "Exception in thread "main" javax.usb.UsbPlatformException: USB error
1: Transfer error on interrupt endpoint: Input/Output Error"

Here is the code for synSubmit() data to opening pipe:

UsbEndpoint endpoint = iface.getUsbEndpoint((byte) 0x81);
System.out.println(endpoint2.getUsbEndpointDescriptor());
iface.claim();//claimed successful
UsbPipe pipe = endpoint.getUsbPipe();
pipe.open(); //pipe opened and actived as check
/*if (pipe.isActive()){
System.out.println("Pipe is actived!");
}
if (pipe.isOpen()){
System.out.println("Pipe is opened!");
}*/

byte[] data = new byte[]{8,4};
UsbIrp i = pipe.createUsbIrp();
i.setData(data);
pipe.syncSubmit(i); //*** error here ***

I also attempted other way to submit data.

try
{
int sent = pipe.syncSubmit(new byte[] { 1, 2, 3 }); //*** still error here ***
System.out.println(sent + " bytes sent");
}
finally
{
pipe.close();
}

Notice:
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
bMaxPower 100mA

Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 HID
bInterfaceSubClass 1
bInterfaceProtocol 1
iInterface 0

Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 8
bInterval 10

I hope some other people can help me figure out why this error happened and
how do i fix this?

Thanks in advance.

Phoi Pha

Jaco van der Westhuizen

unread,
Mar 18, 2015, 9:57:31 AM3/18/15
to usb4...@googlegroups.com, phoip...@gmail.com
I had the same problem.

I eventually discovered that the device was expecting a full-length buffer of data, regardless of the length of what I was sending.

So, even though I wanted to send 2 bytes, I had to send 64 bytes with my two bytes right at the beginning.  The length of the buffer needed depends on the device.

final byte[] bytes = new byte[64];
bytes
[0] = (byte)0x04;
bytes
[1] = (byte)0x20;

pipe
.syncSubmit(bytes);
Reply all
Reply to author
Forward
0 new messages