From ed33a235f4acd515bc415556343b599698958387 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Mon, 22 Jul 2024 16:57:14 -0500 Subject: [PATCH] Try to fix IC-7100 remote operation echo oddity https://github.com/Hamlib/Hamlib/issues/1575 --- rigs/icom/frame.c | 4 ++++ rigs/icom/icom.c | 3 +-- rigs/icom/icom.h | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/rigs/icom/frame.c b/rigs/icom/frame.c index 30cfdd225..ff9ccf348 100644 --- a/rigs/icom/frame.c +++ b/rigs/icom/frame.c @@ -221,6 +221,10 @@ again1: rig_debug(RIG_DEBUG_VERBOSE, "%s: subcmd x%02d != buf x%02x so retry read\n", __func__, subcmd, buf[5]); goto again1; } + if (sendbuf[3] != buf[2]) { // then the reply controller addr is not the same so skip it + rig_debug(RIG_DEBUG_VERBOSE, "%s: subcmd x%02d != buf x%02x so retry read\n", __func__, subcmd, buf[5]); + goto again1; + } // we might have 0xfe string during rig wakeup rig_debug(RIG_DEBUG_TRACE, "%s: DEBUG retval=%d, frm_len=%d, cmd=0x%02x\n", diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 65f1cfa47..d0cf8779c 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -8970,8 +8970,7 @@ int icom_is_async_frame(RIG *rig, size_t frame_length, } /* Spectrum scope data is not CI-V transceive data, but handled the same way as it is pushed by the rig */ - // IC-7100 sends 0xe1 for broadcast frame? - return frame[2] == 0xe1 || frame[2] == BCASTID || (frame[2] == CTRLID && frame[4] == C_CTL_SCP + return frame[2] == BCASTID || (frame[2] == CTRLID && frame[4] == C_CTL_SCP && frame[5] == S_SCP_DAT); } diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 2933748b4..2d64d643d 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -35,7 +35,7 @@ #include #endif -#define BACKEND_VER "20240717" +#define BACKEND_VER "20240722" #define ICOM_IS_ID31 rig_is_model(rig, RIG_MODEL_ID31) #define ICOM_IS_ID51 rig_is_model(rig, RIG_MODEL_ID51)