Re: Device enumeration fails
- From: "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT com>
- Date: Fri, 9 May 2008 09:53:06 -0700
Thanks for the data. It sounds like the device was never tested in the
specific environment you're operating in (CE's USB stuff), and, yes, it's
probably wrong. It's too bad that there isn't a closer match in the
behavior with the desktop, since that's what every device manufacturer is
going to test with.
Paul T.
"hileyj" <hileyj@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AD26512F-D435-43E1-9854-DB7A98AA5EF7@xxxxxxxxxxxxxxxx
The device enumerates on my XP PC alright. The difference in the
enumeration
that makes it work seems to be:
CE:
1. Get 9 bytes of config descriptor. Use this to determine total length
of
interface and endpoint descriptors (32 bytes with my device).
2. Get total length of config descriptor (32).
3. Device sends 4 x 8byte packets then keeps NAKing handshake phase.
PC:
1. Get 9 bytes of config descriptor. Doesn't seem to use this to determine
total length.
2. Just ask for a large amount of config descriptor (255 at first, then
4096
later in the enum process).
3. Device sends 4x8byte packets then a zero length packet, then ACKs
handshake and continues on.
Not sure exactly what the PC is doing during enumeration, I just got this
information from the USB protocol analyzer. I think it's the client
device
that's not behaving correctly in this case, maybe this paragraph from the
USB
spec was interpretted differently:
"A control pipe may have a variable-length data phase in which the host
requests more data than is contained in the specified data structure.
When
all of the data structure is returned to the host, the function should
indicate that the Data stage is ended by returning a packet that is
shorter
than the MaxPacketSize for the
pipe. If the data structure is an exact multiple of wMaxPacketSize for
the
pipe, the function will return a zero-length packet to indicate the end of
the Data stage."
I believe the last sentence should only apply IF you request more than the
structure size, but it seems as though the client device is applying it
even
when you request the exact size.
Jon
"Paul G. Tobey [eMVP]" wrote:
Does the device fail against a PC running XP, say, also? I'm definitely
making a note of what you found for my reference...
Paul T.
.
- References:
- Re: Device enumeration fails
- From: hileyj
- Re: Device enumeration fails
- From: Paul G. Tobey [eMVP]
- Re: Device enumeration fails
- From: hileyj
- Re: Device enumeration fails
- From: Paul G. Tobey [eMVP]
- Re: Device enumeration fails
- From: hileyj
- Re: Device enumeration fails
- Prev by Date: running Microsoft Device Emulator from "Device Emulator Manager"
- Next by Date: Re: How to add WZC?
- Previous by thread: Re: Device enumeration fails
- Next by thread: Wi-Fi Authentication Test...
- Index(es):
Relevant Pages
|