Skip to content

Auto-detect the board serial port in the live monitor - #67

Merged
georgesleen merged 1 commit into
mainfrom
dev/georgesleen/tui-autodetect-port
Jul 27, 2026
Merged

Auto-detect the board serial port in the live monitor#67
georgesleen merged 1 commit into
mainfrom
dev/georgesleen/tui-autodetect-port

Conversation

@georgesleen

Copy link
Copy Markdown
Collaborator

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).

  • --port now 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).
  • Errors with what it saw (so --port is the escape hatch) when the choice is empty or ambiguous. An explicit --port still wins.
  • find_device_port uses pyserial's list_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).

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>
@georgesleen
georgesleen merged commit 03ba94a into main Jul 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant