Interactive serial module#282
Open
llogen wants to merge 3 commits into
Open
Conversation
llogen
force-pushed
the
feat/extendSerialModule
branch
2 times, most recently
from
February 18, 2026 10:07
9f7f3e0 to
87a4da9
Compare
llogen
force-pushed
the
feat/extendSerialModule
branch
from
February 22, 2026 18:14
e1567e2 to
af2dd18
Compare
llogen
force-pushed
the
feat/extendSerialModule
branch
from
February 22, 2026 18:42
176f7c1 to
02f20d0
Compare
llogen
force-pushed
the
feat/extendSerialModule
branch
from
February 22, 2026 18:57
02f20d0 to
a68f4a1
Compare
llogen
force-pushed
the
feat/extendSerialModule
branch
3 times, most recently
from
June 8, 2026 08:55
8de5449 to
8db5226
Compare
llogen
marked this pull request as ready for review
June 8, 2026 08:56
llogen
force-pushed
the
feat/extendSerialModule
branch
2 times, most recently
from
June 22, 2026 11:50
d43b406 to
fafae49
Compare
llogen
force-pushed
the
feat/extendSerialModule
branch
3 times, most recently
from
July 17, 2026 11:07
c419eab to
37d4bb7
Compare
llogen
force-pushed
the
feat/extendSerialModule
branch
from
July 24, 2026 09:06
37d4bb7 to
0f28b63
Compare
The serial module gains three modes - interactive pass-through, expect (wait for a regex then exit) and expect-send pairs that auto-reply to prompts - and strips non-SGR terminal sequences from DUT output so they cannot corrupt the client terminal. If the serial device disappears mid-session (e.g. an FTDI chip that powers down with the DUT) it waits for the device to reappear and reconnects automatically. (#119) Signed-off-by: llogen <christoph.lange@blindspot.software>
The agent now closes the module stdin channel during session teardown, so a module blocked reading client input (such as the serial console) unblocks via EOF and the command returns instead of hanging. Signed-off-by: llogen <christoph.lange@blindspot.software>
The client now switches the terminal to raw mode during a run and forwards every keystroke - including Ctrl-C, Ctrl-D and Ctrl-Z - straight to the DUT. Press Ctrl-A then x to quit the session. Raw mode is build-tagged for Linux and macOS, with a no-op fallback on other platforms so the client still builds everywhere. (#121) Signed-off-by: llogen <christoph.lange@blindspot.software>
llogen
force-pushed
the
feat/extendSerialModule
branch
from
July 24, 2026 09:44
0f28b63 to
2feba24
Compare
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.
Bidirectional serial console to the DUT. Resolves #121 and #119.
Extends the serial module — which already streams output (monitor) and runs scripted
expect/sendsteps on main — with a live, hand-driven console, and makes sessions resilient to the device dropping out.Client (
cmds/dutctl)Switches the terminal to raw mode for an interactive run, so every keystroke — including Ctrl-C, Ctrl-D and Ctrl-Z — streams straight to the DUT instead of being handled locally. Quit the session with Ctrl-A then x.
Raw mode is armed lazily: only when the run is interactive (invoked without arguments) and the agent actually streams console output — so scripted and one-shot commands (power, flash) leave the terminal untouched. Implemented for Linux and macOS; other platforms (incl. Windows) build with a no-op, line-buffered fallback.
Module (
pkg/module/serial)-i) — bridges the client console to the serial port in both directions, until the session is cancelled or-telapses.Agent (
internal/dutagent)Closes the module's stdin channel on session teardown, so a module blocked reading client input (like the serial console) unblocks via EOF and the command returns cleanly instead of hanging.