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
+25 -5
View File
@@ -2,7 +2,7 @@
#
# Author : Gaston Gonzalez
# Date : 1 November 2024
# Updated : 8 November 2024
# Updated : 14 January 2025
# Purpose : Wrapper script for starting Dire Wolf with PnP support
#
# Preconditions:
@@ -23,7 +23,9 @@ usage() {
echo " <type>"
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"
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
@@ -31,6 +33,16 @@ if [ $# -ne 2 ]; then
exit 1
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
case "${MODE}" in
aprs-digipeater)
@@ -42,6 +54,13 @@ case "${MODE}" in
simple)
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"
usage
@@ -60,7 +79,7 @@ notify_user() {
[ ! -e ${ET_LOG_DIR} ] && mkdir -p ${ET_LOG_DIR}
start() {
update-config
update_config
if [ $? -eq 0 ]; then
@@ -81,7 +100,8 @@ start() {
fi
}
update-config () {
update_config () {
et-log "Attempting to start Dire Wolf in mode: '${MODE}'"
@@ -140,7 +160,7 @@ case $1 in
start
;;
update-config)
update-config
update_config
;;
*)
echo "Invalid command."