2021-05-04 02:05 AM
Hello,
is there any way to set the user descriptor string on the USB CDC device?
In the HAL library, I found some functions related to descriptor strings, but their type is "get" and I did not find a corresponding "set" functions.
Solved! Go to Solution.
2021-05-04 08:21 AM
Descriptors are found within "usb_desc.c" when generated by CubeMX. Not sure what "user descriptor string" is referring to in particular though.
2021-05-04 03:46 AM
USB string descriptors are not writable from host side. So, no set request.
2021-05-04 05:03 AM
We don't understand here. I want to set the descriptor through the program in the STM device and read it with the program in Windows. We use a similar thing in our company with FTDI VCP ICs and I have to replace the external USB VCP IC with the internal USB VCP in the STM.
2021-05-04 08:21 AM
Descriptors are found within "usb_desc.c" when generated by CubeMX. Not sure what "user descriptor string" is referring to in particular though.
2021-05-04 12:18 PM
Thank you, USBD_PRODUCT_STRING_FS is visible in the Device manager as some parameter (I don't know their english name). This can be usable. Now i must find how it read in the windows app.
2021-05-04 01:39 PM
> USB string descriptors are not writable from host side. So, no set request.
It may sound surprising, but yes, they are. See USB2.0, 9.4.8 Set Descriptor. String descriptors are one of the few which are allowed to set.
This request is optional, though, and its implementation is probably extremely rare on both device and host side.
JW