firmware: config-integrity check, fault injection, verified recovery ladder; soak harness

This commit is contained in:
Lars Nolden
2026-09-01 11:20:29 +02:00
parent 26fab7202a
commit e131687264
7 changed files with 191 additions and 5 deletions
Executable
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# Long unattended reliability soak of the repeater firmware (DUT only).
#
# No SDR: this measures firmware-side reliability (TX success, recoveries,
# MCU resets, timing stability) over hours. The RTL-SDR cannot stream that
# long without faulting (docs/HARDWARE.md), and SDR verification of the RF
# is demonstrated separately by hil/run.sh.
#
# Usage: soak.sh [SECONDS]
set -euo pipefail
cd "$(dirname "$0")/.."
DUR=${1:-9000}
PY=./result-py/bin/python3
eval "$(./tools/discover_devices.sh)"
OUT="captures/$(date +%Y-%m-%dT%H-%M-%S)-soak"
mkdir -p "$OUT"
echo "DUT: $DUT_PORT"
echo "duration: ${DUR}s -> $OUT"
$PY hil/dut_cmd.py "$DUT_PORT" --listen 3 \
"set repeat_enabled 1" "set repeat_delay_ms 200" "clear_stats" \
> "$OUT/setup.log" 2>&1
$PY hil/dut_cmd.py "$DUT_PORT" --listen "$DUR" status > "$OUT/serial.log" 2>&1
$PY hil/dut_cmd.py "$DUT_PORT" --listen 5 stats >> "$OUT/serial.log" 2>&1
$PY hil/soak_report.py "$OUT/serial.log" "$DUR" | tee "$OUT/report.txt"
echo "artifacts: $OUT"