-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usb_hid.set_interface_name #8989
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <halbert@halwitz.org>
Hi @dhalbert, |
a0df0f3
to
52c38c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
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_name
that 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 MIDI
On Windows the device is now seen as:
I have tested it with Raspberry Pico.