Timeout is 10ms - the device's protocol spec defines it.
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 10
Here's another clip from the usbmon with a bulk...
c294ba20 3312884853 S Ii:2:007:1 -115:8 64 <
c294ba20 3312896246 C Ii:2:007:1 -2:8 0
c294ba20 3312896848 S Ii:2:007:1 -115:8 64 <
c294b5a0 3312901527 S Bo:2:007:3 -115 7 = 01009100 009000
c294b5a0 3312903242 C Bo:2:007:3 0 7 >
c294ba20 3312907244 C Ii:2:007:1 -2:8 0
c294ba20 3312907783 S Ii:2:007:1 -115:8 64 <
c294ba20 3312919235 C Ii:2:007:1 -2:8 0
(The polling I'm doing to the interrupt pipe is in a different
thread than the one issuing the request over the bulk pipe.)
-----Original Message-----
From: Alan Stern [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 25, 2007 1:14 PM
To: David Hooker
Cc: [email protected]
Subject: Re: [Linux-usb-users] Help with talking to a device
On Wed, 25 Jul 2007, David Hooker wrote:
> I'm trying to communicate with a device over USB from Java. I have
> the LibusbJava jar which is basically a thin wrapper around libusb,
> and I have that all working. I can open the device and claim the
> interface (for some reason I have to forcibly kick the hub's claim
> off first sometimes).
>
> The device's communication specification says that I must poll an
> interrupt pipe every 10ms or so to see if it has data ready on the
> bulk in pipe. So I send a message to the device on their bulk out
> pipe, and start polling - however, I'm never seeing data from the
> device. So I decided to usbmon the conversation and see what I get.
> Here's a sampling:
>
> c294ba20 3312458830 S Co:2:007:0 s 00 09 0001 0000 0000 0
> c294ba20 3312460393 C Co:2:007:0 0 0
> c294ba20 3312534562 S Ii:2:007:1 -115:8 64 <
> c294ba20 3312554363 C Ii:2:007:1 -2:8 0
> c294ba20 3312555645 S Ii:2:007:1 -115:8 64 <
> c294ba20 3312567360 C Ii:2:007:1 -2:8 0
No bulk-out messages there.
> The "Ii" lines repeat in the groups of 2, for each poll I do of the
> device. My question is, why am I getting the -2 (ENOENT) reply?
> What does that error mean - just that the device isn't replying (as
> the spec says it won't unless it has data), or does it mean that the
> USB system can't speak to the device at all?
It means that the your poll is being cancelled, possibly because of a
timeout. According to the log, it gets cancelled 10-20 ms after
submission. What do you specify for the timeout parameter?
Alan Stern
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users