et-mode - Added support for 300, 1200 and 9600 baud packet operation

This commit is contained in:
Gaston Gonzalez
2025-01-14 02:10:22 -07:00
parent f53eb1d0f5
commit 6990d44f58
7 changed files with 132 additions and 12 deletions
@@ -0,0 +1,20 @@
# Author : Gaston Gonzalez
# Date : 13 January 2025
# Purpose : User systemd unit file for EmComm Tools Dire Wolf 300 baud
# : packet service.
#
# Usage:
# Check status : systemctl --user status et-service-direwolf-300
# Start service : systemctl --user start et-service-direwolf-300
# Stop service : systemctl --user stop et-service-direwolf-300
# Reload this config : systemctl --user daemon-reload
[Unit]
Description=EmComm Tools Dire Wolf 300 baud packet service
[Service]
ExecStart=/opt/emcomm-tools/bin/et-direwolf start 300
Restart=no
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,20 @@
# Author : Gaston Gonzalez
# Date : 13 January 2025
# Purpose : User systemd unit file for EmComm Tools Dire Wolf 9600 baud
# : packet service.
#
# Usage:
# Check status : systemctl --user status et-service-direwolf-9600
# Start service : systemctl --user start et-service-direwolf-9600
# Stop service : systemctl --user stop et-service-direwolf-9600
# Reload this config : systemctl --user daemon-reload
[Unit]
Description=EmComm Tools Dire Wolf 9600 baud packet service
[Service]
ExecStart=/opt/emcomm-tools/bin/et-direwolf start 9600
Restart=no
[Install]
WantedBy=multi-user.target
+25 -5
View File
@@ -2,7 +2,7 @@
# #
# Author : Gaston Gonzalez # Author : Gaston Gonzalez
# Date : 1 November 2024 # Date : 1 November 2024
# Updated : 8 November 2024 # Updated : 14 January 2025
# Purpose : Wrapper script for starting Dire Wolf with PnP support # Purpose : Wrapper script for starting Dire Wolf with PnP support
# #
# Preconditions: # Preconditions:
@@ -23,7 +23,9 @@ usage() {
echo " <type>" echo " <type>"
echo " aprs-digipeater - Run in RF-only APRS digipeater mode" echo " aprs-digipeater - Run in RF-only APRS digipeater mode"
echo " packet-digipeater - Run in RF-only packet digipeater mode" echo " packet-digipeater - Run in RF-only packet digipeater mode"
echo " simple - Run in simple packet mode" echo " simple - Run in simple (1200 baud) packet mode"
echo " 300 - Run in 300 baud packet mode (HF)"
echo " 9600 - Run in 9600 baud packet mode (VHF/UHF)"
} }
if [ $# -ne 2 ]; then if [ $# -ne 2 ]; then
@@ -31,6 +33,16 @@ if [ $# -ne 2 ]; then
exit 1 exit 1
fi fi
check_9600_baud () {
# For 9600 baud operation, we use the /dev/et-cat device directly
# in direwolf, instead of going through rigctl.
if [ ! -e /dev/et-cat ]; then
et-log "PTT devices not found for 9600 baud operation."
exit 1
fi
}
MODE=$2 MODE=$2
case "${MODE}" in case "${MODE}" in
aprs-digipeater) aprs-digipeater)
@@ -42,6 +54,13 @@ case "${MODE}" in
simple) simple)
DIREWOLF_TEMPLATE_CONF_FILE="${ET_HOME}/conf/template.d/packet/direwolf.${MODE}.conf" DIREWOLF_TEMPLATE_CONF_FILE="${ET_HOME}/conf/template.d/packet/direwolf.${MODE}.conf"
;; ;;
300)
DIREWOLF_TEMPLATE_CONF_FILE="${ET_HOME}/conf/template.d/packet/direwolf.${MODE}.conf"
;;
9600)
check_9600_baud
DIREWOLF_TEMPLATE_CONF_FILE="${ET_HOME}/conf/template.d/packet/direwolf.${MODE}.conf"
;;
*) *)
et-log "Can't started Dire Wolf. Mode '${MODE}' not supported" et-log "Can't started Dire Wolf. Mode '${MODE}' not supported"
usage usage
@@ -60,7 +79,7 @@ notify_user() {
[ ! -e ${ET_LOG_DIR} ] && mkdir -p ${ET_LOG_DIR} [ ! -e ${ET_LOG_DIR} ] && mkdir -p ${ET_LOG_DIR}
start() { start() {
update-config update_config
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
@@ -81,7 +100,8 @@ start() {
fi fi
} }
update-config () {
update_config () {
et-log "Attempting to start Dire Wolf in mode: '${MODE}'" et-log "Attempting to start Dire Wolf in mode: '${MODE}'"
@@ -140,7 +160,7 @@ case $1 in
start start
;; ;;
update-config) update-config)
update-config update_config
;; ;;
*) *)
echo "Invalid command." echo "Invalid command."
+3
View File
@@ -2,6 +2,7 @@
# #
# Author : Gaston Gonzalez # Author : Gaston Gonzalez
# Date : 12 November 2024 # Date : 12 November 2024
# Updated : 13 January 2025
# Purpose : Stops all EmComm Tools sound-based services (i.e. modems) and # Purpose : Stops all EmComm Tools sound-based services (i.e. modems) and
# amatuer radio applications to ensure a clean start for the next mode. # amatuer radio applications to ensure a clean start for the next mode.
@@ -11,6 +12,8 @@ stop_all_services() {
systemctl --user stop et-service-winlink-ardop systemctl --user stop et-service-winlink-ardop
systemctl --user stop et-service-winlink-packet systemctl --user stop et-service-winlink-packet
systemctl --user stop et-service-ardop systemctl --user stop et-service-ardop
systemctl --user stop et-service-direwolf-300
systemctl --user stop et-service-direwolf-9600
systemctl --user stop et-service-direwolf-simple systemctl --user stop et-service-direwolf-simple
systemctl --user stop et-service-direwolf-aprs-digipeater systemctl --user stop et-service-direwolf-aprs-digipeater
systemctl --user stop et-service-direwolf-packet-digipeater systemctl --user stop et-service-direwolf-packet-digipeater
+30 -3
View File
@@ -2,7 +2,7 @@
# #
# Author : Gaston Gonzalez # Author : Gaston Gonzalez
# Date : 6 November 2024 # Date : 6 November 2024
# Updated : 5 December 2024 # Updated : 14 January 2025
# Purpose : Configures the system for a specific mode of operation # Purpose : Configures the system for a specific mode of operation
# Use a simple text file to save the state of the last mode selected # Use a simple text file to save the state of the last mode selected
@@ -19,6 +19,9 @@ MODE_ID_PACKET_DIGIPEATER="packet-digipeater"
MODE_ID_WINLINK_ARDOP="winlink-ardop" MODE_ID_WINLINK_ARDOP="winlink-ardop"
MODE_ID_WINLINK_PACKET="winlink-packet" MODE_ID_WINLINK_PACKET="winlink-packet"
# Default to 1200 baud
PACKET_MODE=simple
# Attempt to stop all EmComm Tools services regardless if they are running. # Attempt to stop all EmComm Tools services regardless if they are running.
stop_all_services() { stop_all_services() {
et-kill-all et-kill-all
@@ -63,6 +66,23 @@ start_and_wait_for_service() {
exit_on_service_failure ${systemd_unit_name} exit_on_service_failure ${systemd_unit_name}
} }
select_direwolf_mode () {
packet_mode=()
packet_mode+=("simple" "1200 baud (default for VHF/UHF)")
packet_mode+=("9600" "9600 baud (VHF/UHF)")
packet_mode+=("300" "300 baud (HF)")
PACKET_MODE=$(dialog --clear --menu "Select a modem" 16 65 10 "${packet_mode[@]}" 3>&1 1>&2 2>&3)
exit_status=$?
tput sgr 0 && clear
if [ ${exit_status} -ne 0 ]; then
et-log "No modem selected. Mode will not be started."
exit 1
fi
}
# Build list of options # Build list of options
options=() options=()
options+=("${MODE_ID_NONE}" "No mode selected") options+=("${MODE_ID_NONE}" "No mode selected")
@@ -100,12 +120,19 @@ if [ $exit_status -eq 0 ]; then
et-yaac start et-yaac start
;; ;;
${MODE_ID_BBS_CLIENT}) ${MODE_ID_BBS_CLIENT})
start_and_wait_for_service et-service-direwolf-simple select_direwolf_mode
et-log "Using ${PACKET_MODE} as the modem speed."
start_and_wait_for_service et-service-direwolf-${PACKET_MODE}
et-log "Starting Paracon." et-log "Starting Paracon."
et-paracon start et-paracon start
;; ;;
${MODE_ID_BBS_CLIENT2}) ${MODE_ID_BBS_CLIENT2})
start_and_wait_for_service et-service-direwolf-simple select_direwolf_mode
et-log "Using ${PACKET_MODE} as the modem speed."
start_and_wait_for_service et-service-direwolf-${PACKET_MODE}
et-log "Starting QtTermTCP." et-log "Starting QtTermTCP."
et-qttermtcp start et-qttermtcp start
;; ;;
@@ -1,7 +1,7 @@
# Author : Gaston Gonzalez # Author : Gaston Gonzalez
# Date : 31 October 2024 # Date : 31 October 2024
# Updated : 10 January 2025 # Updated : 13 January 2025
# Purpose : Dire Wolf template for basic packet operation # Purpose : Dire Wolf template for 300 baud packet operation
# Audio settings # Audio settings
ADEVICE {{ET_AUDIO_DEVICE}} ADEVICE {{ET_AUDIO_DEVICE}}
@@ -11,11 +11,13 @@ CHANNEL 0
MYCALL {{ET_CALLSIGN}} MYCALL {{ET_CALLSIGN}}
# Modem settings # Modem settings
# Use 7 decoders spaced 30 Hz apart to improve chances of decode on HF.
MODEM 300 A- 7@30 MODEM 300 A- 7@30
PACLEN 60 PACLEN 60
FRACK 5 FRACK 5
MAXFRAME 1 MAXFRAME 1
# Settings from The Modern Ham (KN4MKB)
# More modem settings from The Modern Ham (KN4MKB)
PERSIST 63 PERSIST 63
SLOTTIME 12 SLOTTIME 12
RETRY 10 RETRY 10
@@ -27,6 +29,7 @@ TXTAIL 30
# EmComm Tools uses Hamlib's rig control daemon for all radio interfaces. # EmComm Tools uses Hamlib's rig control daemon for all radio interfaces.
PTT RIG 2 localhost:4532 PTT RIG 2 localhost:4532
# Enable ports to allow other applications use Dire Wolf as the packet engine # Enable ports to allow other applications to use Dire Wolf as the
# packet engine.
AGWPORT 8000 AGWPORT 8000
KISSPORT 8001 KISSPORT 8001
@@ -0,0 +1,27 @@
# Author : Gaston Gonzalez
# Date : 12 January 2025
# Purpose : Dire Wolf template for 9600 baud packet operation
# Audio settings
ADEVICE {{ET_AUDIO_DEVICE}}
ARATE 48000
CHANNEL 0
# User settings
MYCALL {{ET_CALLSIGN}}
# Modem settings
MODEM 9600
# Use TXDELAY fro UZ7HO: 15 * 10 = 150ms
TXDELAY 15
# Use TXTAIL from UZ7HO: 5 * 10 = 50ms
TXTAIL 5
# For 9600 baud, use RTS to key the PTT. This is the only case
# where we do not use Hamlib's rigctl in EmComm Tools.
PTT /dev/et-cat RTS
# Enable ports to allow other applications to use Dire Wolf as the
# packet engine.
AGWPORT 8000
KISSPORT 8001