feat: Clarify/improve handling of "generic" VID/PID values (or other identifiers) #2618
Open
3 tasks done
Labels
topic: code
Related to content of the project itself
topic: documentation
Related to documentation for the project
type: enhancement
Proposed improvement
Describe the request
The pluggable discovery specification and platform specification describe how board definitions can give a board's USB VID and PID, or more generally identifiers. This note is given:
A lot of boards have "semi generic" VID/PIDs that are derived from a serial converter chip (FT232, CH340, CP2102, etc) OR from the microcontroller's own USB support (e.g. the ESP32 "USB Serial/JTAG" peripheral). They can't be used to reliably identify a board but they CAN generally be used to guide which serial port a given board is connected to.
The various platform
boards.txt
files out there are quite inconsistent on how they handle this! Some happily list "generic" VID/PID pairs, some only list truly board-specific VID/PID pairs, others are inconsistent and list some of them but not others (espressif/arduino-esp32#9702 vs espressif/arduino-esp32#9690).Proposal...
boards.txt
file should/not list these semi generic identifiers; if "not", maybe try to clean that uparduino-cli
list ALL matching boards, in order? or at least the FIRST matching board, so the first one can be a generic archetype listing (possibly hidden by default)?Describe the current behavior
When there are multiple known boards that match a given VID/PID,
arduino-cli
(and thus tools that use it) tend to just kind of pick one at random.For example, right now my computer (Ubuntu 24.04) has four USB serial ports (
/dev/ACM0-3
). Three of them are not Arduino boards at all but random devices I'd love to "filter out". The other one is a Seeed XIAO ESP32-C3, with VID:PID 0x303a:0x1001, which is the generic VID:PID for the ESP32-C3's "USB Serial/JTAG" peripheral. A number of boards list that VID/PID, but for whatever reasonarduino-cli board list
picks one of them (not the first, not the last):If I ask for JSON output, I get this, which is a bit confusing, because it SEEMS designed to allow multiple matches to be reported:
Arduino CLI version
(applies to all)
Operating system
N/A
Operating system version
(applies to all)
Additional context
Also see the forum thread "What if two different boards has same PID and VID"...
Issue checklist
The text was updated successfully, but these errors were encountered: