Let you key a radio through a CM108 sound card's PTT line

Dire Wolf, Graywolf and others key a radio through a CM108-family sound
card (a Digirig, an AIOC) by setting a GPIO pin through its hidraw
device, which only root can open otherwise. Dire Wolf's own rule gives
it to the audio group, which most Arch users aren't in, and shouldn't
need to be. udev/70-hampack-cm108.rules tags those devices uaccess
instead, so whoever is at the desktop can use them, as they can the
sound card. It matches the devices Dire Wolf 1.8 treats as
CM108-compatible, and no other C-Media devices.

update.sh installs it in /etc/udev/rules.d when it changes, and reloads
and re-applies udev's rules; hampackremove removes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
David Young
2026-11-28 13:54:42 -07:00
co-authored by Claude Opus 5.5
parent fee5ce341a
commit 5f15ff3821
10 changed files with 112 additions and 4 deletions
+13
View File
@@ -90,6 +90,18 @@ join_serial_group() {
echo " Added you to the uucp group, so programs can control your radio. Log out and back in for it to take effect."
}
# Let you key a radio through a CM108-family sound card's PTT pin (Digirig,
# AIOC), which programs reach through its hidraw device. Reinstalled when
# udev/70-hampack-cm108.rules changes
install_udev_rules() {
local rules="${HAMPACK_UDEV_RULES_DIR:-/etc/udev/rules.d}/70-hampack-cm108.rules"
cmp -s "$SELF/udev/70-hampack-cm108.rules" "$rules" && return 0
echo "Installing $rules..."
sudo install -m 644 "$SELF/udev/70-hampack-cm108.rules" "$rules" &&
sudo udevadm control --reload-rules &&
sudo udevadm trigger --subsystem-match=hidraw --action=change
}
# Install the packages in packages.conf, and record the ones that weren't
# already installed, so hampackremove removes those and nothing the user had before
install_hampack_packages() {
@@ -164,6 +176,7 @@ fi
step "Removing stale HamPack files" remove_stale_files
step "Installing HamPack tools" install_tools
step "Adding you to the uucp group, for radios' serial ports" join_serial_group
step "Installing udev rules, for PTT through a CM108 sound card" install_udev_rules
step "Installing HamPack packages" install_hampack_packages
step "Installing Flatpak applications" bash "$SELF/install-flatpaks.sh"
step "Installing pre-built binaries" bash "$SELF/install-binaries.sh"