diff --git a/changelog.json b/changelog.json index 3cd672d..4652ff0 100644 --- a/changelog.json +++ b/changelog.json @@ -5,12 +5,14 @@ "en": [ "Digital decodes: a station's grid square could be logged as its callsign. An unrecognised word after CQ made the parser skip a slot, and a four-character grid passes every shape test a callsign does, so \"CQ FOO JN36\" was read as a contact with JN36 — spotted, coloured and counted like any other station. A grid in the callsign position is now refused.", "Shared CAT no longer drops when the rig is busy. A Kenwood answers \"?;\" for a moment after coming out of transmit, which is exactly when polling resumes — and that single refused poll tore down the whole CAT link. WSJT-X, which keys through it, lost the radio mid-sequence and Hamlib then sent an uninitialised frequency, so the operator got an alarming frequency error whose real cause was three lines earlier. A busy rig is now ridden out for up to three polls; a genuine serial fault still drops immediately.", - "CW over CAT now works on a Kenwood. The KY command was written against Elecraft's, which takes a string of any length; a Kenwood requires exactly 24 characters, so every message was refused and OpsLog reported that the radio would not do CW over CAT at all — sending operators to buy a serial keyer they did not need. A semicolon is also stripped from CW text now: it ends a CAT frame, so one in a macro cut the command short." + "CW over CAT now works on a Kenwood. The KY command was written against Elecraft's, which takes a string of any length; a Kenwood requires exactly 24 characters, so every message was refused and OpsLog reported that the radio would not do CW over CAT at all — sending operators to buy a serial keyer they did not need. A semicolon is also stripped from CW text now: it ends a CAT frame, so one in a macro cut the command short.", + "Shared CAT now says so when a client is misconfigured. A program set to a Kenwood or Yaesu RIG MODEL instead of Hamlib NET rigctl sends raw rig commands to the CAT-sharing port; the reply it gets back has no terminator it recognises, so it reports a timeout with no data and the operator concludes CAT sharing is broken. The log now names the mistake and the setting that fixes it." ], "fr": [ "Décodes digitaux : le carré locator d une station pouvait être enregistré comme son indicatif. Un mot non reconnu après CQ faisait sauter un cran au parseur, et un grid de quatre caractères passe tous les tests de forme d un indicatif — « CQ FOO JN36 » était donc lu comme un contact avec JN36, spotté, coloré et compté comme n importe quelle autre station. Un grid à la place de l indicatif est maintenant refusé.", "Le CAT partagé ne tombe plus quand le rig est occupé. Un Kenwood répond « ?; » un court instant en sortie d émission, c est-à-dire précisément au moment où le poll reprend — et ce seul refus faisait tomber tout le lien CAT. WSJT-X, qui émet à travers lui, perdait la radio en pleine séquence et Hamlib envoyait ensuite une fréquence non initialisée : l opérateur voyait une erreur de fréquence inquiétante dont la vraie cause était trois lignes plus haut. Un rig occupé est désormais encaissé sur trois polls au plus ; une vraie panne série tombe toujours immédiatement.", - "Le CW par CAT fonctionne enfin sur un Kenwood. La commande KY avait été écrite d après celle d Elecraft, qui accepte une chaîne de longueur libre ; un Kenwood en exige exactement 24 caractères, donc chaque message était refusé et OpsLog annonçait que la radio ne savait pas faire de CW par CAT — envoyant des opérateurs acheter un keyer série dont ils n avaient pas besoin. Le point-virgule est aussi retiré du texte CW : il termine une trame CAT, donc un seul dans une macro coupait la commande." + "Le CW par CAT fonctionne enfin sur un Kenwood. La commande KY avait été écrite d après celle d Elecraft, qui accepte une chaîne de longueur libre ; un Kenwood en exige exactement 24 caractères, donc chaque message était refusé et OpsLog annonçait que la radio ne savait pas faire de CW par CAT — envoyant des opérateurs acheter un keyer série dont ils n avaient pas besoin. Le point-virgule est aussi retiré du texte CW : il termine une trame CAT, donc un seul dans une macro coupait la commande.", + "Le CAT partagé signale désormais un client mal configuré. Un logiciel réglé sur un MODÈLE de rig Kenwood ou Yaesu au lieu de Hamlib NET rigctl envoie des commandes rig brutes sur le port de partage ; la réponse qu il reçoit ne porte pas le terminateur qu il attend, il annonce donc un délai dépassé sans données et l opérateur en conclut que le partage CAT est cassé. Le log nomme maintenant l erreur et le réglage qui la corrige." ] }, { diff --git a/internal/rigctld/rigctld.go b/internal/rigctld/rigctld.go index ff2172d..db1d43d 100644 --- a/internal/rigctld/rigctld.go +++ b/internal/rigctld/rigctld.go @@ -308,6 +308,20 @@ func (s *Server) handle(line string) (resp string, quit bool) { return rprt(0), false default: + // A frame ending in ';' is not a rigctl command at all — it is raw rig + // dialect (Kenwood/Elecraft/Yaesu), which means the client is configured + // with a RIG MODEL pointing at this port instead of "Hamlib NET rigctl". + // + // Worth naming, because the symptom hides the cause completely: we answer + // RPRT -11 like any unknown command, but that reply has no ';' to terminate + // on, so the client's parser waits and then reports "reply incomplete, got + // nothing". The operator sees a timeout and concludes the CAT share is + // broken, when it is a one-line setting in the other program. + if strings.HasSuffix(line, ";") && !strings.Contains(line, " ") { + s.log("rigctld: %q is a raw rig command, not rigctl — the client is set to a RIG MODEL; "+ + "it must be set to \"Hamlib NET rigctl\" (rig 2) at this address", line) + return rprt(-11), false + } // RPRT -11 is "command not implemented". Answering something is essential: // a client waiting on a silent socket hangs rather than degrading. s.log("rigctld: unimplemented command %q", line)