Re: Device enumeration fails
- From: hileyj <hileyj@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 8 May 2008 11:46:15 -0700
After getting ahold of a USB protocol analyzer, I think I got this one
figured out. The device I was trying to enumerate was not responding as
expected when sending a descriptor request in certain situations. When
asking for a descriptor that was an even multiple of the max packet size on
the control endpoint, the device did not want to ACK in the handshake phase.
Instead the host would keep sending and OUT and zero length data packet, but
the device would continually respond with NAK.
I changed the host controller driver to ask for more than the total size of
the descriptor (ie ask for 33 bytes instead of 32) when it was an even
multiple and set the USB_SHORT_TRANSFER_OK flag in the IssueTransfer call in
GetDescriptor. When I did this, the device would return whatever data it had
(32 bytes for the config descriptor), then would issue a zero length data
packet to indicate the data stage was done. When the host sent the
handshake, the device now responded correctly with an ACK. After this
change, the device enumerated and the driver was loaded correctly.
.
- Follow-Ups:
- Re: Device enumeration fails
- From: Paul G. Tobey [eMVP]
- Re: Device enumeration fails
- Prev by Date: Re: Ethernet Throughput Too Slow for Wince 5.0
- Next by Date: Re: Device enumeration fails
- Previous by thread: Ethernet Throughput Too Slow for Wince 5.0
- Next by thread: Re: Device enumeration fails
- Index(es):
Relevant Pages
|