From fff16a85c4df29357c55b29887036deb47779863 Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Wed, 30 Sep 2026 17:39:32 +0000 Subject: [PATCH] uart-console: document the venv interpreter needed under sudo Co-Authored-By: Claude Opus 5 --- scripts/uart-console.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/uart-console.py b/scripts/uart-console.py index 8a46e8d..69db5c8 100755 --- a/scripts/uart-console.py +++ b/scripts/uart-console.py @@ -10,14 +10,16 @@ The bring-up diagnostics (w5100_selftest / w5100_udptest / w5100_regdump) just stream a status line on the same port, so this works for those too. Usage: - sudo ./scripts/uart-console.py # /dev/ttyUSB1 @ 115200 + sudo /opt/venv/bin/python3 scripts/uart-console.py # /dev/ttyUSB1 @ 115200 sudo ./scripts/uart-console.py /dev/ttyUSB0 115200 ./scripts/uart-console.py --send "udp broadcast hi" # one-shot, no tty ./scripts/uart-console.py --read 5 # just dump 5s of output Channel A of the FT2232H is the MPSSE/iceprog port; the UART is channel B, which is normally the SECOND ttyUSB (…USB1). Needs read/write on the device node — -run under sudo, or add yourself to the port's group. +run under sudo, or add yourself to the port's group. In the devcontainer +pyserial lives in /opt/venv, which plain `sudo python3` does NOT see — invoke +`sudo /opt/venv/bin/python3` explicitly or you just get "needs pyserial". Quit the interactive console with Ctrl-] (or Ctrl-C). """