From e71f1e59c290afb851f6b136880ef7a5ef6405cd Mon Sep 17 00:00:00 2001 From: David Young Date: Sat, 28 Nov 2026 12:14:04 -0700 Subject: [PATCH] Plan radio autoconfiguration, and list the checks that need real radios PLAN.md lists what's left: checking radios.conf against real radios, telling Elecraft's radios apart, `radio configure`, CM108 PTT, the Flatpaks' serial access, and dropping graywolf's unused dialout group. TEST.md lists the checks the fakes can't do, with tables for results: the uucp group, finding each radio, and pairing radios with sound cards. Co-Authored-By: Claude Opus 5.5 --- PLAN.md | 39 +++++++++++++++++++++++++++++++++++++ README.md | 3 +++ TEST.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 TEST.md diff --git a/PLAN.md b/PLAN.md index e69de29..c1a3244 100644 --- a/PLAN.md +++ b/PLAN.md @@ -0,0 +1,39 @@ +# Plan + +What's left to do in HamPack. Delete an item once it's done; git history +keeps the record. Checks that need real radios are in `TEST.md`. + +## Radio autoconfiguration + +Find the radios plugged into USB and set up HamPack's programs for them. +Done in 6c76f94: `radio detect` and `radio probe`, `radios.conf`, and adding +you to the uucp group. + +- [ ] Run `TEST.md` against real radios, and mark the `radios.conf` values + they confirm `# verified`. Fix or remove the ones they don't +- [ ] Tell Elecraft's radios apart. The K3, KX3, KX2 and K4 all answer `ID017;`, + so `radio` lists all four. Find an Elecraft command whose reply names + the model +- [ ] `radio configure`: one rig controller, everything else pointed at it. + Write a rigctld systemd user service for the radio, using its + `/dev/serial/by-id` port, Hamlib model and the baud rate it answered at. + Then point each program at rigctld (localhost:4532) and at the radio's + sound card: WSJT-X, JS8Call, fldigi, flrig, Dire Wolf, Pat, QLog, + not1mm, POTACAT and Graywolf. Only fill in settings that are empty, + keep a `.bak` of each file changed, and test against sample config files +- [ ] PTT through a CM108 sound card (Digirig, AIOC, SignaLink-style + interfaces): a udev rule so you can open its `hidraw` device, for + Dire Wolf and others +- [ ] Check that the WSJT-X and QLog Flatpaks can open serial ports + (`--device=all`), in `hampackcheck` or the smoketest +- [ ] List USB sound cards with no serial port (SignaLink USB, VOX-keyed + interfaces). `radio` shows only devices with a serial port, so these + don't appear +- [ ] Later: run `radio configure` when a known radio is plugged in (a udev + rule starting a systemd user unit) + +## Other + +- [ ] Graywolf's setup (`install_graywolf_service` in `update.sh`) creates a + `dialout` group, which nothing on Arch uses. Its service runs as you, + so it already has your uucp membership. Drop the `groupadd` diff --git a/README.md b/README.md index bea83df..73e9776 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,9 @@ HamPack is a set of Bash scripts. `install.sh` runs once, from `sibling add`; `u - `make check-packages` checks that every package in `packages.conf` is in the Arch repos or the AUR, and every Flatpak is on Flathub (run `sudo pacman -Sy` first). It catches packages that were renamed or dropped upstream, but not a typo that happens to be another package's name - `make hooks` runs `make lint test` before each commit - `coredesktop-dev smoketest run --with HamPack` installs, updates and removes HamPack on a virtual machine with CoreDesktop, for what the bats tests' fakes can't check. See `smoketest/README.md` +- `TEST.md` lists the checks that need real radios or a real login, with tables for the results + +What's left to do is in `PLAN.md`. Gitea runs `make lint test` on every push and pull request, and `make check-packages` on those and once a week, since packages can disappear upstream without any change here (`.gitea/workflows/check.yml`). diff --git a/TEST.md b/TEST.md new file mode 100644 index 0000000..4f23a09 --- /dev/null +++ b/TEST.md @@ -0,0 +1,57 @@ +# Manual tests + +Checks that need real hardware or a real login, which the bats tests' fakes +can't do. `make test` covers the rest; the smoketest covers installs on a VM. +Record each result in the tables below, with the date and the HamPack commit. + +## The uucp group + +1. On a machine where you're not in uucp (`groups` doesn't list it), run `update`. + It should say it added you to the uucp group and that you need to log out. +2. Before logging out, plug in a radio and run `radio probe /dev/ttyUSB0`. It + should say to log out and back in, not to run `usermod`. +3. Log out and back in. `groups` lists uucp, and `radio probe` can open the port. +4. Run `update` again. It doesn't add you a second time. +5. Run `hampackremove`. `groups` (after logging in again) no longer lists uucp. + Repeat on a machine where you were in uucp before HamPack: you stay in it. + +| Date | Commit | Result | +|------|--------|--------| +| | | | + +## Finding radios + +For each radio: + +1. Put it on a dummy load or an antenna, and switch it on. Quit anything that + uses its port (WSJT-X, flrig, rigctld, fldigi). +2. Run `radio`. Check the serial ports and sound card it lists are the + radio's. Compare with `ls -l /dev/serial/by-id/`, `lsusb -t` and + `cat /proc/asound/cards`. +3. Run `radio detect --probe`. Watch the radio's TX indicator: probing should + not key it. If it does, even for a moment, note the interface. +4. Check the model and Hamlib model number are right, and note the baud rate + it answered at. +5. If it was recognised, mark its values in `radios.conf` `# verified`. If not, + note what `radio detect --probe` printed. + +Interfaces to try, as well as radios with built-in USB: a Digirig (CP2102 and +CM108 behind its own hub, RTS keys PTT), an FTDI CAT cable, and an Icom CI-V +cable. + +| Date | Commit | Radio | Interface | Recognised by | Right model? | Sound card paired? | Baud | Keyed TX? | Notes | +|------|--------|-------|-----------|---------------|--------------|--------------------|------|-----------|-------| +| | | | | | | | | | | + +## Pairing radios with sound cards + +- Two radios plugged in at once: each gets its own sound card. +- A radio plugged in through an external USB hub, with other devices on that + hub: note whether the sound card is still paired. `radio` only pairs a port + and a sound card on a hub that has nothing else on it, so it shouldn't be. +- A USB sound card on its own, plugged in next to a serial-only radio: it + shouldn't be paired with the radio. + +| Date | Commit | Setup | Result | +|------|--------|-------|--------| +| | | | |