On Tue, 29 Mar 2005, Jan Merka wrote:

> On Tuesday 29 March 2005 04:16 pm, jklaas wrote:
> > I have another question that I don't quite understand.  With the FM Radio
> > the TransferBufferLength in the URB going down is usually either 0x16 or
> > 0xca.  The URB coming back has the TransferBufferLength is 0x06.  I
> > guess I don't quite understand why they're different.
> 
> In one direction (OUT or "goind down" in sniffusb's terminology), the length 
> of the buffer depends on the size of the command that you are sending to the 
> device. On the way back (IN or "going back"), the size tells how may bytes 
> were sent back by the device as a response to the received command. Assuming 
> that you don't have a description of those commands, the trick is to figure 
> out what they mean (and the responses).

More accurately, for an OUT transfer (sending data to the device) the two 
lengths should be the same unless an error occurs.  For an IN transfer 
(reading data from the device), the "going down" length indicates how much 
data the computer asked for whereas the "coming back" length indicates how 
much data the device actually sent.  It's not an error for a device to 
send less data than it was asked for.

Alan Stern



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to