Date: Fri, 08 Oct 2004 14:21:30 -0700

The current scheme (the "Linux" scheme) goes like this:

        Reset the device
        Set endpoint 0 maxpacket to {8, 8, 64} for {low, full, high}-speed
        Send SET-ADDRESS (an 8-byte SETUP with no message body)
        Send 8-byte GET-DEVICE-DESCRIPTOR request; the bMaxPacketSize0
                value is stored in the eighth byte of the descriptor
        Set endpoint 0 maxpacket to the correct value
        Send full 18-byte GET-DEVICE-DESCRIPTOR request

There are a couple of loops and retries in there that I've left out, and
the entire sequence is repeated if it fails.

The new scheme (the "Windows" scheme) is the one used by current Microsoft
operating systems (and therefore supported by virtually every USB device,
one would hope):

        Reset the device
        Set endpoint 0 maxpacket to {8, 64, 64} for {low, full, high}-speed
        Send 64-byte GET-DEVICE-DESCRIPTOR request.  Since the
                descriptor is only 18 bytes long, this will terminate
                with a short packet.  But if the maxpacket size is 8
                or 16 the device may be waiting to transmit some more.
        Reset the device again (clears out any data the device is waiting
                to send)
        Set endpoint 0 maxpacket to the correct value
        Send SET-ADDRESS
        Send full 18-byte GET-DEVICE-DESCRIPTOR request

Hi Alan, excellent summary of the Windows scheme.

Other possibilities are to try the Windows scheme twice, then the Linux scheme twice, or to alternate. Any suggestions?

Alan Stern



I think you should do the windows type enum first.

I have done a couple of usb devices and the problem is that a usb_reset does not do a full hardware reset on most devices, it is kind of just another message arriving on the USB data lines. So it is very easy to not get the entire state of a device completely reset after getting that reset message. And such devices will have a problem responding to an untested reset path (the only available test host software up until recently was various flavors of Windows, so that will be the most tested path for devices).

my $.02

Regards ~Steve

_________________________________________________________________
Get ready for school! Find articles, homework help and more in the Back to School Guide! http://special.msn.com/network/04backtoschool.armx




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to