On Wed, 16 Aug 2006, t1 wrote:

> After pulling a packit trace from both Linux (fails/usbmon) and Windows 
> (works/usbsnoop), I am a bit lost trying to decode/compare the two. Can 
> you point me to usb documentaion or a program that will help me decode 
> these?

usbmon's output is documented in the kernel source file
Documentation/usb/usbmon.txt. The USB protocol codes are documented in the
USB specification, available from www.usb.org.  I don't know if or where
USB Snoopy is documented, but you can usually figure it out without too
much trouble.

I can get you started on understanding this.

> =+=+=+=+=+=+=+=+=+=+=+=+=+= Linux usbmon =+=+=+=+=+=+=+=+=+=+=+=+=+=+=

Understand that usbmon displays records for all USB transfers to all
devices on the bus.  You care only about your device, which has address
003.  So I'll omit all the other lines.

The first part is boilerplate, enumerating the device.  It's very similar
in the usbmon log and the USB Snoopy log.  For instance, compare the
values listed on the first line here with the values under "Setup Packet"
for "URB 1 coming back".

> f2f93e40 2040165860 S Ci:003:00 s 80 06 0100 0000 0012 18 <
> f2f93e40 2040167774 C Ci:003:00 0 18 = 12011001 00000010 30086100 
> 00010102 0501
> f2f93e40 2040167787 S Ci:003:00 s 80 06 0200 0000 0009 9 <
> f2f93e40 2040170773 C Ci:003:00 0 9 = 09022e00 010100c0 fa
> f2f93e40 2040170783 S Ci:003:00 s 80 06 0200 0000 002e 46 <
> f2f93e40 2040173772 C Ci:003:00 0 46 = 09022e00 010100c0 fa090400 
> 0004ff00 00000705 81024000 0a070502 02400000
> f2f93e40 2040173785 S Ci:003:00 s 80 06 0300 0000 00ff 255 <
> f2f93e40 2040176772 C Ci:003:00 0 4 = 04030904
> f2f93e40 2040176783 S Ci:003:00 s 80 06 0302 0409 00ff 255 <
> f2f93e40 2040179775 C Ci:003:00 0 28 = 1c035000 61006c00 6d002000 
> 48006100 6e006400 68006500 6c006400
> f2f93e40 2040179786 S Ci:003:00 s 80 06 0301 0409 00ff 255 <
> f2f93e40 2040182777 C Ci:003:00 0 22 = 16035000 61006c00 6d002c00 
> 20004900 6e006300 2e00
> f2f93e40 2040182792 S Ci:003:00 s 80 06 0305 0409 00ff 255 <
> f2f93e40 2040185775 C Ci:003:00 0 30 = 1e035000 61006c00 6d005300 
> 4e003100 32003300 34003500 36003700 3800
> f2f93e40 2040185834 S Ci:003:00 s 80 00 0000 0000 0002 2 <
> f2f93e40 2040188774 C Ci:003:00 0 2 = 0100
> f2f93e40 2040188791 S Co:003:00 s 00 09 0001 0000 0000 0
> f2f93e40 2040191772 C Co:003:00 0 0

The stuff above retrieves the device descriptor, the configuration
descriptor, several string descriptors, and the device status.  Finally
it issues a Set Config request for configuration 1.  It corresponds to URBs
1 - 3 in the Snoopy log.

> f2f93e40 2040191817 S Ci:003:00 s c2 04 0000 0000 0014 20 <
> f2f93e40 2040194775 C Ci:003:00 0 20 = 01010000 4c736672 00670000 
> 00000000 01010000

This is some vendor-specific request.  I don't know what it does, but it
corresponds exactly to URB 4 in the Snoopy log.

> f2f93e40 2040511813 S Bi:003:01 -115 64 <
> f2f93e40 2040512726 C Bi:003:01 -2 0
> f41003a0 2040512831 S Ci:003:00 s c2 02 0000 0000 0012 18 <
> f41003a0 2040810683 C Ci:003:00 -104 0
> f76f2840 2040813693 S Bi:003:06 -115 64 <
> f76f2840 2040814680 C Bi:003:06 -2 0
> f41003a0 2040814737 S Ci:003:00 s c2 02 0000 0000 0012 18 <
> f41003a0 2041114637 C Ci:003:00 -104 0
> 
> Here I open the ttyUSB0 device and send "ATE0\r" and "$\0\0\0", but the 
> palm crashed.
> f2f93e40 2078234200 S Bi:003:01 -115 64 <
> 
> f59ddf40 2122353248 S Bo:003:02 -115 5 = 41544530 0d
> f2f93640 2122353266 S Bo:003:02 -115 1 = 24
> f59ddf40 2122353452 C Bo:003:02 0 5 >
> f2f93640 2122353458 C Bo:003:02 0 1 >
> f2f93e40 2122551423 C Bi:003:01 -110 0

I don't know what's going on here, but it's clear that the driver is
trying to send data out through endpoint 2.  In the Snoopy log, on the
other hand, Windows sends data out through endpoint 7, starting with
URB 5.  And it doesn't send anything like the two vendor specific requests
above.

HTH,

Alan Stern


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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