VARA - Added experimental support for VARA over Winlink. Also addeded support for native AX.25 packet for Bluetooth connected TNCs

This commit is contained in:
Gaston Gonzalez
2025-02-07 02:30:32 -07:00
parent 57b26735da
commit a0e163bb01
8 changed files with 274 additions and 11 deletions
+6 -1
View File
@@ -2,7 +2,7 @@
#
# Author : Gaston Gonzalez
# Date : 12 November 2024
# Updated : 3 February 2025
# Updated : 7 February 2025
# Purpose : Stops all EmComm Tools sound-based services (i.e. modems) and
# amatuer radio applications to ensure a clean start for the next mode.
@@ -18,6 +18,11 @@ stop_all_services() {
systemctl --user stop et-service-direwolf-simple
systemctl --user stop et-service-direwolf-aprs-digipeater
systemctl --user stop et-service-direwolf-packet-digipeater
# Stop VARA with a sledge hammer
pkill et-winlink
pkill et-vara
pkill VARA
}
et-log "Stopping all services"
+55 -3
View File
@@ -2,7 +2,7 @@
#
# Author : Gaston Gonzalez
# Date : 6 November 2024
# Updated : 3 February 2025
# Updated : 5 February 2025
# Purpose : Configures the system for a specific mode of operation
# Use a simple text file to save the state of the last mode selected
@@ -18,6 +18,8 @@ MODE_ID_CHAT_CLIENT="chat-chattervox"
MODE_ID_PACKET_DIGIPEATER="packet-digipeater"
MODE_ID_WINLINK_ARDOP="winlink-ardop"
MODE_ID_WINLINK_PACKET="winlink-packet"
MODE_ID_WINLINK_VARA_HF="winlink-vara-hf"
MODE_ID_WINLINK_VARA_FM="winlink-vara-fm"
# Default to 1200 baud
PACKET_MODE=simple
@@ -66,6 +68,31 @@ start_and_wait_for_service() {
exit_on_service_failure ${systemd_unit_name}
}
start_and_wait_for_vara() {
local vara_cmd="$1"
local elapsed=0
et-log "Starting ${vara_cmd}..."
${vara_cmd} &
et-log "Waiting for ${vara_cmd} to become active..."
while true; do
CHECK_VARA=$(ps -ef | grep "[V]ARA")
if [ $? -eq 0 ]; then
break
fi
sleep "$INTERVAL"
elapsed=$((elapsed + INTERVAL))
if [ "$elapsed" -ge "$TIMEOUT" ]; then
et-log "Timeout reached. ${systemd_unit_name} failed to start."
exit 1
fi
et-log "Waiting for ${vara_cmd} to become active..."
done
}
select_direwolf_mode () {
packet_mode=()
packet_mode+=("simple" "1200 baud (default for VHF/UHF)")
@@ -108,11 +135,20 @@ options+=("${MODE_ID_BBS_CLIENT2}" "BBS Client (QtTermTCP)")
options+=("${MODE_ID_CHAT_CLIENT}" "Chat (chattervox)")
options+=("${MODE_ID_APRS_DIGIPEATER}" "APRS Digipeater")
options+=("${MODE_ID_PACKET_DIGIPEATER}" "Packet Digipeater")
options+=("${MODE_ID_WINLINK_ARDOP}" "Winlink over HF (ARDOP)")
options+=("${MODE_ID_WINLINK_PACKET}" "Winlink over VHF/UHF (AX.25 Packet)")
if [ -e "${HOME}/.wine32/drive_c/VARA FM/VARAFM.exe" ]; then
options+=("${MODE_ID_WINLINK_VARA_FM}" "Winlink over VHF/UHF (VARA FM)")
fi
options+=("${MODE_ID_WINLINK_ARDOP}" "Winlink over HF (ARDOP)")
if [ -e "${HOME}/.wine32/drive_c/VARA/VARA.exe" ]; then
options+=("${MODE_ID_WINLINK_VARA_HF}" "Winlink over HF (VARA HF)")
fi
# Prompt user for option and save exit status
SELECTED_MODE=$(dialog --clear --menu "Select a mode:" 16 65 10 "${options[@]}" 3>&1 1>&2 2>&3)
SELECTED_MODE=$(dialog --clear --menu "Select a mode:" 18 65 10 "${options[@]}" 3>&1 1>&2 2>&3)
exit_status=$?
tput sgr 0 && clear
@@ -173,6 +209,22 @@ if [ $exit_status -eq 0 ]; then
start_and_wait_for_service et-service-winlink-packet
min http://localhost:8080
;;
${MODE_ID_WINLINK_VARA_FM})
dialog --title "User Action Required" --msgbox "VARA FM is not a plug and play mode. You must configure VARA manually." 10 50
tput sgr 0 && clear
start_and_wait_for_vara et-vara-fm
et-winlink start-vara-fm &
sleep 1
min http://localhost:8080 2>/dev/null
;;
${MODE_ID_WINLINK_VARA_HF})
dialog --title "User Action Required" --msgbox "VARA HF is not a plug and play mode. You must configure VARA manually." 10 50
tput sgr 0 && clear
start_and_wait_for_vara et-vara-hf
et-winlink start-vara-hf &
sleep 1
min http://localhost:8080
;;
*)
et-log "Mode ${SELECTED_MODE} not yet supported"
exit 1
+3 -3
View File
@@ -2,7 +2,7 @@
#
# Author : Gaston Gonzalez
# Date : 11 October 2024
# Updated : 3 February 2025
# Updated : 5 February 2025
# Purpose : A script for managaing plug-and-play radios
set -e
@@ -51,8 +51,8 @@ if [ $exit_status -eq 0 ]; then
BLUETOOTH_TNC_CHECK=$(ps -ef | grep "[r]fcomm connect")
if [[ $? -eq 0 ]]; then
et-log "Killing running processes for Bluetooth TNC"
sudo killall kissattach
sudo killall rfcomm
sudo /usr/bin/killall kissattach
sudo /usr/bin/killall rfcomm
fi
printf "%-20s %-10s %-10s\n" "Radio ID" "Vendor" "Model"
+9 -1
View File
@@ -2,7 +2,7 @@
#
# Author : Gaston Gonzalez
# Date : 6 October 2024
# Updated : 17 December 2024
# Updated : 7 February 2025
# Purpose : Utility script for dumping system information
function usage() {
@@ -183,6 +183,8 @@ case $1 in
MODE_ID_APRS_CLIENT="aprs-client"
MODE_ID_WINLINK_ARDOP="winlink-ardop"
MODE_ID_WINLINK_PACKET="winlink-packet"
MODE_ID_WINLINK_VARA_HF="winlink-vara-hf"
MODE_ID_WINLINK_VARA_FM="winlink-vara-fm"
if [ ! -e /dev/et-audio ]; then
echo "Run 'et-mode' to set"
@@ -218,6 +220,12 @@ case $1 in
${MODE_ID_WINLINK_PACKET})
echo "Winlink Packet"
;;
${MODE_ID_WINLINK_VARA_FM})
echo "Winlink VARA FM"
;;
${MODE_ID_WINLINK_VARA_HF})
echo "Winlink VARA HF"
;;
*)
echo "Unknown"
;;
+35 -2
View File
@@ -2,7 +2,7 @@
#
# Author : Gaston Gonzalez
# Date : 4 November 2024
# Updated : 3 February 2025
# Updated : 4 February 2025
# Purpose : Wrapper script for starting YAAC with PnP support
#
# Preconditions:
@@ -24,6 +24,8 @@ usage() {
echo " start-ardop - Start Pat Winlink in ardop mode"
echo " start-packet - Start Pat Winlink in packet mode"
echo " start-native-packet - Start Pat Winlink in native AX.25 packet mode"
echo " start-vara-fm - Start Pat Winlink in VARA FM mode"
echo " start-vara-hf - Start Pat Winlink in VARA HF mode"
}
if [ $# -ne 1 ]; then
@@ -90,6 +92,26 @@ start_native_packet() {
${CMD}
}
start_vara_fm() {
update_config vara-fm
CMD="pat http"
et-log "Starting Pat with: ${CMD}"
${CMD}
}
start_vara_hf() {
update_config vara-hf
CMD="pat http"
et-log "Starting Pat with: ${CMD}"
${CMD}
}
update_config () {
[ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
@@ -113,6 +135,12 @@ update_config () {
native-packet)
PAT_CONF_FILE_TEMPLATE=/opt/emcomm-tools/conf/template.d/winlink/config.ax25-native.json
;;
vara-fm)
PAT_CONF_FILE_TEMPLATE=/opt/emcomm-tools/conf/template.d/winlink/config.vara-fm.json
;;
vara-hf)
PAT_CONF_FILE_TEMPLATE=/opt/emcomm-tools/conf/template.d/winlink/config.vara-hf.json
;;
esac
et-log "Updating Pat configuration file: ${PAT_CONF_FILE}..."
@@ -121,7 +149,6 @@ update_config () {
sed -i "s|{{ET_CALLSIGN}}|${CALLSIGN}|g" ${PAT_CONF_FILE}
sed -i "s|{{ET_WINLINK_PASSWD}}|${WINLINK_PASSWD}|g" ${PAT_CONF_FILE}
sed -i "s|{{ET_GRID}}|${GRID}|g" ${PAT_CONF_FILE}
}
case $1 in
@@ -134,6 +161,12 @@ case $1 in
start-native-packet)
start_native_packet
;;
start-vara-fm)
start_vara_fm
;;
start-vara-hf)
start_vara_hf
;;
*)
echo "Invalid command."
usage