mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
et-mode - Added support for vanilla packet digipeating
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 1 November 2024
|
||||
# Updated : 7 November 2024
|
||||
# Updated : 8 November 2024
|
||||
# Purpose : Wrapper script for starting Dire Wolf with PnP support
|
||||
#
|
||||
# Preconditions:
|
||||
@@ -17,12 +17,13 @@ DIREWOLF_CONF_FILE=${ET_HOME}/conf/template.d/packet/direwolf.conf
|
||||
usage() {
|
||||
echo "usage: $(basename $0) <command> <type>"
|
||||
echo " <command>"
|
||||
echo " start - Start Dire Wolf in selected mode"
|
||||
echo " update-config - Update configuration for selected mode"
|
||||
echo " start - Start Dire Wolf in selected mode"
|
||||
echo " update-config - Update configuration for selected mode"
|
||||
echo ""
|
||||
echo " <type>"
|
||||
echo " digipeater - Run in RF-only digipeater mode"
|
||||
echo " simple - Run in simple packet mode"
|
||||
echo " aprs-digipeater - Run in RF-only APRS digipeater mode"
|
||||
echo " packet-digipeater - Run in RF-only packet digipeater mode"
|
||||
echo " simple - Run in simple packet mode"
|
||||
}
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
@@ -32,7 +33,10 @@ fi
|
||||
|
||||
MODE=$2
|
||||
case "${MODE}" in
|
||||
digipeater)
|
||||
aprs-digipeater)
|
||||
DIREWOLF_TEMPLATE_CONF_FILE="${ET_HOME}/conf/template.d/packet/direwolf.${MODE}.conf"
|
||||
;;
|
||||
packet-digipeater)
|
||||
DIREWOLF_TEMPLATE_CONF_FILE="${ET_HOME}/conf/template.d/packet/direwolf.${MODE}.conf"
|
||||
;;
|
||||
simple)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 6 November 2024
|
||||
# Updated : 7 November 2024
|
||||
# Updated : 8 November 2024
|
||||
# Purpose : Configures the system for a specific mode of operation
|
||||
|
||||
# Use a simple text file to save the state of the last mode selected
|
||||
@@ -12,17 +12,19 @@ MODE_STATUS_FILE="${HOME}/.config/emcomm-tools/et-mode"
|
||||
MODE_ID_NONE="none"
|
||||
MODE_ID_APRS_DIGIPEATER="aprs-digipeater"
|
||||
MODE_ID_APRS_CLIENT="aprs-client"
|
||||
MODE_ID_PACKET_DIGIPEATER="packet-digipeater"
|
||||
MODE_ID_WINLINK_ARDOP="winlink-ardop"
|
||||
MODE_ID_WINLINK_PACKET="winlink-packet"
|
||||
|
||||
# 1. Attempt to stop all EmComm Tools services regardless if they are running.
|
||||
# 2. Stop the applications first, then the modems
|
||||
# 2. Stop the applications first, then the modems.
|
||||
stop_all_services() {
|
||||
systemctl --user stop et-service-winlink-ardop
|
||||
systemctl --user stop et-service-winlink-packet
|
||||
systemctl --user stop et-service-ardop
|
||||
systemctl --user stop et-service-direwolf-simple
|
||||
systemctl --user stop et-service-direwolf-digipeater
|
||||
systemctl --user stop et-service-direwolf-aprs-digipeater
|
||||
systemctl --user stop et-service-direwolf-packet-digipeater
|
||||
}
|
||||
|
||||
exit_on_service_failure() {
|
||||
@@ -69,11 +71,12 @@ options=()
|
||||
options+=("${MODE_ID_NONE}" "No mode selected")
|
||||
options+=("${MODE_ID_APRS_CLIENT}" "APRS Client (YAAC)")
|
||||
options+=("${MODE_ID_APRS_DIGIPEATER}" "APRS Digipeater")
|
||||
options+=("${MODE_ID_PACKET_DIGIPEATER}" "Packet Digipeater")
|
||||
options+=("${MODE_ID_WINLINK_ARDOP}" "Winlink ARDOP")
|
||||
options+=("${MODE_ID_WINLINK_PACKET}" "Winlink Packet")
|
||||
|
||||
# Prompt user for option and save exit status
|
||||
SELECTED_MODE=$(dialog --clear --menu "Select a mode:" 30 40 10 "${options[@]}" 3>&1 1>&2 2>&3)
|
||||
SELECTED_MODE=$(dialog --clear --menu "Select a mode:" 15 50 10 "${options[@]}" 3>&1 1>&2 2>&3)
|
||||
exit_status=$?
|
||||
|
||||
tput sgr 0 && clear
|
||||
@@ -89,13 +92,17 @@ if [ $exit_status -eq 0 ]; then
|
||||
et-log "No mode selected"
|
||||
;;
|
||||
${MODE_ID_APRS_DIGIPEATER})
|
||||
systemctl --user start et-service-direwolf-digipeater
|
||||
systemctl --user start et-service-direwolf-aprs-digipeater
|
||||
et-log "APRS digipeater now running."
|
||||
;;
|
||||
${MODE_ID_APRS_CLIENT})
|
||||
start_and_wait_for_service et-service-direwolf-simple
|
||||
et-yaac start
|
||||
;;
|
||||
${MODE_ID_PACKET_DIGIPEATER})
|
||||
systemctl --user start et-service-direwolf-packet-digipeater
|
||||
et-log "Packet digipeater now running."
|
||||
;;
|
||||
${MODE_ID_WINLINK_ARDOP})
|
||||
start_and_wait_for_service et-service-ardop
|
||||
start_and_wait_for_service et-service-winlink-ardop
|
||||
@@ -112,7 +119,6 @@ if [ $exit_status -eq 0 ]; then
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
else
|
||||
et-log "No mode selected"
|
||||
echo ${MODE_ID_NONE} > ${MODE_STATUS_FILE}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 6 October 2024
|
||||
# Updated : 7 November 2024
|
||||
# Updated : 8 November 2024
|
||||
# Purpose : Utility script for dumping system information
|
||||
|
||||
function usage() {
|
||||
@@ -175,6 +175,7 @@ case $1 in
|
||||
|
||||
MODE_ID_NONE="none"
|
||||
MODE_ID_APRS_DIGIPEATER="aprs-digipeater"
|
||||
MODE_ID_PACKET_DIGIPEATER="packet-digipeater"
|
||||
MODE_ID_APRS_CLIENT="aprs-client"
|
||||
MODE_ID_WINLINK_ARDOP="winlink-ardop"
|
||||
MODE_ID_WINLINK_PACKET="winlink-packet"
|
||||
@@ -190,11 +191,14 @@ case $1 in
|
||||
echo "Run 'et-mode' to set"
|
||||
;;
|
||||
${MODE_ID_APRS_DIGIPEATER})
|
||||
echo "Digipeater"
|
||||
echo "APRS Digipeater"
|
||||
;;
|
||||
${MODE_ID_APRS_CLIENT})
|
||||
echo "APRS"
|
||||
;;
|
||||
${MODE_ID_PACKET_DIGIPEATER})
|
||||
echo "Packet Digipeater"
|
||||
;;
|
||||
${MODE_ID_WINLINK_ARDOP})
|
||||
echo "Winlink ARDOP"
|
||||
;;
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 8 November 2024
|
||||
# Purpose : Dire Wolf template for RF-only packet digipeater operation
|
||||
# A big thanks to Jason KM4ACK for introducing me to CBEACON
|
||||
# as I was about to add linbpq just to support a digipeater
|
||||
|
||||
# Audio settings
|
||||
ADEVICE {{ET_AUDIO_DEVICE}}
|
||||
CHANNEL 0
|
||||
|
||||
# User settings
|
||||
MYCALL {{ET_CALLSIGN}}-2
|
||||
|
||||
# Modem settings
|
||||
MODEM 1200
|
||||
|
||||
# Rig control settings. Do not change this.
|
||||
# EmComm Tools uses Hamlib's rig control daemon for all radio interfaces.
|
||||
PTT RIG 2 localhost:4532
|
||||
|
||||
# Enable ports to allow other applications use Dire Wolf as the packet engine
|
||||
AGWPORT 8000
|
||||
KISSPORT 8001
|
||||
|
||||
CBEACON delay=1 every=30 overlay=S symbol="digi" 28 info="EmComm Tools packet digi" via=WIDE1-1
|
||||
CDIGIPEAT 0 0
|
||||
Reference in New Issue
Block a user