I haven't used SnoopyPro in ages, but IIRC (not sure) you could filter on certain protocols. If so, a lot of the mass storage uses RBC commands (scsi), if you can suppress those, the log would be dramatically reduced I think. Else you would need to wait till enum and all RBC traffic has settled a bit and then start a new log while you press the button. Perhaps you might catch it that way ? I don't seem to recall anything in RBC about reporting events such as button presses. I would expect that an interrupt pipe is used for that. HTH Best Regards, Kris -----Original Message----- From: kernelnewbies-bounce@xxxxxxxxxxxx [mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf Of Christoph Gysin Sent: Friday, 13 February 2009 7:52 AM To: kernelnewbies@xxxxxxxxxxxx Subject: reverse-engineering a usb device I recently got a SanDisk SDDR-189 card reader. It features a small button and comes with a small Windows tool that lets you launch a choosen application. Since there is support in the linux kernel for the button on Maxtor OneTouch harddisk enclosures I figured this would be an interesting task implementing the same for my card reader. All that is needed is to register en event device, figure out when the button was pressed and trigger an event. So I read myself through some introduction to usb and event device drivers under linux and looked at the onetouch.c example. It seems pretty straightforward so far. I now need to figure out how the Windows tool detects the button beeing pressed. I found various docs describing how to reverse engineer usb devices. I attached the device to a Windows box and ran usbsnoop/SnoopyPro to log all traffice to/from the device. Unfortunately, as soon as I plug in the device the log gets flooded with commands to/from the device, making it impossible to single out the command that gets triggered by the button. I don't know anything about the usb-storage class, so my question is: Is it possible to somehow detect (and filter out) all the commands that are used for usb-storage? So that I can reverse engineer what command is needed to query the button? Any other approach to get that button working is also greatly appreciated. I didn't attach the usbsnoop.log because it is huge. If you think it might still be useful let me know and I'll upload it somewhere. Chris -- echo mailto: NOSPAM !#$.'<*>'|sed 's. ..'|tr "<*> !#:2" org@fr33z3 -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ