On Wed, 30 Mar 2005, Alan Stern wrote: > 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.
OK, I was just seeing different lengths being asked for depending on whether the tuner was "idle" (the radio program was sending "no_op"s) and when the program was tuning the radio. Somehow I thought that was significant. Is it possible the device is somehow picking up on the size request sent and interpreting that as some sort of command code? > Alan Stern > > -- James Klaas Windows 95 - 32 bit extensions and a graphical shell for a 16 bit patch to an 8 bit operating system originally coded for a 4 bit microprocessor, written by a 2 bit company that can't stand 1 bit of competition. ------------------------------------------------------- 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_ide95&alloc_id396&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