From eb271e8f20268fe803690beb1e419f67fcbdc68a Mon Sep 17 00:00:00 2001 From: rouggy Date: Thu, 30 Jul 2026 16:50:06 +0200 Subject: [PATCH] fix: Kenwood split read from FR/FT when the status frame omits it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported from a Flex in Kenwood CAT mode: frequency read perfectly, split never appeared. Not every rig speaking this dialect fills IF's split bit. Rather than guess which column that firmware populates, ask the question that DEFINES split — is the transmit VFO a different VFO from the receive one — which is exactly what FR and FT answer, and the same rule the Yaesu backend settled on after several wrong turns. FR is also trusted over IF for which VFO is in use: they are asked in the same breath, and a rig vague about the split bit may be just as vague about the VFO field. Cost is bounded: a rig that rejects FR/FT answers "?;" once and is never asked again, so this is two short commands per poll only where it works. Both paths are tested against the emulator — split found through FR/FT with IF silent, and IF-reported split still working on a rig that refuses FR/FT without re-asking. Also extends the CAT wire trace to the Kenwood backend, ASCII quoted so an empty reply is visible as such: "" and ";" look identical unquoted, and telling them apart is the whole question when a rig half-supports a command. If this fix is not the whole story on real hardware, the trace is what will say so. --- changelog.json | 8 +- frontend/src/components/SettingsModal.tsx | 2 +- frontend/src/lib/i18n.tsx | 4 +- internal/cat/kenwood.go | 57 ++++++++++++ internal/cat/kenwood_loopback_test.go | 108 +++++++++++++++++++++- internal/cat/log.go | 52 +++++++---- 6 files changed, 206 insertions(+), 25 deletions(-) diff --git a/changelog.json b/changelog.json index e51a4a8..9ac85a2 100644 --- a/changelog.json +++ b/changelog.json @@ -3,10 +3,14 @@ "version": "0.22.3", "date": "", "en": [ - "The Kenwood backend is now exercised against a rig that answers: OpsLog talks to the TS-2000 emulator it already carries for ACOM amplifiers, so frequency, mode, VFO, split and PTT are checked end to end. Testing on a real Kenwood is still needed, but the dialogue itself is no longer untried." + "The Kenwood backend is now exercised against a rig that answers: OpsLog talks to the TS-2000 emulator it already carries for ACOM amplifiers, so frequency, mode, VFO, split and PTT are checked end to end. Testing on a real Kenwood is still needed, but the dialogue itself is no longer untried.", + "Kenwood: split is now detected from the transmit and receive VFO (FR/FT) when the radio leaves it out of its status frame — the case seen on a Flex in Kenwood CAT mode, where the frequency read correctly but split never appeared. Radios that report it in the status frame are unaffected.", + "The CAT protocol trace covers the Kenwood backend as well, not just CI-V. Settings → CAT." ], "fr": [ - "Le backend Kenwood est désormais éprouvé face à une radio qui répond : OpsLog dialogue avec l'émulateur TS-2000 qu'il embarque déjà pour les amplis ACOM, ce qui vérifie fréquence, mode, VFO, split et PTT de bout en bout. Un essai sur un vrai Kenwood reste nécessaire, mais le dialogue n'est plus non testé." + "Le backend Kenwood est désormais éprouvé face à une radio qui répond : OpsLog dialogue avec l'émulateur TS-2000 qu'il embarque déjà pour les amplis ACOM, ce qui vérifie fréquence, mode, VFO, split et PTT de bout en bout. Un essai sur un vrai Kenwood reste nécessaire, mais le dialogue n'est plus non testé.", + "Kenwood : le split est désormais détecté à partir des VFO d'émission et de réception (FR/FT) quand la radio ne le renseigne pas dans sa trame d'état — le cas observé sur un Flex en mode CAT Kenwood, où la fréquence était juste mais le split n'apparaissait jamais. Les radios qui le signalent normalement ne changent pas.", + "La trace du protocole CAT couvre aussi le backend Kenwood, plus seulement le CI-V. Réglages → CAT." ] }, { diff --git a/frontend/src/components/SettingsModal.tsx b/frontend/src/components/SettingsModal.tsx index c5f0a60..9a3d9ba 100644 --- a/frontend/src/components/SettingsModal.tsx +++ b/frontend/src/components/SettingsModal.tsx @@ -2516,7 +2516,7 @@ export function SettingsModal({ onClose, onSaved, initialSection, onMainPaneChan )} - {(catCfg.backend === 'icom' || catCfg.backend === 'xiegu') && ( + {['icom', 'xiegu', 'kenwood'].includes(catCfg.backend) && (