Merge pull request #40 from thetechprepper/rigcontrol/yaesu-ftx-1

Merge rigcontrol/yaes-ftx-1 to release/r5
This commit is contained in:
thetechprepper
2025-06-04 06:10:36 -07:00
committed by GitHub
6 changed files with 115 additions and 5 deletions
+38
View File
@@ -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"
+7
View File
@@ -0,0 +1,7 @@
# Author : Gaston Gonzalez
# Date : 31 May 2025
# Updated : 4 June 2025
# Purpose : Empty udev rule to prevent the BRLTTY subsystem from
# invoking /lib/udev/rules.d/85-brltty.rules. These rules
# hijack some USB devices used by ETC operators. The Bionics
# MicroFox-50 was one of these hijacked devices.
+13 -1
View File
@@ -2,7 +2,7 @@
#
# Author : Gaston Gonzalez
# Date : 31 October 2024
# Updated : 11 November 2024
# Updated : 31 May 2024
# Purpose : Configures ET audio device with sane defaults
#
# Preconditions
@@ -85,6 +85,18 @@ update-config () {
et-log "Applied amixer settings for ${ET_DEVICE_NAME}"
;;
"FTX-1")
# Unmute Speaker a set volume. Adjust if remote station can't decode you. Your TX controls.
amixer -q -c ${AUDIO_CARD} sset Speaker Playback Switch 42% unmute
# Unmute Mic
amixer -q -c ${AUDIO_CARD} sset Mic Playback Switch 52% unmute
# Set "L/R Capture" to 19. Adjust if you can't decode received audio. Your RX controls.
amixer -q -c ${AUDIO_CARD} sset Mic Capture Switch 31% unmute
# Disable Auto Gain Control
amixer -q -c ${AUDIO_CARD} sset 'Auto Gain Control' mute
et-log "Applied amixer settings for ${ET_DEVICE_NAME}"
;;
*)
et-log "No ALSA configuration specified for this ET_DEVICE."
;;
@@ -0,0 +1,25 @@
{
"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], then set accordingly for HF or VHF/UHF.",
"For HF operation:",
"- First, select 'DATA-U'.",
"- Then, long press 'PRESET' and select 'FT8'.",
"- The 'PRESET' button should be highlighted in blue.",
"For VHF/UHF FM operation:",
"- First, select 'FM'.",
"- Then, long press 'PRESET' and select 'FT8'.",
"- The 'PRESET' button should be highlighted in blue."
],
"fieldNotes": [
]
}
+18 -1
View File
@@ -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