Repository navigation
usb_hid.set_interface_name - #8989
Conversation
dhalbert
left a comment
There was a problem hiding this comment.
Thank you for this! It's been asked for several times.
I've added some comments, especially about storage management.
|
Note the pre-commit failure. If you install pre-commit locally, it will catch these before you commit: https://learn.adafruit.com/building-circuitpython/build-circuitpython#install-pre-commit-3096511 |
Co-authored-by: Dan Halbert <[email protected]>
|
Hi @dhalbert, |
a0df0f3 to
52c38c8
Compare
dhalbert
left a comment
There was a problem hiding this comment.
Thank you for this! It's been requested a number of times.
Tested on Trinket M0
|
this wouldnt allow to have multiple deviced having different names right ? |
|
@MariuszCwikla you think we could do something with the pid and vid some how to make devices unique for local machine |
|
https://github.com/MariuszCwikla/circuitpython/blob/52c38c8914b3395b3a1e348ed80fd3635e10031d/supervisor/usb.h#L60 |
|
No, there is only one VID/PID, becuase there is only one (composite) device presented. |
i found it in mpconfigboard.mk of my board thank you |
|
You can change the VID/PID in boot.py if you want: https://docs.circuitpython.org/en/latest/shared-bindings/supervisor/index.html#supervisor.set_usb_identification |
|
thanks a lot Dan i was already almost done making custom builds in github ci.. my solution this solved it for me now i got unique pid and vid and name in my regex editor |
|
Yes, you should assign your VID/PID like in above example. |

By default on Windows HID device is seen as
CircuitPython HID, see also #5445This PR adds new method
usb_hid.set_interface_namethat provides means to change the name of USB HID interface.Example:
$ sudo lsusb -vd 239A:80F4 | grep iInterface iInterface 4 CircuitPython CDC control iInterface 5 CircuitPython CDC data iInterface 6 CircuitPython Mass Storage iInterface 7 My HID device iInterface 9 CircuitPython Audio iInterface 8 CircuitPython MIDIOn Windows the device is now seen as:
I have tested it with Raspberry Pico.