summaryrefslogtreecommitdiff
path: root/stacks/tncs/pktnc2-to-hybbx.sh
blob: 0444b5f51a3153e955752d7a96ce9fe43dabd554 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# AX.25 UI frame PK-TNC2 -> HyBBX/TNC2C over the air.
# HyBBX must be running on Unit A (ttyS4). PK-TNC2: boot-wait first.
#
# Usage: ./pktnc2-to-hybbx.sh [message] [src] [dst]
# Default: "CONNECT" CB-0-2 CB-0

set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
# shellcheck source=/dev/null
source "$ROOT/pktnc2-serial.env"

MSG="${1:-CONNECT}"
SRC="${2:-CB-0-2}"
DST="${3:-CB-0}"

if pgrep -x hybbx >/dev/null && fuser -s "$TNC_DEV" 2>/dev/null; then
    echo "WARN: HyBBX may hold ttyS5 - only ttyS4 should be active" >&2
fi

echo "ON-AIR TX: $SRC -> $DST: $MSG"
echo "Radio: both on same MHz (e.g. 27.235 K24), SQ closed before TX"
export TNC2C_DEV="$TNC_DEV" TNC2C_BAUD="$TNC_BAUD" TNC2C_LINE="$TNC_LINE"
exec "$ROOT/tnc2c-send-test.sh" "$MSG" "$SRC" "$DST"
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com