Re: Location of HUB USB Report Descriptors?

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

 



On Thu, 14 Feb 2019, Simon Wood wrote:

> On Thu, February 14, 2019 9:42 am, Greg KH wrote:
> 
> > That's because Android is using toybox's version of 'lsusb'.  I
> > recommend using the real version if you need this information.
> 
> I would if I could, I do not control the BSP for this hardware :-(
> 
> >> I have found the 'descriptors' file for the USB device under the '/sys'
> >>  interface, however this does not appear to contain the HUB specific
> >> details.
> >
> > Really?  It should, why does it not contain that information?  That's a
> > binary file that lists the USB descriptor information.  You are going to
> > have to "parse it by hand".

The "descriptors" file in sysfs contains only the device and config 
descriptors -- that is, the data the device sends in response to 
Get-Device-Descriptor and Get-Config-Descriptor requests.  In does not 
include other things, such as HID or report descriptors or hub 
descriptors.

> Attached is a snap-shot of a (random) hub on Desktop linux.
> 
> The 'HUB descriptor' is not contained within the 'descriptors' file from
> the '/sys' interface, although I suspect that it can be accessed via
> _another_ file within '/sys'.... hopefully someone can point me at it.

No, there is no sysfs file containing the content of the hub 
descriptor.

On the other hand, it's not too hard to write a program to retrieve the 
hub descriptor from a hub via usbfs or using libusb.  Or you can just 
copy the code in lsusb.

Alan Stern

> Decoding is not hard with the power of the interwebs:
> https://eleccelerator.com/usbdescreqparser/
> 
> 
> The 'descriptors' file from my suspect device (on Android) was attached to
> original post.
> 
> Thanks,
> Simon.




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

  Powered by Linux