select B115200 through Linux CBAUD bits before TCSETS
read termios back and fail closed unless the effective baud remains 115200
preserve existing raw mode, CS8/CREAD/CLOCAL, VMIN/VTIME, UART paths, and framing
Validation
focused baud transformation and readback tests
git diff --check
added-lines secret/security scan
gofmt -l .
go vet ./...
go test ./...
Linux/arm64 release builds for groundstation and groundstation-display
Piotr will perform the Orange Pi cold-boot acceptance after review: stty -F /dev/ttyS2 -a must report 115200 and valid GS traffic must arrive without manual recovery.
Closes #10
## Summary
- select `B115200` through Linux `CBAUD` bits before `TCSETS`
- read termios back and fail closed unless the effective baud remains 115200
- preserve existing raw mode, CS8/CREAD/CLOCAL, VMIN/VTIME, UART paths, and framing
## Validation
- focused baud transformation and readback tests
- `git diff --check`
- added-lines secret/security scan
- `gofmt -l .`
- `go vet ./...`
- `go test ./...`
- Linux/arm64 release builds for groundstation and groundstation-display
Piotr will perform the Orange Pi cold-boot acceptance after review: `stty -F /dev/ttyS2 -a` must report 115200 and valid GS traffic must arrive without manual recovery.
grzesiu
self-assigned this 2026-10-01 15:27:35 +02:00
Reviewed PR-only commit d3bc369 against base b169a64.
The fix correctly addresses the confirmed cold-boot defect: Linux TCSETS takes the line speed from Cflag & CBAUD, not from Ispeed/Ospeed alone. The change clears inherited speed bits, selects B115200, and verifies the kernel-accepted CBAUD value by reading termios back.
Validation performed:
gofmt PASS
go test ./internal/serialport PASS
go test ./... PASS
go vet ./... PASS
linux/arm64 supervisor build PASS
linux/arm64 display build PASS
The regression test directly starts from inherited B9600, which matches the observed Orange Pi failure.
Hardware acceptance is intentionally left to Piotr — Grzesiu has no physical Orange Pi access. After artifact deployment and cold boot, Piotr should verify:
stty -F /dev/ttyS2 -a # expected: speed 115200 baud
systemctl status groundstation --no-pager
and then confirm valid GX12 frames/video control without manual stty.
## Review: approved in principle — no code blockers
Reviewed PR-only commit `d3bc369` against base `b169a64`.
The fix correctly addresses the confirmed cold-boot defect: Linux `TCSETS` takes the line speed from `Cflag & CBAUD`, not from `Ispeed`/`Ospeed` alone. The change clears inherited speed bits, selects `B115200`, and verifies the kernel-accepted `CBAUD` value by reading termios back.
Validation performed:
```text
gofmt PASS
go test ./internal/serialport PASS
go test ./... PASS
go vet ./... PASS
linux/arm64 supervisor build PASS
linux/arm64 display build PASS
```
The regression test directly starts from inherited `B9600`, which matches the observed Orange Pi failure.
Hardware acceptance is intentionally left to Piotr — Grzesiu has no physical Orange Pi access. After artifact deployment and cold boot, Piotr should verify:
```sh
stty -F /dev/ttyS2 -a # expected: speed 115200 baud
systemctl status groundstation --no-pager
```
and then confirm valid GX12 frames/video control without manual `stty`.
piotr
merged commit d3bc369164 into main2026-10-01 15:35:03 +02:00
piotr
deleted branch issue-10-uart2-race2026-10-01 15:35:03 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #10
Summary
B115200through LinuxCBAUDbits beforeTCSETSValidation
git diff --checkgofmt -l .go vet ./...go test ./...Piotr will perform the Orange Pi cold-boot acceptance after review:
stty -F /dev/ttyS2 -amust report 115200 and valid GS traffic must arrive without manual recovery.Review: approved in principle — no code blockers
Reviewed PR-only commit
d3bc369against baseb169a64.The fix correctly addresses the confirmed cold-boot defect: Linux
TCSETStakes the line speed fromCflag & CBAUD, not fromIspeed/Ospeedalone. The change clears inherited speed bits, selectsB115200, and verifies the kernel-acceptedCBAUDvalue by reading termios back.Validation performed:
The regression test directly starts from inherited
B9600, which matches the observed Orange Pi failure.Hardware acceptance is intentionally left to Piotr — Grzesiu has no physical Orange Pi access. After artifact deployment and cold boot, Piotr should verify:
and then confirm valid GX12 frames/video control without manual
stty.