Auto-detect the board serial port in the live monitor - #67
Merged
Conversation
The monitor defaulted to /dev/ttyACM0, which is usually the CMSIS-DAP debug probe's UART bridge when the probe and board are both plugged in -- so the live TUI opened the wrong device and showed no telemetry. Default --port to auto-detect instead: scan USB serial ports for the Raspberry Pi vendor id and pick the sole non-probe match, erroring with what it saw (so --port is the escape hatch) when the choice is empty or ambiguous. An explicit --port still wins. 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.
The live monitor defaulted to
/dev/ttyACM0, which is usually the CMSIS-DAP debug probe's UART bridge when the probe and board are both plugged in. So the TUI opened the wrong device and showed no telemetry (the "hardware telemetry in the TUI isn't working" report).--portnow defaults to auto-detect: scan USB serial ports for the Raspberry Pi vendor id (0x2e8a) and pick the sole non-probe match, excluding the debug probe's CDC (pid 0x000c).--portis the escape hatch) when the choice is empty or ambiguous. An explicit--portstill wins.find_device_portuses pyserial'slist_ports(portable, no udev), covered by tests for probe-vs-board selection, non-Raspberry ports, and the empty/ambiguous error paths.Verification: 212 sim tests green (4 new).