Change device USB hardware name, manufacturer, etc.?

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
marco02
 
Posts: 3
Joined: Wed Feb 16, 2022 4:54 pm

Change device USB hardware name, manufacturer, etc.?

Post by marco02 »

I don't want it show as a "NeoPixel Trinkey M0" under the USB Bus tree. Can I rename it as "Marco's mouse" for example? I am also trying to change the Manufacturer, Product ID, and Vendor ID values? Is this data editable? I tried altering the info in boot_out.py with no success.

My current boot.py:

Code: Select all

import usb_hid
import storage
import usb_cdc

usb_cdc.disable()   # Disable both serial devices.

storage.disable_usb_drive()

usb_hid.enable((usb_hid.Device.MOUSE,))   # Enable just MOUSE.
Attachments
Screen Shot 2022-02-16 at 7.18.09 PM.png
Screen Shot 2022-02-16 at 7.18.09 PM.png (458.11 KiB) Viewed 140 times

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Change device USB hardware name, manufacturer, etc.?

Post by mikeysklar »

The USB descriptors and vendor IDs are licensed.
You'd have to write your own version of the bootloader with a USB descriptor that identifies it as your device.

To to that, you'd need a USB vendor ID, which costs $5k per year if you're a member of the USB Implementer's Forum, $6k if you aren't:

https://www.usb.org/getting-vendor-id

Vendor IDs are mapped to a database maintained by the USB-IF, and are transmitted numerically. Ours is 293A, for instance:

https://devicehunt.com/view/type/usb/vendor/239A
viewtopic.php?f=19&t=181192&p=881120&hi ... me#p881120

User avatar
danhalbert
 
Posts: 4654
Joined: Tue Aug 08, 2017 12:37 pm

Re: Change device USB hardware name, manufacturer, etc.?

Post by danhalbert »

We currently don't supply a way of changing the device or descriptor names at runtime. This has been requested before, e.g. https://github.com/adafruit/circuitpython/issues/4433.

0x239A is Adafruit's Vendor ID., which is what we paid for. The Product ID is chosen by us from our 16-bit space.

You can change all these at compile time by rebuilding CircuitPython. The places you need to change these things are in the mpconfigboard.mk and .h files for the paritcular board.

Locked
Please be positive and constructive with your questions and comments.

Return to “Trinket ATTiny, Trinket M0”