summaryrefslogtreecommitdiff
path: root/stacks/tncs/pktnc2-boot-wait.sh
diff options
context:
space:
mode:
authorinfo@mode42.com <info@mode42.com>2026-08-07 18:25:13 +0000
committerinfo@mode42.com <info@mode42.com>2026-08-07 18:25:13 +0000
commit04d965d67a7264a1c7c211494aebda1953df7603 (patch)
tree0ebd700a6e219f84a26a656f4bee8778bc75da7b /stacks/tncs/pktnc2-boot-wait.sh
Initial push
Diffstat (limited to 'stacks/tncs/pktnc2-boot-wait.sh')
-rwxr-xr-xstacks/tncs/pktnc2-boot-wait.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/stacks/tncs/pktnc2-boot-wait.sh b/stacks/tncs/pktnc2-boot-wait.sh
new file mode 100755
index 0000000..965fac8
--- /dev/null
+++ b/stacks/tncs/pktnc2-boot-wait.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+# PK-TNC2 boot-wait — TheFirmware TNC-2 class, typically 9600 8N1
+#
+# Software recovery (no power cycle):
+# ./pktnc2-boot-wait.sh --recover-only
+# Rescue (DTR + power cycle while script runs):
+# ./pktnc2-boot-wait.sh
+set -euo pipefail
+ROOT="$(cd "$(dirname "$0")" && pwd)"
+# shellcheck source=load-serial-env.sh
+source "${ROOT}/load-serial-env.sh"
+load_serial_env pktnc2 "${ROOT}" || true
+apply_pktnc2_env
+if [[ -n "${SERIAL_ENV_FILE:-}" ]]; then
+ echo "Using serial env: ${SERIAL_ENV_FILE}" >&2
+else
+ echo "WARN: no pktnc2-serial.env found — using ${TNC_DEV} ${TNC_BAUD} ${TNC_LINE}" >&2
+fi
+exec python3 "${ROOT}/tnc2c-boot-wait.py" "${TNC_DEV}" --baud "${TNC_BAUD}" --line "${TNC_LINE}" "$@"
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com