diff --git a/overlay/opt/emcomm-tools/bin/et-direwolf b/overlay/opt/emcomm-tools/bin/et-direwolf index 31c49fb..c9cfbd1 100755 --- a/overlay/opt/emcomm-tools/bin/et-direwolf +++ b/overlay/opt/emcomm-tools/bin/et-direwolf @@ -14,16 +14,36 @@ DIREWOLF_CONF_FILE=${ET_HOME}/conf/template.d/packet/direwolf.conf usage() { - echo "usage: $(basename $0) " - echo " start - Update config and start Dire Wolf" - echo " update-config - Update config" + echo "usage: $(basename $0) " + echo " " + echo " start - Start Dire Wolf in selected mode" + echo " update-config - Update configuration for selected mode" + echo "" + echo " " + echo " digipeater-only - Run in RF-only digipeater mode" + echo " simple-packet - Run in simple packet mode" } -if [ $# -ne 1 ]; then +if [ $# -ne 2 ]; then usage exit 1 fi +MODE=$2 +case "${MODE}" in + digipeater-only) + DIREWOLF_TEMPLATE_CONF_FILE="${ET_HOME}/conf/template.d/packet/direwolf.${MODE}.conf" + ;; + simple-packet) + DIREWOLF_TEMPLATE_CONF_FILE="${ET_HOME}/conf/template.d/packet/direwolf.${MODE}.conf" + ;; + *) + et-log "Can't started Dire Wolf. Mode '${MODE}' not supported" + usage + exit 1 + ;; +esac + notify_user() { notify-send \ -t 5000 \ @@ -47,8 +67,8 @@ start() { update-config () { - DIREWOLF_TEMPLATE_CONF_FILE=${ET_HOME}/conf/template.d/packet/direwolf.simple-packet.conf - + et-log "Attempting to start Dire Wolf in mode: '${MODE}'" + [ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json" CALLSIGN=$(cat ${ET_USER_CONFIG} | jq -r .callsign) diff --git a/overlay/opt/emcomm-tools/conf/template.d/packet/direwolf.digipeater-only.conf b/overlay/opt/emcomm-tools/conf/template.d/packet/direwolf.digipeater-only.conf new file mode 100644 index 0000000..552e5f1 --- /dev/null +++ b/overlay/opt/emcomm-tools/conf/template.d/packet/direwolf.digipeater-only.conf @@ -0,0 +1,27 @@ +# Author : Gaston Gonzalez +# Date : 1 November 2024 +# Purpose : Dire Wolf template for basic RF-only digipeater operation + +# Audio settings +ADEVICE {{ET_AUDIO_DEVICE}} +CHANNEL 0 + +# User settings +MYCALL {{ET_CALLSIGN}}-4 + +# 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 + +# TODO: Replace lat with {{ET_LAT_DECIMAL}} +# TODO: Replace lon with {{ET_LON_DECIMAL}} +PBEACON delay=1 every=30 overlay=S symbol="digi" lat=33.5828 long=-112.1499 power=5 height=16 gain=9 comment="EmComm Tools Digi" via=WIDE1-1 +DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE +IGTXLIMIT 6 10