Re: reverse-engineering a usb device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kris

> I had a brief ponder over this.
> A couple of years ago I modified & expanded Atmel's original MSD project
> (for SAM7 which is ARM7) to compile under GCC, but since it's been so
> long I'm somewhat fuzzy. I do recall the class USBGenericRequest.
> I can't readily access my project files right now to verify my
> conjecture but by looking at your log, I think your device might be
> using the USBGenericRequest Class to query/report the button press.
>
> IIRC USBGenericRequest can specify which pipe will be used for the data
> transfer, its length/direction, recipient etc.

I'm not sure if I understood completely. I found the code of Atmel's
USB stack and it looks to me that USBGenericRequest is just Atmel's
implementation of creating USB messages. Linux calls them USB Request
Blocks (URB). I don't know what the USB standard calls them, I don't
have access it.

> I do recall that Snoopy didn't log nor display string descriptors et al,
> but I thought it did display what's going on in the control pipe (ie.

Shouldn't string descriptors show up in lsusb -v?

> EP0). If so, see if such requests are used. Is this traffic rate also
> observed when you're mounted to a Linux host ? (I dunno if Snoopy runs

I only logged USB traffic on the windows box so far.
usbsnoop/SnoopyPro are windows only, but I read about ways to monitor
USB under linux using debugfs/usbmon. I'll try that next week and post
the results.

> under Linux, must check that). Else it could be that WIN's standard
> driver somehow was told that it should issue some poll on the control
> pipe, I'd have thought using GET_STATUS in USBGenericRequest...

That would be great. In linux there is a usb_get_status()
drivers/usb/core/message.c which would make very simple to poll the
button. Unfortunately, as you'll see in my recent post to Daniel, no
commands are sent on the control pipe after initialisation.

> Also, it's not clear whether the button poll is when that little WIN
> button app is installed, or whether usbstor.sys itself is doing that ?

Good point, I haven't monitored the device before running the app.
I'll try to do that on a clean box and see if it makes a difference.

Thanks,
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


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux