Merging bug/js8call-rigctld-digirig-no-cat

This commit is contained in:
Gaston Gonzalez
2024-10-28 11:16:56 -07:00
5 changed files with 16 additions and 80 deletions
+3 -17
View File
@@ -2,7 +2,7 @@
#
# Author : Gaston Gonzalez
# Date : 24 October 2024
# Updated : 25 October 2024
# Updated : 28 October 2024
# Purpose : Wrapper script for starting JS8Call with PnP support
#
# Preconditions
@@ -10,8 +10,7 @@
#
# Postconditions
# 1. JS8Call audio settings updated
# 2. JS8Call rig settings updated
# 3. JS8Call started
# 2. JS8Call started
usage() {
echo "usage: $(basename $0) <command>"
@@ -26,7 +25,7 @@ fi
notify_user() {
notify-send \
-t 10000 \
-t 5000 \
--app-name="EmComm Tools" \
"$1"
}
@@ -42,19 +41,6 @@ update-config () {
[ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
# Special case for the DigiRig Mobile when connected to a radio that does
# not support CAT control.
if [ -L "${ET_HOME}/conf/radios.d/active-radio.json" ]; then
RIG_ID=$(cat "${ET_HOME}/conf/radios.d/active-radio.json" | jq -r .rigctrl.id)
if [ "${RIG_ID}" = "6" ]; then
JS8CALL_TEMPLATE_CONF_FILE=${ET_HOME}/conf/template.d/js8call/JS8Call.no-rigctl.ini
fi
fi
cp ${JS8CALL_TEMPLATE_CONF_FILE} ${JS8CALL_CONF_FILE}
et-log "Replaced JS8Call configuration with template: ${JS8CALL_TEMPLATE_CONF_FILE}"
# Update configuration with current callsign and grid
CALLSIGN=$(cat ${ET_USER_CONFIG} | jq -r .callsign)
GRID=$(cat ${ET_USER_CONFIG} | jq -r .grid)
@@ -0,0 +1 @@
Future location for Dire Wolf configuration templates
@@ -1,27 +0,0 @@
[Configuration]
AcceptTCPRequests=true
AutoGrid=true
AutoreplyConfirmation=false
AutoreplyOnAtStartup=true
CATNetworkPort=localhost:4532
CheckForUpdates=false
HeartbeatAckSNR=true
HideControls=true
Miles=true
MyCall=N0CALL
MyGrid=DM33
MyGroups=@@TTP,@@TTPNET
Polling=1
PSKReporter=false
PTTMethod=@Variant(\0\0\0\x7f\0\0\0\x1eTransceiverFactory::PTTMethod\0\0\0\0\xfPTT_method_RTS\0)
PTTport=/dev/et-cat
SubMode=0
SubModeHB=true
SubModeHBAck=true
Rig=None
SpotToAPRS=false
TCPEnabled=true
TCPMaxConnections=3
TCPServer=127.0.0.1
TCPServerPort=2442
TxIdleWatchdog=0
@@ -1,27 +0,0 @@
[Configuration]
AcceptTCPRequests=true
AutoGrid=true
AutoreplyConfirmation=false
AutoreplyOnAtStartup=true
CATNetworkPort=localhost:4532
CheckForUpdates=false
HeartbeatAckSNR=true
HideControls=true
Miles=true
MyCall=N0CALL
MyGrid=DM33
MyGroups=@@TTP,@@TTPNET
Polling=1
PSKReporter=false
PTTMethod=@Variant(\0\0\0\x7f\0\0\0\x1eTransceiverFactory::PTTMethod\0\0\0\0\xfPTT_method_CAT\0)
PTTport=localhost:4532
SubMode=0
SubModeHB=true
SubModeHBAck=true
Rig=Hamlib NET rigctl
SpotToAPRS=false
TCPEnabled=true
TCPMaxConnections=3
TCPServer=127.0.0.1
TCPServerPort=2442
TxIdleWatchdog=0
@@ -2,7 +2,7 @@
#
# Author : Gaston Gonzalez
# Date : 9 October 2024
# Updated : 25 October 2024
# Updated : 28 October 2024
# Purpose : Wrapper startup/shutdown script around systemd/rigctld
ET_HOME=/opt/emcomm-tools
@@ -47,14 +47,6 @@ start() {
exit 0
fi
# We can't use rigctld in dummy mode like we did with the DigiRig Lite as the Hamlib dummy
# rigs (1 and 6) do not honor the -P flag. Passing -P RTS is ignored. I need to create a custom rig for
# the DigiRig Mobile for radios that do not support CAT control, but haver their PTT triggered via
# the RTS signal.
if [ "${RIG_ID}" = "6" ]; then
et-log "Skipping rigctld startup for DigiRig Mobile since radio does not support CAT control."
exit 0
fi
fi
if [ ! -e ${CAT_DEVICE} ]; then
@@ -81,6 +73,17 @@ start() {
BAUD=$(cat ${ET_HOME}/conf/radios.d/active-radio.json | jq -r .rigctrl.baud)
PTT=$(cat ${ET_HOME}/conf/radios.d/active-radio.json | jq -r .rigctrl.ptt)
# Special case for DigiRig Mobile for radios with no CAT control.
if [ "${ID}" = "6" ]; then
et-log "Starting rigctld in RTS PTT only mode with: ${CMD}"
PTT=$(cat ${ET_HOME}/conf/radios.d/active-radio.json | jq -r .rigctrl.ptt)
CMD="rigctld -p ${CAT_DEVICE} -P ${PTT} "
et-log "Starting rigctld in RTS PTT only mode with: ${CMD}"
$CMD
exit 0
fi
# Generate command
CMD="rigctld -m ${ID} -r ${CAT_DEVICE} -s ${BAUD} -P ${PTT} "
et-log "Starting rigctld with: ${CMD}"