Re: USB gadget : generic functionfs function has no os_desc while rndis function has, why?

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

 



Thanks for your reply, Krzysztof.  I now understand all the fields.

However, I just realize I can't really extend your example to cover my
need, because your example uses RNDIS where kernel already support OS
descriptor.

In my case I'm preparing my own functionfs-based gadget.  I suppose
somewhere inside my functionfs daemon, I should add OS descriptor
support.  Is that understanding right?  If so, is there any example?

I searched around internet and can't seem to find a single example
where functionfs-based USB gadget supports OS descriptor.  In fact, it
is not even clear to me what kernel interfaces are used for conveying
OS descriptor for functionfs-based function.

Thanks again.  Really appreciate your help.

Jun



On Wed, Feb 7, 2018 at 1:30 AM, Krzysztof Opasiak <k.opasiak@xxxxxxxxxxx> wrote:
>
>
> On 02/07/2018 08:25 AM, Jun Sun wrote:
>>
>> Thanks, Krysztof.
>>
>> I'm trying to follow your example and maybe to massage it into my need.
>>
>> One quick question -
>>
>> In your example, you set vendor code to be 0xBC.  Is this code of any
>> significance?  What values should I use?
>>
>> b_vendor_code = 0xBC,
>
>
> Well... according to "spec"[1]:
>
> "bMS_VendorCode is used to retrieve the associated feature descriptors. The
> vendor defines the format of this field. For further details, see “OS
> Feature Descriptors” later in this paper."
>
> USB complete[2] elaborates this pretty good. But to be totally honest I took
> this value from 3.
>
> So from your perspective this could be any value other than 0;)
>
> Footnotes:
> 1 -
> https://docs.microsoft.com/en-us/windows-hardware/drivers/network/mb-interface-model-supplement
>
> 2 -
> https://books.google.pl/books?id=pkefBgAAQBAJ&pg=PA347&lpg=PA347&dq=bMS_VendorCode+rndis&source=bl&ots=6_hwlTDvwy&sig=WmjSiXX9qvWF5aLBxa8M7xYvDNM&hl=pl&sa=X&ved=0ahUKEwj1kcXzvJPZAhVK16QKHeVuAOMQ6AEIRDAE#v=onepage&q=bMS_VendorCode%20rndis&f=false
>
> 3 - http://doc.hcc-embedded.com/download/attachments/27590911/HCC RNDIS
> Device Class Driver Windows Automatic Installation Guide
> v1.10.pdf?version=1&modificationDate=1507279811000&api=v2
>
>
> Best regards,
> --
> Krzysztof Opasiak
> Samsung R&D Institute Poland
> Samsung Electronics
--
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