mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
FT-891 - Initial experimental support for the Yaesu FT-891 via the DigiRig DR-891. This radio is a pain!
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 11 November 2024
|
||||
# Purpose : udev rules for the Yaesu FT-891 via the DigiRig DR-891
|
||||
#
|
||||
# Preconditions:
|
||||
# 1. Yaesu FT-891 is selected via et-radio
|
||||
# 2. Yaesu FT-891 is connected via DR-891 USB cable
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. /dev/et-cat created
|
||||
# 2. /dev/et-audio created
|
||||
# 3. rigctld is started
|
||||
#
|
||||
|
||||
# Ensure that the FT-891 is set as the current radio configuration.
|
||||
# If it is, set ET_DEVICE=FT-891 to allow following rules to match.
|
||||
SUBSYSTEM=="tty|sound", PROGRAM="/opt/emcomm-tools/sbin/udev-tester.sh yaesu-ft891", \
|
||||
ENV{ET_DEVICE}="FT-891"
|
||||
|
||||
# CAT control device will only match if PROGRAM above matches (exit status=0)
|
||||
#SUBSYSTEM=="tty", ENV{ET_DEVICE}=="FT-891", \
|
||||
# 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"
|
||||
|
||||
SUBSYSTEMS=="usb", ENV{ET_DEVICE}=="FT-891", ATTRS{bInterfaceProtocol}=="00", \
|
||||
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", ENV{ET_DEVICE}=="FT-891", ATTRS{idVendor}=="0d8c", ATTRS{idProduct}=="0012", \
|
||||
ACTION=="add", \
|
||||
ATTR{id}="ET_AUDIO", \
|
||||
ENV{ET_SUBDEVICE}="AUDIO", GROUP="audio", MODE="0660", SYMLINK+="et-audio"
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"id": "yaesu-ft891",
|
||||
"vendor": "Yaesu",
|
||||
"model": "FT-891 (DR-891)",
|
||||
"rigctrl": {
|
||||
"id": "1036",
|
||||
"baud": "38400",
|
||||
"ptt": "RTS"
|
||||
},
|
||||
"notes": [
|
||||
"TODO"
|
||||
],
|
||||
"fieldNotes": [
|
||||
"TODO"
|
||||
]
|
||||
}
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 11 October 2024
|
||||
# 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.
|
||||
#
|
||||
# Exit Statuses:
|
||||
# 0 udev rule should match
|
||||
# 1 udev rule should not match.
|
||||
|
||||
ET_HOME=/opt/emcomm-tools
|
||||
ACTIVE_RADIO="${ET_HOME}/conf/radios.d/active-radio.json"
|
||||
|
||||
# Exit with a 0 exit success if, and only if, the currently selected radio is
|
||||
# a Yaesu FT-891.
|
||||
test_yaesu_ft891() {
|
||||
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-ft891" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 1
|
||||
}
|
||||
|
||||
usage() {
|
||||
echo "usage: $(basename $0) <radio ID>"
|
||||
}
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
yaesu-ft891)
|
||||
test_yaesu_ft891
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 1
|
||||
Reference in New Issue
Block a user