feat(board): surface USB vid/pid and add suggest_fqbn - #29
Merged
Conversation
Boards whose USB VID/PID appear in no boards.txt (most ESP32-S3 devkits)
can NEVER be auto-identified by arduino-cli - the port shows
identified:false and the only path forward is an explicit FQBN, which
during the first hardware session meant grepping boards.txt by hand. There
was no tool to escape that dead end.
- list_connected, arduino_context connected_boards and arduino_serial
list_ports now include each port's USB vid/pid (and serial_number on
list_connected) from the port properties arduino-cli already reports.
- New arduino_board action suggest_fqbn {name?, port?}:
- The port's VID is looked up in a small vendor table. Native vendors
(Espressif 303a, Arduino 2341, Raspberry Pi 2e8a) yield family FQBN
candidates; bridge chips (WCH CH34x, CP210x, FTDI) are honestly
labeled "identifies the adapter, not the MCU - identify by name".
- Names are fuzzy-matched over installed boards and the board index,
with fused-token handling ("esp32 s3" matches "ESP32S3") and a
filler-token rule so the generic Dev Module outranks specialized
boards (Box, XIAO, ...) for a generic query.
- arduino-cli hides FQBNs for boards on not-installed platforms (they
come back with fqbn "") - those candidates are kept, carry the
platform id from packageId {vendorId, arch}, and drive
core_to_install plus a hint naming the exact install_core call.
Deprecated platforms are skipped.
Verified on hardware and index: COM6 reports vid 0x1A86/pid 0x55D3
(CH343); suggest_fqbn on that bridge port alone returns the honest
adapter-not-MCU explanation with no fake candidates; port+name "esp32 s3"
resolves to esp32:esp32:esp32s3 (ESP32S3 Dev Module) ranked above
S3-Box/XIAO; "raspberry pi pico" (platform not installed, fqbn hidden)
returns core_to_install arduino:mbed_rp2040 with a re-run hint.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fifth of the v0.6.0 series (pain point 5: unidentifiable boards are a dead end requiring manual boards.txt archaeology).
What changed
USB identity everywhere.
list_connected,arduino_context, andarduino_serial list_portsinclude each port'svid/pid(+ serial number).suggest_fqbn {name?, port?}— escapes the dead end:fqbn: "") — those candidates are kept, carry the platform id frompackageId, and producecore_to_install+ a hint naming the exactinstall_corecall. Deprecated platforms skipped.Verified (hardware + index)
0x1A86/0x55D3(CH343) with serial number"esp32 s3"→esp32:esp32:esp32s3(Dev Module) ranked above S3-Box/XIAO"raspberry pi pico"(platform not installed → hidden FQBN) →core_to_install: arduino:mbed_rp2040with re-run hintTesting found and fixed three real bugs before merge: empty-FQBN rows being dropped,
packageIdshape ({vendorId, arch}, not{id}), and a hint that printedfqbn "null".🤖 Generated with Claude Code
EOF