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).
OK, here's a log entry from sniffusb, (the one from snoopypro is essentially the same): [1656 ms] UsbSnoop - DispatchAny(eb760610) : IRP_MJ_INTERNAL_DEVICE_CONTROL [1656 ms] UsbSnoop - MyDispatchInternalIOCTL(eb761e80) : fdo=81f26030, Irp=81a94 2e8, IRQL=0 [1656 ms] >>> URB 13 going down >>> -- URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE: TransferBufferLength = 00000016 TransferBuffer = 81aac9a8 TransferBufferMDL = 00000000 Index = 00000078 DescriptorType = 00000003 (USB_STRING_DESCRIPTOR_TYPE) LanguageId = 00000409 [1657 ms] UsbSnoop - MyInternalIOCTLCompletion(eb761db0) : fido=00000000, Irp=81 a942e8, Context=81adafa8, IRQL=2 [1657 ms] <<< URB 13 coming back <<< -- URB_FUNCTION_CONTROL_TRANSFER: PipeHandle = 81aebd34 TransferFlags = 00000003 (USBD_TRANSFER_DIRECTION_IN, USBD_SHORT_TRANSF ER_OK) TransferBufferLength = 00000006 TransferBuffer = 81aac9a8 TransferBufferMDL = 81a94268 00000000: 06 03 00 f8 22 c8 UrbLink = 00000000 SetupPacket = 00000000: 80 06 78 03 09 04 16 00 I'm not sure I understand where to find the data for the TransferBuffer "going down". > > This link may give you more insight in reverse engineering a USB device > driver: http://www.toth.demon.co.uk/usb/reverse-0.2.txt Yep, he's on version 0.3. > J. > > > ------------------------------------------------------- > 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 > -- James Klaas The activity of "debugging" or removing bugs from a program ends when a programmer gets tired of doing it, not when all the bugs are removed. ------------------------------------------------------- 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