PnP - Refactored CAT control remove eventing. A generic rule now is responsible for stopping rig control for all EmComm Tools CAT devices.

This commit is contained in:
Gaston Gonzalez
2024-10-14 09:06:37 -07:00
parent b66102a6eb
commit 4c2f3a77a9
4 changed files with 17 additions and 13 deletions
@@ -0,0 +1,13 @@
# Author : Gaston Gonzalez
# Date : 14 October 2024
# Purpose : udev rules for generic remove events
#
# Preconditions:
# 1. CAT control device is unplugged
#
# Postconditions:
# 1. rigctld is stopped
SUBSYSTEM=="tty", ENV{ET_SUBDEVICE}=="CAT", \
ACTION=="remove", \
RUN+="/opt/emcomm-tools/sbin/wrapper-rigctld.sh stop"
+1 -8
View File
@@ -1,6 +1,6 @@
# Author : Gaston Gonzalez
# Date : 28 September 2024
# Updated : 10 October 2024
# Updated : 14 October 2024
# Purpose : udev rules for the Icom IC-705
#
# Preconditions:
@@ -32,11 +32,4 @@ ENV{ET_DEVICE}=="IC-705", SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="02", \
ENV{ET_SUBDEVICE}="GPS", GROUP="dialout", MODE="0660", SYMLINK+="et-gps", \
RUN+="/opt/emcomm-tools/sbin/wrapper-gpsd.sh start"
# TODO: Make this rule more specific
#
# If we do not stop rigctld, the rigctl progress will continue to run and maintain
# a stale reference to /dev/et-cat. This condition will prevent subsequent attach
# and detatch events of the radio from working.
SUBSYSTEM=="tty", ACTION=="remove", RUN+="/opt/emcomm-tools/sbin/wrapper-rigctld.sh stop"
# TODO: Add rules for sound card
+2 -3
View File
@@ -1,13 +1,13 @@
# Author : Gaston Gonzalez
# Author : William McKeehan (https://github.com/mckeehan)
# Date : 30 September 2024
# Updated : 12 October 2024
# Updated : 14 October 2024
# Purpose : udev rules for the Icom IC-7100
#
# Preconditions:
# 1. TODO: Document GPS settings for IC-7100 (Mike KC8OWL)
# 2. GPS antenna connected to IC-7100
# 3. IC-7200 connected via USB cable
# 3. IC-7100 connected via USB cable
#
# Postconditions:
# 1. /dev/et-cat created
@@ -31,5 +31,4 @@ ENV{ET_DEVICE}=="IC-7100", SUBSYSTEMS=="usb", ATTRS{serial}=="IC-7100*B", \
ENV{ET_SUBDEVICE}="GPS", GROUP="dialout", MODE="0660", SYMLINK+="et-gps", \
RUN+="/opt/emcomm-tools/sbin/wrapper-gpsd.sh start"
# TODO: Add rules for ACTION="remove"
# TODO: Add rules for sound card
+1 -2
View File
@@ -1,11 +1,10 @@
[Unit]
Description=rigctld service
Description=Rig Control Service
ConditionPathExists=/dev/et-cat
After=multi-user.target
[Service]
ExecStart=/opt/emcomm-tools/sbin/wrapper-rigctld.sh start
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target