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
+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