mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
FTX-1 - Added initial PNP support for the Yaesu FTX-1 Field; Disablled brltty udev rules
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 24 October 2024
|
||||
# Updated : 20 November 2024
|
||||
# Updated : 26 May 2025
|
||||
# Purpose : Wrapper script for starting JS8Call with PnP support
|
||||
#
|
||||
# Preconditions
|
||||
@@ -13,6 +13,10 @@
|
||||
# 2. JS8Call audio settings updated
|
||||
# 3. JS8Call started
|
||||
|
||||
ET_HOME=/opt/emcomm-tools
|
||||
ACTIVE_RADIO="${ET_HOME}/conf/radios.d/active-radio.json"
|
||||
CAT_DEVICE=/dev/et-cat
|
||||
|
||||
usage() {
|
||||
echo "usage: $(basename $0) <command>"
|
||||
echo " start - Update config and start JS8Call"
|
||||
@@ -63,6 +67,28 @@ update-config () {
|
||||
ET_RELEASE=$(et-system-info release)
|
||||
sed -i "s|^MyInfo.*|MyInfo=${ET_RELEASE}|" ${JS8CALL_CONF_FILE}
|
||||
|
||||
|
||||
# Set PTT to use Hamlib for both CAT control and PTT (default)
|
||||
sed -i "s|^PTTport.*|PTTport=localhost:4532|" ${JS8CALL_CONF_FILE}
|
||||
sed -i "s|PTT_method_[A-Z][A-Z][A-Z]|PTT_method_CAT|" ${JS8CALL_CONF_FILE}
|
||||
|
||||
# Special case for select radios that only need to key the PTT, but do not
|
||||
# have CAT control support or VOX support. This edge case was added for
|
||||
# radios like the Yaesu FTX-1 Field before Yaesu published their CAT commands.
|
||||
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}" = "1" ]; then
|
||||
PTT_ONLY=$(cat ${ET_HOME}/conf/radios.d/active-radio.json | jq -r .rigctrl.pttOnly)
|
||||
|
||||
if [ "${PTT_ONLY}" = "true" ]; then
|
||||
et-log "Configued JS8Call for PTT-only mode"
|
||||
sed -i "s|PTT_method_[A-Z][A-Z][A-Z]|PTT_method_RTS|" ${JS8CALL_CONF_FILE}
|
||||
sed -i "s|^PTTport.*|PTTport=/dev/et-cat|" ${JS8CALL_CONF_FILE}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
et-log "Updated JS8Call configuration with user callsign '${CALLSIGN}' and grid: '${GRID}'"
|
||||
|
||||
# 1. Check if the symlink was created by the udev rules
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"id": "yaesu-ftx1",
|
||||
"vendor": "Yaesu",
|
||||
"model": "FTX-1 (No CAT)",
|
||||
"rigctrl": {
|
||||
"id": "1",
|
||||
"baud": "38400",
|
||||
"ptt": "RTS",
|
||||
"pttOnly": "true"
|
||||
},
|
||||
"notes": [
|
||||
"Tune radio to desired frequency.",
|
||||
"Long press [MODE] and set desired mode.",
|
||||
"Use 'DATA-U' for most HF operation",
|
||||
"Use 'TODO' for FM packet operation",
|
||||
"Under MODE, long press 'PRESET' and select FT8"
|
||||
],
|
||||
"fieldNotes": [
|
||||
]
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 11 October 2024
|
||||
# Updated : 8 December 2024
|
||||
# Updated : 21 May 2025
|
||||
# Purpose : Perform tests that can be used by the udev subsystem to aid
|
||||
# in rule development. This is intended to by used with the PROGRAM
|
||||
# directive inside of a udev rule.
|
||||
@@ -13,6 +13,20 @@
|
||||
ET_HOME=/opt/emcomm-tools
|
||||
ACTIVE_RADIO="${ET_HOME}/conf/radios.d/active-radio.json"
|
||||
|
||||
# Exit with a 0 exit status if, and only if, the currently selected radio is
|
||||
# a Yaesu FTX-1.
|
||||
test_yaesu_ftx1() {
|
||||
if [ -L "${ET_HOME}/conf/radios.d/active-radio.json" ]; then
|
||||
ID=$(cat "${ET_HOME}/conf/radios.d/active-radio.json" | jq -r .id)
|
||||
|
||||
if [[ "$ID" == "yaesu-ftx1" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Exit with a 0 exit status if, and only if, the currently selected radio is
|
||||
# a Yaesu FT-891.
|
||||
test_yaesu_ft891() {
|
||||
@@ -82,6 +96,9 @@ if [ $# -ne 1 ]; then
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
yaesu-ftx1)
|
||||
test_yaesu_ftx1
|
||||
;;
|
||||
yaesu-ft891)
|
||||
test_yaesu_ft891
|
||||
;;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 9 October 2024
|
||||
# Updated : 28 October 2024
|
||||
# Updated : 31 May 2025
|
||||
# Purpose : Wrapper startup/shutdown script around systemd/rigctld
|
||||
|
||||
ET_HOME=/opt/emcomm-tools
|
||||
@@ -41,8 +41,19 @@ start() {
|
||||
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 in VOX mode with: ${CMD}"
|
||||
# Special case for select radios that only need to key the PTT, but do
|
||||
# do not have CAT control support. This edge case was added for radios
|
||||
# like the Yaesu FTX-1 Field before Yaesu published their CAT commands.
|
||||
PTT_ONLY=$(cat ${ET_HOME}/conf/radios.d/active-radio.json | jq -r .rigctrl.pttOnly)
|
||||
|
||||
if [ "${PTT_ONLY}" = "true" ]; then
|
||||
CMD="rigctld -m ${ID} -p ${CAT_DEVICE} -P ${PTT} "
|
||||
et-log "Starting rigctld in PTT-only mode with: ${CMD}"
|
||||
else
|
||||
CMD="rigctld -m ${ID} -P ${PTT} "
|
||||
et-log "Starting rigctld in VOX mode with: ${CMD}"
|
||||
fi
|
||||
|
||||
$CMD
|
||||
exit 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user