Re: Implementing WCID for a bulk function ... can't create String descriptor of 0xEE

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

 



On Mon, Jun 15, 2020 at 01:46:08AM -0700, Andrew P. Lentvorski wrote:
> I've got a bulk transport kernel module composite function.  Nothing
> fancy, just opens the two pipes to a character device just like f_hid.c.
>  It works fine, as far as I can tell.
> 
> Now, I'm trying to implement WCID so that Windows will automatically
> recognize it and attach it to the WinUSB drivers.
> 
> However, I simply cannot figure out how to create a string with an index
> of 0xEE and data of "MSFT100" so that Windows will pick up the device
> and then request the extra features.
> 
> Alternatively, I'm happy to adjust my bcdUSB to flag USB 2.01 or USB 2.1
> and use the BOS system.  However, as there appear to be very few
> examples of that in the Linux codebase (none that I can see--but I'm not
> on latest), I suspect that would be just swapping something that might
> be possible but I'm just missing the path vs something that has a path
> that is wholly untrod.
> 
> WCID References:
> https://github.com/pbatard/libwdi/wiki/WCID-Devices
> https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/microsoft-defined-usb-descriptors
> 
> Any help, advice or pointers would be appreciated.

While I'm certainly not an expert in this area, here's a suggestion: Look 
through the .h and .c files for the composite framework, searching for 
things related to use_os_string, b_vendor_code, bMS_VendorCode, and so 
on.

The subject is a little tricky, because the composite framework is all 
about building a single gadget driver from multiple function drivers.  A 
gadget can have only one string descriptor with index 0xEE (ignoring 
language issues), so somehow the requirements of the various function 
drivers have to be reconciled.

Alan Stern



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

  Powered by Linux