#!/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"