From 74b33af1b565e301be80d56c25a5a20eac777060 Mon Sep 17 00:00:00 2001 From: Dario Ventura Date: Sun, 11 Sep 2016 02:19:41 +0200 Subject: [PATCH] TS2000 Satellite mode and Gpredict Hi, Gpredict issues set_vfo commands on sat track engage to switch a/b vfo and set downlink/uplink frequency. Although this generally works, Kenwood TS2000 has its own style during satellite operation: 1) vfo B is *always* for uplink 2) vfo A is *always* for downlink so vfo selection (FR command) doesn't work: kenwood firmware doesn't recognize it in Satellite mode. When Gpredict is trying to set_vfo on TS2000 in Satellite mode it loops on unrecognized FR command and freezes. Attached patch checks for TS2000 Satellite mode status and if ON "disables" set_vfo command. This allows Gpredict to track downlink/uplink frequency on TS2000 (you need to configure manually downlink/uplink band on the rig before engaging) Please be aware this isn't a "Gpredict patch": it fixes set_vfo behavior in satellite mode according to ts2000 firmware. 73, Ciao Dario Ventura, IZ7CRX --- kenwood/kenwood.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/kenwood/kenwood.c b/kenwood/kenwood.c index 3aeb99965..9cc14667d 100644 --- a/kenwood/kenwood.c +++ b/kenwood/kenwood.c @@ -727,6 +727,25 @@ int kenwood_set_vfo(RIG *rig, vfo_t vfo) return -RIG_EINVAL; } + //if rig=ts2000 then check Satellite mode status + if(rig->caps->rig_model == RIG_MODEL_TS2000) { + char retbuf[20]; + rig_debug(RIG_DEBUG_VERBOSE, "Checking Satellite mode status\n"); + sprintf(cmdbuf, "SA"); + + retval = kenwood_transaction(rig, cmdbuf, retbuf, 20); + if (retval != RIG_OK) + return retval; + + rig_debug(RIG_DEBUG_VERBOSE, "Satellite mode status %s\n",retbuf); + //Satellite mode ON + if(retbuf[2]=='1') { + //SAT mode doesn't allow FR command (cannot select VFO) + //selecting VFO is useless in SAT MODE + return RIG_OK; + } + } + sprintf(cmdbuf, "FR%c", vfo_function); if (rig->caps->rig_model == RIG_MODEL_TS50