arduino / Arduino

Arduino IDE 1.x
https://www.arduino.cc/en/software
Other
14.07k stars 7.01k forks source link

Make parameter "Serial number" - Not specified (Leonardo) #11898

Closed unicorn79 closed 11 months ago

unicorn79 commented 11 months ago

Hello! I'm using IDE 2.1.0 with Leonardo's board and using the USB HID keyboard and mouse emulation library. I know where i can set the "Serial Number" parameter of my USB HID Device - in PluggableUSB.cpp :

for example - the code below will set the parameter "Serial number" of the device - 01296 virtual uint8_t getShortName(char *name) { name[0] = '0'; name[1] = '1'; name[2] = '2'; name[3] = '9'; name[4] = '6'; return 5; }

Well, but how can I make this parameter "Serial number" are "Not specified"? For example - I analyze real USB HID devices - this parameter it says "Not specified", i.e. the parameter is not set. Example1 Example2

I have tried ending the above line like this -

virtual uint8_t getShortName(char *name) { name[0] = '0'; name[1] = '1'; name[2] = '2'; name[3] = '9'; name[4] = '6'; return 0; }

but it had no effect. - it says "String Descriptor 3 (unable to read).

Has anyone successfully resolved this issue? Thank you!

per1234 commented 11 months ago

Hi @unicorn79. Thanks for your interest in this open source project. This issue tracker is only to be used to report bugs or feature requests specific to the project. This topic is more appropriate for the Arduino Forum. I'm sure we will be able to help you out over there:

https://forum.arduino.cc/