Re: Standard USB Descriptor question

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

 



On Fri, Jan 13, 2017 at 07:24:10PM -0800, bruce m beach wrote:
> Hello everybody
> 
>   I have been stuck for ages trying to figure out something
> in the Standard USB Descriptor during the enumeration. It
> looks like it should should be quite simple but I am not
> getting it because maybe some mind block, maybe becuase the
> documentation is unclear, or maybe because I'm brain-dead.
> Here is the problem:
> 
> I think the host starts out requesting the device descriptor
> This is okay and works no problem. At some point the host
> requests the configuration descriptor and I get stuck. The
> usb 2.0 spec. says:
> 
> "When the host requests the configuration descriptor, all
> related interface and endpoint descriptors are returned"
> 
> How is the host supposed to know how much data is coming in
> or how much data to request until it reads wTotalLength?
> 
> I would assume the host would request the 9 bytes of the
> configuration descriptor, then make subsequent requests to
> get the interfaces and endpoints but for instance in the
> section on the interface descriptor the spec says
> 
> " An interface descriptor is always returned as part of a
> configuration descriptor.
> 
> Again how is this supposed happen if the host is only
> requesting 9 bytes in the configuration descriptor stage

Have you looked at the data on the wire?  The host asks for 9 bytes, and
then it uses the information there to get the "real" size of the
descriptor and then it asks for the full descriptor with all of the
information in it.

hope this helps,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux