From 45a22396421e5f9ff992253588c63b36c351284b Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Thu, 31 Oct 2024 13:07:28 -0700 Subject: [PATCH 1/4] Packet - Initial template for simple AX.25 packet work. This is a WiP --- .../emcomm-tools/conf/template.d/README.md | 1 - .../packet/direwolf.simple-packet.conf | 21 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) delete mode 100644 overlay/opt/emcomm-tools/conf/template.d/README.md create mode 100644 overlay/opt/emcomm-tools/conf/template.d/packet/direwolf.simple-packet.conf diff --git a/overlay/opt/emcomm-tools/conf/template.d/README.md b/overlay/opt/emcomm-tools/conf/template.d/README.md deleted file mode 100644 index 8abce6e..0000000 --- a/overlay/opt/emcomm-tools/conf/template.d/README.md +++ /dev/null @@ -1 +0,0 @@ -Future location for Dire Wolf configuration templates diff --git a/overlay/opt/emcomm-tools/conf/template.d/packet/direwolf.simple-packet.conf b/overlay/opt/emcomm-tools/conf/template.d/packet/direwolf.simple-packet.conf new file mode 100644 index 0000000..d2a6fb2 --- /dev/null +++ b/overlay/opt/emcomm-tools/conf/template.d/packet/direwolf.simple-packet.conf @@ -0,0 +1,21 @@ +# Author : Gaston Gonzalez +# Date : 31 October 2024 +# Purpose : Dire Wolf template for basic packet operation + +# Audio settings +ADEVICE {{ET_AUDIO_DEVICE}} +CHANNEL 0 + +# User settings +MYCALL {{ET_CALLSIGN}} + +# Modem settings +MODEM 1200 + +# EmComm Tools uses Hamlib's rig control daemon for all radio interfaces. +# Do not change this. +PTT RIG 2 localhost:4532 + +# Enable ports to allow other applications use Dire Wolf as the packet engine +AGWPORT 8000 +KISSPORT 8001 From d652b8ae6f6bd3ce0a67302cd0dd0d27a3b82a08 Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Fri, 1 Nov 2024 09:01:39 -0700 Subject: [PATCH 2/4] JS8Call - Updated intial settings based on TTP daily experience: 1) Show only message in band activity window; 2) Show only callsign; last heard; SNR and offset in call activity window; 3) Sort call activity by last replied callsign; 4) Hide waterfall controls --- overlay/etc/skel/.config/JS8Call.ini | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/overlay/etc/skel/.config/JS8Call.ini b/overlay/etc/skel/.config/JS8Call.ini index e49aea2..0a860c9 100644 --- a/overlay/etc/skel/.config/JS8Call.ini +++ b/overlay/etc/skel/.config/JS8Call.ini @@ -1,3 +1,8 @@ +[Common] +ShowColumns=@Variant(\0\0\0\b\0\0\0\x6\0\0\0\x16\0\x63\0\x61\0l\0l\0l\0o\0g\0N\0\x61\0m\0\x65\0\0\0\x1\0\0\0\0\x1c\0\x63\0\x61\0l\0l\0l\0o\0g\0\x43\0o\0m\0m\0\x65\0n\0t\0\0\0\x1\0\0\0\0\xe\0\x63\0\x61\0l\0l\0l\0o\0g\0\0\0\x1\0\0\0\0\x1a\0\x62\0\x61\0n\0\x64\0t\0i\0m\0\x65\0s\0t\0\x61\0m\0p\0\0\0\x1\0\0\0\0\xe\0\x62\0\x61\0n\0\x64\0s\0n\0r\0\0\0\x1\0\0\0\0\x14\0\x62\0\x61\0n\0\x64\0o\0\x66\0\x66\0s\0\x65\0t\0\0\0\x1\0) +SortBy=@Variant(\0\0\0\b\0\0\0\x1\0\0\0\x18\0\x63\0\x61\0l\0l\0\x41\0\x63\0t\0i\0v\0i\0t\0y\0\0\0\n\0\0\0\x18\0\x61\0\x63\0k\0T\0i\0m\0\x65\0s\0t\0\x61\0m\0p) +SubMode=0 + [Configuration] AcceptTCPRequests=true AutoGrid=true @@ -25,3 +30,6 @@ TCPMaxConnections=3 TCPServer=127.0.0.1 TCPServerPort=2442 TxIdleWatchdog=0 + +[WideGraph] +HideControls=true From 5210ebca8a0bd0eca53392c15ae92254443f51d3 Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Fri, 1 Nov 2024 15:00:10 -0700 Subject: [PATCH 3/4] Dire Wolf - Added initial et-direwolf wrapper script. Added initial Dire Wolf template for basic/simple packet operation --- overlay/opt/emcomm-tools/bin/et-direwolf | 114 ++++++++++++++++++ overlay/opt/emcomm-tools/bin/et-js8call | 3 +- .../packet/direwolf.simple-packet.conf | 8 +- scripts/install-emcomm-tools.sh | 6 +- 4 files changed, 125 insertions(+), 6 deletions(-) create mode 100755 overlay/opt/emcomm-tools/bin/et-direwolf diff --git a/overlay/opt/emcomm-tools/bin/et-direwolf b/overlay/opt/emcomm-tools/bin/et-direwolf new file mode 100755 index 0000000..31c49fb --- /dev/null +++ b/overlay/opt/emcomm-tools/bin/et-direwolf @@ -0,0 +1,114 @@ +#!/bin/bash +# +# Author : Gaston Gonzalez +# Date : 1 November 2024 +# Purpose : Wrapper script for starting Dire Wolf with PnP support +# +# Preconditions: +# 1. Supported radio and audio interface are connected and properly detected +# +# Postconditions: +# 1. Audio settings updated +# 2. Dire Wolf started + +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" +} + +if [ $# -ne 1 ]; then + usage + exit 1 +fi + +notify_user() { + notify-send \ + -t 5000 \ + --app-name="EmComm Tools" \ + "$1" +} + +start() { + update-config + + if [ $? -eq 0 ]; then + CMD="direwolf -c ${DIREWOLF_CONF_FILE} -t 0 -p" + et-log "Starting Dire Wolf with: '${CMD}'" + echo + ${CMD} + else + et-log "Error updating configuration. Can't start Dire Wolf" + exit 1 + fi +} + +update-config () { + + DIREWOLF_TEMPLATE_CONF_FILE=${ET_HOME}/conf/template.d/packet/direwolf.simple-packet.conf + + [ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json" + + CALLSIGN=$(cat ${ET_USER_CONFIG} | jq -r .callsign) + + if [ "${CALLSIGN}" = "N0CALL" ]; then + notify_user "Can't start Dire Worlf. No callsign set. Run: et-user." + exit 1 + fi + + # 1. Check if the symlink was created by the udev rules + if [ -e /dev/et-audio ]; then + + # 2. Check that this device was properly tagged with the ET_AUDIO env variable with a udev rule + APLAY_OUT=$(arecord -l | grep ET_AUDIO) + if [ $? -eq 0 ]; then + AUDIO_CARD=$(echo $APLAY_OUT | cut -d":" -f1 | awk '{print $2}') + AUDIO_DEVICE=$(echo $APLAY_OUT | cut -d"," -f2 | cut -d":" -f1 | awk '{print $2}') + DIREWOLF_AUDIO_DEVICE="plughw:${AUDIO_CARD},${AUDIO_DEVICE}" + + et-log "Creating '${DIREWOLF_CONF_FILE}' from template '${DIREWOLF_TEMPLATE_CONF_FILE}'" + cp ${DIREWOLF_TEMPLATE_CONF_FILE} ${DIREWOLF_CONF_FILE} + + # 3. Update callsign + sed -i "s|{{ET_CALLSIGN}}|${CALLSIGN}|g" ${DIREWOLF_CONF_FILE} + + # 4. Update audio device + et-log "Using '${DIREWOLF_AUDIO_DEVICE}' as audio device for Dire Wolf configuration." + sed -i "s|{{ET_AUDIO_DEVICE}}|${DIREWOLF_AUDIO_DEVICE}|g" ${DIREWOLF_CONF_FILE} + + echo "Generated the configuration below..." + echo + cat ${DIREWOLF_CONF_FILE} + echo + + # Configure ALSA settings for sound card + /opt/emcomm-tools/bin/et-audio update-config + + else + et-log "No ET_AUDIO device detected." + notify_user "Can't start Dire Wolf. No ET_AUDIO device detected." + exit 1 + fi + else + et-log "No ET_AUDIO device plugged in." + notify_user "Can't start Dire Wolf. No supported audio device plugged in." + exit 1 + fi + +} + +case $1 in + start) + start + ;; + update-config) + update-config + ;; + *) + echo "Invalid command." + usage + exit 1 + ;; +esac diff --git a/overlay/opt/emcomm-tools/bin/et-js8call b/overlay/opt/emcomm-tools/bin/et-js8call index 4474709..4393151 100755 --- a/overlay/opt/emcomm-tools/bin/et-js8call +++ b/overlay/opt/emcomm-tools/bin/et-js8call @@ -2,7 +2,7 @@ # # Author : Gaston Gonzalez # Date : 24 October 2024 -# Updated : 31 October 2024 +# Updated : 1 November 2024 # Purpose : Wrapper script for starting JS8Call with PnP support # # Preconditions @@ -37,7 +37,6 @@ start() { update-config () { JS8CALL_CONF_FILE="${HOME}/.config/JS8Call.ini" - JS8CALL_TEMPLATE_CONF_FILE=${ET_HOME}/conf/template.d/js8call/JS8Call.rigctl.ini [ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json" diff --git a/overlay/opt/emcomm-tools/conf/template.d/packet/direwolf.simple-packet.conf b/overlay/opt/emcomm-tools/conf/template.d/packet/direwolf.simple-packet.conf index d2a6fb2..a6d9ea8 100644 --- a/overlay/opt/emcomm-tools/conf/template.d/packet/direwolf.simple-packet.conf +++ b/overlay/opt/emcomm-tools/conf/template.d/packet/direwolf.simple-packet.conf @@ -3,17 +3,19 @@ # Purpose : Dire Wolf template for basic packet operation # Audio settings -ADEVICE {{ET_AUDIO_DEVICE}} +#ADEVICE {{ET_AUDIO_DEVICE}} +ADEVICE plughw:1,0 CHANNEL 0 # User settings -MYCALL {{ET_CALLSIGN}} +#MYCALL {{ET_CALLSIGN}} +MYCALL KT7RUN # Modem settings MODEM 1200 +# Rig control settings. Do not change this. # EmComm Tools uses Hamlib's rig control daemon for all radio interfaces. -# Do not change this. PTT RIG 2 localhost:4532 # Enable ports to allow other applications use Dire Wolf as the packet engine diff --git a/scripts/install-emcomm-tools.sh b/scripts/install-emcomm-tools.sh index 20cb349..186544a 100755 --- a/scripts/install-emcomm-tools.sh +++ b/scripts/install-emcomm-tools.sh @@ -2,7 +2,7 @@ # # Author : Gaston Gonzalez # Date : 6 October 2024 -# Updated : 9 October 2024 +# Updated : 1 November 2024 # Purpose : Install EmComm Tools applications et-log "Installing EmComm Tools applications..." @@ -17,3 +17,7 @@ et-log "Setting up permission for shared data access..." chgrp -v -R $ET_GROUP $ET_HOME/conf/radios.d chmod -v 775 $ET_HOME/conf/radios.d chmod -v 664 $ET_HOME/conf/radios.d/*.json + +chgrp -v -R $ET_GROUP $ET_HOME/conf/template.d/packet +chmod -v 775 $ET_HOME/conf/template.d/packet +chmod -v 664 $ET_HOME/conf/template.d/packet/*.conf From a895534394ea7351830024b63bd7b6093620a4bc Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Fri, 1 Nov 2024 15:47:40 -0700 Subject: [PATCH 4/4] Dire Wolf - Added supported for RF-only digipeater --- overlay/opt/emcomm-tools/bin/et-direwolf | 32 +++++++++++++++---- .../packet/direwolf.digipeater-only.conf | 27 ++++++++++++++++ 2 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 overlay/opt/emcomm-tools/conf/template.d/packet/direwolf.digipeater-only.conf 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