mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
PnP - Refactored the PnP implementation to handle the DigiRig Mobile no CAT control use case. Currently, the best workaround for the moment is to restore the JS8Call INI configuration on every startup using a template file. This will wipe out user settings on every start-up, but it is stable for now. I have a couple of long term solutions to preserve the user's settings.
This commit is contained in:
@@ -6,10 +6,12 @@
|
||||
# Purpose : Wrapper script for starting JS8Call with PnP support
|
||||
#
|
||||
# Preconditions
|
||||
# 1. Support radio and audio interface are connected and properly detected
|
||||
# 1. Supported radio and audio interface are connected and properly detected
|
||||
#
|
||||
# Postconditions
|
||||
# 1. JS8Call is started with audio settings updated
|
||||
# 1. JS8Call audio settings updated
|
||||
# 2. JS8Call rig settings updated
|
||||
# 3. JS8Call started
|
||||
|
||||
usage() {
|
||||
echo "usage: $(basename $0) <command>"
|
||||
@@ -36,6 +38,20 @@ start() {
|
||||
update-config () {
|
||||
|
||||
JS8CALL_CONF_FILE="${HOME}/.config/JS8Call.ini"
|
||||
JS8CALL_TEMPLATE_CONF_FILE=${ET_HOME}/conf/template.d/js8call/JS8Call.rigctl.ini
|
||||
|
||||
# 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}"
|
||||
|
||||
# 1. Check if the symlink was created by the udev rules
|
||||
if [ -e /dev/et-audio ]; then
|
||||
@@ -75,6 +91,7 @@ update-config () {
|
||||
notify_user "Can't start JS8Call. No supported audio device plugged in."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
case $1 in
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "yaesu-ft897d",
|
||||
"vendor": "Yaesu",
|
||||
"model": "FT-897D (Mobile)",
|
||||
"model": "FT-897D (DigiRig)",
|
||||
"rigctrl": {
|
||||
"id": "1043",
|
||||
"baud": "38400",
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
[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
|
||||
@@ -0,0 +1,27 @@
|
||||
[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
|
||||
@@ -29,21 +29,20 @@ do_full_auto() {
|
||||
|
||||
start() {
|
||||
|
||||
# Special case for VOX devices like the DigiRig Lite and for the DigiRig Mobile
|
||||
# when connected to a radio that does not support CAT control.
|
||||
# Special case for the DigiRig Lite.
|
||||
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)
|
||||
|
||||
# All VOX devices use the dummy mode provided by Hamlib. This helps maintain
|
||||
# a cleaner interface by leveraging rigctl NET in applications.
|
||||
if [ "${RIG_ID}" = "1" ]; then
|
||||
et-log "Starting dummy rigctld service for device with no CAT support."
|
||||
et-log "Starting dummy rigctld service for VOX device."
|
||||
|
||||
ID=$(cat ${ET_HOME}/conf/radios.d/active-radio.json | jq -r .rigctrl.id)
|
||||
PTT=$(cat ${ET_HOME}/conf/radios.d/active-radio.json | jq -r .rigctrl.ptt)
|
||||
|
||||
CMD="rigctld -m ${ID} -P ${PTT} "
|
||||
et-log "Starting rigctld n VOX mode with: ${CMD}"
|
||||
et-log "Starting rigctld in VOX mode with: ${CMD}"
|
||||
$CMD
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user