All USB devices have a pair of 4-digit hexadecimal numbers that uniquely identify a product. The parts are written separated by a ":". The two parts are called the "Vendor ID" (VID) and "Product ID" (PID). A Vendor ID can only be allocated by the USB Implementors Forum (see below) and is not free.
As an example, an Adafruit Feather M0 Express running CircuitPython has the VID:PID 239A:8023. 239A is Adafruit's Vendor ID and 8023 is the Product ID.
Devices that don't use native USB are identified by a unique longer pair of numbers such as 0x0000239A:0x00320001 for the Adafruit Feather ESP32 V2. These two individual parts are called the "Creator ID" and "Creation ID". The Creator/Creation ID system was originated by Adafruit based on the Vendor/Product idea of USB but with longer numbers so that they can be allocated much more freely. This is separate from the USB VID:PID that exists on the USB-serial converter chip that is usually present in such boards.
With a few legacy exceptions, each different hardware product that runs CircuitPython needs a different unique identifier. Furthermore, if a piece of hardware has different operating modes (such as UF2 bootloader, Arduino, CircuitPython), each mode should have a different unique ID.
Here are just a few of the things that need unique identifiers to work properly:
- Applying correct firmware updates
- Device detection in Arduino
- Using correct operating system drivers
- Allowing device access on ChromeOS
- Managing device permissions with udev on Linux
For these reasons, it's not OK to just pick a random 8- or 16-digit number and use it, or to pick a number already used by another device no matter how similar. The numbers must be allocated according to the rules of some authority, so that two incompatible hardware devices never have the same ID.
Ultimately, the system of Vendor IDs and Product ID is managed by the organization that created the USB specification, the USB Implementors Forum (USB-IF).
If you're a board manufacturer, you should purchase a USB Vendor ID from USB-IF, subject to their terms.
If the board's microcontroller is from Espressif, Raspberry Pi, or Microchip, those manufacturers have their own process for allocating Product IDs. Other chip manufacturers may have similar arrangements.
If the board meets the requirements of Open Source Hardware, you can receive an PID from pid.codes by following their instructions.
At this time, Adafruit does not allocate its PIDs for third party boards.
If your board does not use native USB, such as the original ESP32 chip, then (regardless of whether the board is Open Source Hardware) you can receive a unique identifier from creationid on GitHub.