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:
@@ -0,0 +1,38 @@
|
|||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 21 May 2025
|
||||||
|
# Updated : 16 May 2025
|
||||||
|
# Purpose : udev rules for the Yaesu FTX-1 via USB-C
|
||||||
|
#
|
||||||
|
# Preconditions:
|
||||||
|
# 1. Yaesu FTX-1 is selected via et-radio
|
||||||
|
# 2. Yaesu FTX-1 is connected via USB-C cable
|
||||||
|
#
|
||||||
|
# Postconditions:
|
||||||
|
# 1. /dev/et-cat created
|
||||||
|
# 2. /dev/et-audio created
|
||||||
|
# 3. rigctld is started
|
||||||
|
#
|
||||||
|
# Note: As of 05/21/25 Yaesu has not published their CAT control command specification. This is a
|
||||||
|
# temporary integration that does not include CAT control support. It will only key the PTT
|
||||||
|
# and provide audio in/out. You MUST set the frequency and mode yourself.
|
||||||
|
|
||||||
|
# Special rule to ensure that the second serial interface (/dev/ttyUSB5) is tagged as ET_DEVICE=FTX-1 so
|
||||||
|
# that it can be used in the next CAT control rule.
|
||||||
|
KERNEL=="ttyUSB[0-9]*", SUBSYSTEM=="tty", PROGRAM="/opt/emcomm-tools/sbin/udev-tester.sh yaesu-ftx1", \
|
||||||
|
ATTRS{bInterfaceNumber}=="01", \
|
||||||
|
ENV{ET_DEVICE}="FTX-1"
|
||||||
|
|
||||||
|
# CAT control device will only match if PROGRAM above matches (exit status=0)
|
||||||
|
SUBSYSTEM=="tty", ENV{ET_DEVICE}=="FTX-1", \
|
||||||
|
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea70",\
|
||||||
|
ACTION=="add", \
|
||||||
|
ENV{ET_SUBDEVICE}="CAT", GROUP="dialout", MODE="0660", SYMLINK+="et-cat", \
|
||||||
|
RUN+="/usr/bin/systemctl start rigctld"
|
||||||
|
|
||||||
|
# Audio device will only match if PROGRAM above matches (exit status=0)
|
||||||
|
SUBSYSTEM=="sound", ATTRS{idVendor}=="0d8c", ATTRS{idProduct}=="0016", \
|
||||||
|
PROGRAM="/opt/emcomm-tools/sbin/udev-tester.sh yaesu-ftx1", \
|
||||||
|
ACTION=="add", \
|
||||||
|
ENV{ET_DEVICE}="FTX-1", \
|
||||||
|
ATTR{id}="ET_AUDIO", \
|
||||||
|
ENV{ET_SUBDEVICE}="AUDIO", GROUP="audio", MODE="0660", SYMLINK+="et-audio"
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 31 May 2025
|
||||||
|
# Purpose : Empty udev rule to prevent the BRLTTY subsystem from
|
||||||
|
# invoking /lib/udev/rules.d/85-brltty.rules. These rules
|
||||||
|
# hijacking many USB devices used by ETC.
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 24 October 2024
|
# Date : 24 October 2024
|
||||||
# Updated : 20 November 2024
|
# Updated : 26 May 2025
|
||||||
# Purpose : Wrapper script for starting JS8Call with PnP support
|
# Purpose : Wrapper script for starting JS8Call with PnP support
|
||||||
#
|
#
|
||||||
# Preconditions
|
# Preconditions
|
||||||
@@ -13,6 +13,10 @@
|
|||||||
# 2. JS8Call audio settings updated
|
# 2. JS8Call audio settings updated
|
||||||
# 3. JS8Call started
|
# 3. JS8Call started
|
||||||
|
|
||||||
|
ET_HOME=/opt/emcomm-tools
|
||||||
|
ACTIVE_RADIO="${ET_HOME}/conf/radios.d/active-radio.json"
|
||||||
|
CAT_DEVICE=/dev/et-cat
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "usage: $(basename $0) <command>"
|
echo "usage: $(basename $0) <command>"
|
||||||
echo " start - Update config and start JS8Call"
|
echo " start - Update config and start JS8Call"
|
||||||
@@ -63,6 +67,28 @@ update-config () {
|
|||||||
ET_RELEASE=$(et-system-info release)
|
ET_RELEASE=$(et-system-info release)
|
||||||
sed -i "s|^MyInfo.*|MyInfo=${ET_RELEASE}|" ${JS8CALL_CONF_FILE}
|
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}'"
|
et-log "Updated JS8Call configuration with user callsign '${CALLSIGN}' and grid: '${GRID}'"
|
||||||
|
|
||||||
# 1. Check if the symlink was created by the udev rules
|
# 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
|
#!/bin/bash
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 11 October 2024
|
# 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
|
# 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
|
# in rule development. This is intended to by used with the PROGRAM
|
||||||
# directive inside of a udev rule.
|
# directive inside of a udev rule.
|
||||||
@@ -13,6 +13,20 @@
|
|||||||
ET_HOME=/opt/emcomm-tools
|
ET_HOME=/opt/emcomm-tools
|
||||||
ACTIVE_RADIO="${ET_HOME}/conf/radios.d/active-radio.json"
|
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
|
# Exit with a 0 exit status if, and only if, the currently selected radio is
|
||||||
# a Yaesu FT-891.
|
# a Yaesu FT-891.
|
||||||
test_yaesu_ft891() {
|
test_yaesu_ft891() {
|
||||||
@@ -82,6 +96,9 @@ if [ $# -ne 1 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
yaesu-ftx1)
|
||||||
|
test_yaesu_ftx1
|
||||||
|
;;
|
||||||
yaesu-ft891)
|
yaesu-ft891)
|
||||||
test_yaesu_ft891
|
test_yaesu_ft891
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 9 October 2024
|
# Date : 9 October 2024
|
||||||
# Updated : 28 October 2024
|
# Updated : 31 May 2025
|
||||||
# Purpose : Wrapper startup/shutdown script around systemd/rigctld
|
# Purpose : Wrapper startup/shutdown script around systemd/rigctld
|
||||||
|
|
||||||
ET_HOME=/opt/emcomm-tools
|
ET_HOME=/opt/emcomm-tools
|
||||||
@@ -41,8 +41,19 @@ start() {
|
|||||||
ID=$(cat ${ET_HOME}/conf/radios.d/active-radio.json | jq -r .rigctrl.id)
|
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)
|
PTT=$(cat ${ET_HOME}/conf/radios.d/active-radio.json | jq -r .rigctrl.ptt)
|
||||||
|
|
||||||
CMD="rigctld -m ${ID} -P ${PTT} "
|
# Special case for select radios that only need to key the PTT, but do
|
||||||
et-log "Starting rigctld in VOX mode with: ${CMD}"
|
# 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
|
$CMD
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user