You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The USB API already provides useful functions for setting VID, PID, etc., but a crucial one I feel it is missing is iInterface, (which it seems most people online refer generically to as "Device Descriptor") instead using the TinyUSB default.
The most immediate and practical example of where this is useful is when acting as a CDC working with WebSerial, where (at least Windows) uses the iInterface value to name the devices to choose from. This allows users to set human-readable, unique names for their devices, making them easier to pick out of the list of all serial devices on your computer. Right now, multiple ESPs acting as CDC devices are indistinguishable from one another, and have a name that isn't relevant to them being an ESP32 ("TinyUSB CDC").
By setting the iInterface the end-user would now see;
While WebSerial does allow for filtering by VID and PID, it is on the web app to implement it, and still only filters to a discrete product, not instances of a product.
Describe the solution you'd like
A simple USB.setDescriptor("This is my device!") or USB.setiInterface("This is my device!"), if possible, would be easily understood from a user standpoint and follow the convention for VID, PID, etc. that the USB API already uses.
The name "iInterface" doesn't lend itself well to a function since it breaks camel casing, and it is also not a well-known term, so the more generic option of Descriptor may be better even if not as correct.
Describe alternatives you've considered
It is currently possible to set a custom iInterface by changing the information in the Arduino package installed on your computer, which is not very convenient. For instance with a CDC device;
Navigate to where Arduino installs packages and find USBCDC.cpp.
Mine: C:\Users\Jim\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\cores\esp32\USBCDC.cpp
Find "tinyusb_add_string_descriptor", and replace "TinyUSB CDC" with your preferred iInterface value.
Save the file, compile and upload code.
Repeat this process any time your packages are updated, you want to change your descriptor, etc.
This also means you cannot publish open-source projects with a custom iInterface without forking and including a custom version of arduino-esp32, or just telling users how to edit their own arduino-esp32.
Additional context
No response
I have checked existing list of Feature requests and the Contribution Guide
I confirm I have checked existing list of Feature requests and Contribution Guide.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Related area
USB Device
Hardware specification
ESP32-S2, ESP32-S3, ESP32-P4
Is your feature request related to a problem?
The USB API already provides useful functions for setting VID, PID, etc., but a crucial one I feel it is missing is iInterface, (which it seems most people online refer generically to as "Device Descriptor") instead using the TinyUSB default.
The most immediate and practical example of where this is useful is when acting as a CDC working with WebSerial, where (at least Windows) uses the iInterface value to name the devices to choose from. This allows users to set human-readable, unique names for their devices, making them easier to pick out of the list of all serial devices on your computer. Right now, multiple ESPs acting as CDC devices are indistinguishable from one another, and have a name that isn't relevant to them being an ESP32 ("TinyUSB CDC").
By setting the iInterface the end-user would now see;
While WebSerial does allow for filtering by VID and PID, it is on the web app to implement it, and still only filters to a discrete product, not instances of a product.
Describe the solution you'd like
A simple USB.setDescriptor("This is my device!") or USB.setiInterface("This is my device!"), if possible, would be easily understood from a user standpoint and follow the convention for VID, PID, etc. that the USB API already uses.
The name "iInterface" doesn't lend itself well to a function since it breaks camel casing, and it is also not a well-known term, so the more generic option of Descriptor may be better even if not as correct.
Describe alternatives you've considered
It is currently possible to set a custom iInterface by changing the information in the Arduino package installed on your computer, which is not very convenient. For instance with a CDC device;
Mine: C:\Users\Jim\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.1\cores\esp32\USBCDC.cpp
This also means you cannot publish open-source projects with a custom iInterface without forking and including a custom version of arduino-esp32, or just telling users how to edit their own arduino-esp32.
Additional context
No response
I have checked existing list of Feature requests and the Contribution Guide
The text was updated successfully, but these errors were encountered: