|
From: Richard H. <hug...@gm...> - 2015-04-29 09:14:34
|
I'm trying to export an additional vendor class interface descriptor
on a device like this:
/* Interface Descriptor */
0x09+4, /* Size of this descriptor in bytes */
USB_DESCRIPTOR_INTERFACE, /* INTERFACE descriptor type */
1, /* Interface Number */
0, /* Alternate Setting Number */
0, /* Number of endpoints in this intf */
0xff, /* Class code */
0, /* Subclass code */
0, /* Protocol code */
0, /* Interface string index */
'X', 'Y', 'Z', '\0',
i.e. it's a vendor class code, with extra vendor-specific data of
"XYZ\0". I can get find this interface descriptor using
libusb_get_active_config_descriptor() and drilling down the altsetting
and then matching on vendor, subclass and protocol to get the correct
descriptor.
When I read desc->extra it's NULL and desc->extra_length is set to
zero. I kinda assumed they would be "XYZ\0" and 4 as this is the extra
data in the descriptor that can't be parsed. If I'm not supposed to
use ->extra, I don't see any way to get the vendor data out of the
descriptor.
I have libusbx-1.0.19 installed on Fedora 22, and am happy to debug
more or test patches as requried. Ideas welcome, thanks!
Richard
|