summaryrefslogtreecommitdiff
path: root/stacks/tncs/tnc2c-rf-tx-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'stacks/tncs/tnc2c-rf-tx-test.sh')
-rwxr-xr-xstacks/tncs/tnc2c-rf-tx-test.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/stacks/tncs/tnc2c-rf-tx-test.sh b/stacks/tncs/tnc2c-rf-tx-test.sh
new file mode 100755
index 0000000..fc23eff
--- /dev/null
+++ b/stacks/tncs/tnc2c-rf-tx-test.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+# Send N AX.25 UI frames via KISS (HyBBX must be stopped).
+# Usage: ./tnc2c-rf-tx-test.sh [count] [message-prefix] [src] [dst]
+# Example (root): pkill hybbx; ./tnc2c-rf-tx-test.sh 3 "TX test" CB-0 QST
+
+set -euo pipefail
+
+COUNT="${1:-3}"
+PREFIX="${2:-TX test}"
+SRC="${3:-CB-0}"
+DST="${4:-QST}"
+GAP="${TNC2C_TX_GAP:-8}"
+ROOT="$(cd "$(dirname "$0")" && pwd)"
+
+if pgrep -x hybbx >/dev/null 2>&1; then
+ echo "ERROR: hybbx is running - as root: pkill hybbx" >&2
+ exit 1
+fi
+
+echo "RF TX: ${COUNT}x ${SRC} -> ${DST}, ${GAP}s gap (SQ closed, CD off)"
+for i in $(seq 1 "$COUNT"); do
+ echo "=== SEND ${i}/${COUNT} $(date +%H:%M:%S) ==="
+ "$ROOT/tnc2c-send-test.sh" "${PREFIX} ${i}/${COUNT}" "$SRC" "$DST"
+ if [[ "$i" -lt "$COUNT" ]]; then
+ sleep "$GAP"
+ fi
+done
+echo "Done - check PTT LED / modem tone on radio."
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com