USB vendor class with Microsoft OS descriptor

chris_zou
Posts: 7
Joined: Tue Nov 02, 2021 1:59 am

USB vendor class with Microsoft OS descriptor

Postby chris_zou » Wed Nov 03, 2021 10:31 am

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.

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: USB vendor class with Microsoft OS descriptor

Postby chegewara » Wed Nov 03, 2021 3:42 pm


chris_zou
Posts: 7
Joined: Tue Nov 02, 2021 1:59 am

Re: USB vendor class with Microsoft OS descriptor

Postby chris_zou » Thu Nov 04, 2021 12:53 am

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).

chenkejin
Posts: 11
Joined: Sun Aug 14, 2022 3:38 pm

Re: USB vendor class with Microsoft OS descriptor

Postby chenkejin » Mon Nov 07, 2022 2:31 am

Hello, is it possible to provide a demo? I would like to implement a similar idea, but at the moment I have no clue.

Who is online

Users browsing this forum: Bing [Bot] and 167 guests