Page 1 of 1

USB vendor class with Microsoft OS descriptor

Posted: Wed Nov 03, 2021 10:31 am
by chris_zou
In the current SDK, it only supports CDC serial class.
I would like to enable USB vendor class with Microsoft descriptor.
The use case is to make ESP32S3 appear as WinUSB device so the device can send large data to PC using bulk transfer.

So far setup always stop with the following steps and in device manager it appears not able to load driver
1. vendord_reset
2. tud_descriptor_device_cb --> call back for device descriptor (device class/subclass/protocol all set to 0)
3. tud_descriptor_configuration_cb --> call back for configuration descriptor (1 configuration with 1 interface, 2 endpoints, interface class is vendor 0xFF)
4. tud_descriptor_string_cb --> callback function to get string for index 3 (serial number) langid 1033
5. setup stage 0 --> request type vendor, value 0, index 4, data len 16
6. setup stage 1 --> handled by tinyusb
7. setup stage 2 --> handled by tinyusb
8. tud_descriptor_string_cb callback function to get string for index 0 langid 0

After the above steps, Windows PC does not send any packet anymore.
Can anyone advise if anything could be wrong?
And if there is any example for USB vendor class with Microsoft descriptor?
(just need single interface with 2 end points for bulk data transfer)

Any help would be appreciated.

Re: USB vendor class with Microsoft OS descriptor

Posted: Wed Nov 03, 2021 3:42 pm
by chegewara

Re: USB vendor class with Microsoft OS descriptor

Posted: Thu Nov 04, 2021 12:53 am
by chris_zou
Thanks for the prompt response with example.
I have fixed the issue which is due to a simple mistake (wIndex value for enum value for compat ID and properties are wrongly defined).

Re: USB vendor class with Microsoft OS descriptor

Posted: Mon Nov 07, 2022 2:31 am
by chenkejin
Hello, is it possible to provide a demo? I would like to implement a similar idea, but at the moment I have no clue.