Re: Device enumeration fails

Tech-Archive recommends: Fix windows errors by optimizing your registry



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.


.



Relevant Pages

  • Re: Device enumeration fails
    ... Get total length of config descriptor. ... Device sends 4x8byte packets then a zero length packet, ... Not sure exactly what the PC is doing during enumeration, ... requests more data than is contained in the specified data structure. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: OHCI IssueBulkTransfer problem
    ... to send packet when requested. ... David Liao wrote: ... USB OHCI or SetClrearFeature is send out but your function device ignor it. ... //Pack sent before transfer timeout and received and returned ...
    (microsoft.public.windowsce.platbuilder)
  • Re: OHCI IssueBulkTransfer problem
    ... your description, it looks like it is certainly Data Toggle issue, the ... USB OHCI or SetClrearFeature is send out but your function device ignor it. ... //Pack sent before transfer timeout and received and returned ... When the packet that is lost is sent, ...
    (microsoft.public.windowsce.platbuilder)
  • Re: USB test
    ... I'm searching for a PC software that to send commands through a USB ... The 'host', will normally send a packet, with a type, ... then the PC side driver, ... So the problem is that you can't just 'send a command', ...
    (sci.electronics.design)
  • Re: Bug in OHCI2 driver for Windows CE 5.0?
    ... CE's USB stack is not derived from any of the desktop Windows stacks; ... A short packet (i.e., a packet smaller ... I'm in a middle of porting USB device-driver from Windows NT/2k/XP... ... A low-speed device (Contains couple of firmware versions) ...
    (microsoft.public.windowsce.platbuilder)