From 130cc330a2e04d6eabff7d4dfa4de7bfe2bd95e3 Mon Sep 17 00:00:00 2001 From: Nate Bargmann Date: Mon, 20 Jan 2025 20:06:11 -0600 Subject: [PATCH 01/16] Revert "Prepare for 4.6.1 release" --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 609db450d..9bf5390d2 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ dnl Please do not use '-' in the version number, as package managers will fail, dnl however, the use of '~' should be fine as apt (others?) will treat dnl it as an earlier version than the actual release. TNX KA6MAL dnl PACKAGE_NAME + " " + PACKAGE_VERSION must not exceed 20 chars! -AC_INIT([Hamlib],[4.6.1],[hamlib-developer@lists.sourceforge.net],[hamlib],[http://www.hamlib.org]) +AC_INIT([Hamlib],[4.7~git],[hamlib-developer@lists.sourceforge.net],[hamlib],[http://www.hamlib.org]) #AC_INIT([PRODUCT_NAME], [Hamlib]) #AC_DEFINE([Hamlib], [PRODUCT_VERSION_RESOURCE]) @@ -76,7 +76,7 @@ dnl See README.release on setting these values # Set them here to keep c++/Makefile and src/Makefile in sync. ABI_VERSION=4 ABI_REVISION=6 -ABI_PATCH=1 +ABI_PATCH=0 ABI_AGE=0 AC_DEFINE_UNQUOTED([ABI_VERSION], [$ABI_VERSION], [Frontend ABI version]) From 3ccdabd9b9a3c16be5ecd2e6f40e450700b69ffc Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Mon, 20 Jan 2025 23:04:24 -0600 Subject: [PATCH 02/16] Fix SDRConsole by removing a lot of things that it does not have --- NEWS | 10 +++++++ rigs/kenwood/ts2000.c | 67 +++++++++++++++++++++++-------------------- 2 files changed, 46 insertions(+), 31 deletions(-) diff --git a/NEWS b/NEWS index 37ec46881..df5ce61f5 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,16 @@ Version 5.x -- future * rot_get_conf deprecated and replaced by rot_get_conf2 * Change FT1000MP Mark V model names to align with FT1000MP +Version 4.6.1 + * Fix C++ builds failing on rig_list_foreach function + * Fix IC9100 rigctld startup to end up on VFOA + * Fix grig build by removing sys/socket.h -- apparently not needed + * Add new QMX entry to fix incompability with QDX + * Fix IC746/PROT to not use data byte + * FLRig to add DATA-U DATA-L modes + * Fix TS570 RIG_LEVEL_STRENGTH with cal table + * Remove get_powerstat from IC785X -- not supported + Version 4.6 * send_raw can now take hex digits as colon-separated -- e.g. send_raw icom xfe:xfe:x94:xe0:03:xfd * Add IC7760 diff --git a/rigs/kenwood/ts2000.c b/rigs/kenwood/ts2000.c index 44d3e9b04..7e24a20ef 100644 --- a/rigs/kenwood/ts2000.c +++ b/rigs/kenwood/ts2000.c @@ -39,10 +39,15 @@ RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB|RIG_LEVEL_NR|RIG_LEVEL_PREAMP|RIG_LEVEL_COMP|RIG_LEVEL_ATT|RIG_LEVEL_VOXDELAY|RIG_LEVEL_VOXGAIN|RIG_LEVEL_BKIN_DLYMS| \ RIG_LEVEL_METER|RIG_LEVEL_SWR|RIG_LEVEL_COMP_METER|RIG_LEVEL_ALC|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_SLOPE_HIGH|RIG_LEVEL_SLOPE_LOW) + #define TS2000_LEVEL_SET (RIG_LEVEL_RFPOWER|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_AGC|RIG_LEVEL_MICGAIN|RIG_LEVEL_KEYSPD|RIG_LEVEL_CWPITCH| \ RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB|RIG_LEVEL_NR|RIG_LEVEL_PREAMP|RIG_LEVEL_COMP|RIG_LEVEL_ATT|RIG_LEVEL_VOXDELAY|RIG_LEVEL_VOXGAIN|RIG_LEVEL_BKIN_DLYMS| \ RIG_LEVEL_METER|RIG_LEVEL_SLOPE_HIGH|RIG_LEVEL_SLOPE_LOW) +#define SDRCONSOLE_LEVEL_GET (|RIG_LEVEL_AGC|RIG_LEVEL_STRENGTH|RIG_LEVEL_METER|RIG_LEVEL_SLOPE_HIGH|RIG_LEVEL_SLOPE_LOW) +#define SDRCONSOLE_LEVEL_SET (RIG_LEVEL_NONE) + + #define TS2000_FUNC_ALL (RIG_FUNC_NB|RIG_FUNC_COMP|RIG_FUNC_VOX|RIG_FUNC_NR|RIG_FUNC_NR|RIG_FUNC_BC|RIG_FUNC_BC2|RIG_FUNC_RIT|RIG_FUNC_XIT| \ RIG_FUNC_TUNER|RIG_FUNC_MON|RIG_FUNC_FBKIN|RIG_FUNC_LOCK|RIG_FUNC_TONE|RIG_FUNC_TSQL|RIG_FUNC_ANF) @@ -1939,7 +1944,7 @@ struct rig_caps sdrconsole_caps = RIG_MODEL(RIG_MODEL_SDRCONSOLE), .model_name = "SDRConsole", .mfg_name = "SDR Radio", - .version = BACKEND_VER ".2", + .version = BACKEND_VER ".3", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -2142,46 +2147,46 @@ struct rig_caps sdrconsole_caps = .rig_cleanup = kenwood_cleanup, .set_freq = kenwood_set_freq, .get_freq = kenwood_get_freq, - .set_rit = ts2000_set_rit, - .get_rit = ts2000_get_rit, - .set_xit = ts2000_set_rit, - .get_xit = ts2000_get_rit, + //.set_rit = ts2000_set_rit, + //.get_rit = ts2000_get_rit, + //.set_xit = ts2000_set_rit, + //.get_xit = ts2000_get_rit, .set_mode = kenwood_set_mode, .get_mode = kenwood_get_mode, .set_vfo = kenwood_set_vfo, .get_vfo = kenwood_get_vfo_if, .set_split_vfo = kenwood_set_split_vfo, .get_split_vfo = kenwood_get_split_vfo_if, - .set_ctcss_tone = kenwood_set_ctcss_tone_tn, - .get_ctcss_tone = kenwood_get_ctcss_tone, - .set_ctcss_sql = kenwood_set_ctcss_sql, - .get_ctcss_sql = kenwood_get_ctcss_sql, + //.set_ctcss_tone = kenwood_set_ctcss_tone_tn, + //.get_ctcss_tone = kenwood_get_ctcss_tone, + //.set_ctcss_sql = kenwood_set_ctcss_sql, + //.get_ctcss_sql = kenwood_get_ctcss_sql, .get_ptt = kenwood_get_ptt, .set_ptt = kenwood_set_ptt, - .get_dcd = kenwood_get_dcd, - .set_func = ts2000_set_func, - .get_func = ts2000_get_func, + //.get_dcd = kenwood_get_dcd, + //.set_func = ts2000_set_func, + //.get_func = ts2000_get_func, .set_level = ts2000_set_level, .get_level = ts2000_get_level, - .set_ext_func = ts2000_set_ext_func, - .get_ext_func = ts2000_get_ext_func, - .set_ext_level = ts2000_set_ext_level, - .get_ext_level = ts2000_get_ext_level, - .set_ant = kenwood_set_ant, - .get_ant = kenwood_get_ant, - .send_morse = kenwood_send_morse, - .wait_morse = rig_wait_morse, - .send_voice_mem = kenwood_send_voice_mem, - .stop_voice_mem = kenwood_stop_voice_mem, - .vfo_op = kenwood_vfo_op, - .scan = kenwood_scan, - .set_mem = kenwood_set_mem, - .get_mem = kenwood_get_mem, - .get_channel = ts2000_get_channel, - .set_channel = ts2000_set_channel, - .set_trn = kenwood_set_trn, - .get_trn = kenwood_get_trn, - .set_powerstat = kenwood_set_powerstat, + //.set_ext_func = ts2000_set_ext_func, + //.get_ext_func = ts2000_get_ext_func, + //.set_ext_level = ts2000_set_ext_level, + //.get_ext_level = ts2000_get_ext_level, + //.set_ant = kenwood_set_ant, + //.get_ant = kenwood_get_ant, + //.send_morse = kenwood_send_morse, + //.wait_morse = rig_wait_morse, + //.send_voice_mem = kenwood_send_voice_mem, + //.stop_voice_mem = kenwood_stop_voice_mem, + //.vfo_op = kenwood_vfo_op, + //.scan = kenwood_scan, + //.set_mem = kenwood_set_mem, + //.get_mem = kenwood_get_mem, + //.get_channel = ts2000_get_channel, + //.set_channel = ts2000_set_channel, + //.set_trn = kenwood_set_trn, + //.get_trn = kenwood_get_trn, + //.set_powerstat = kenwood_set_powerstat, .get_powerstat = kenwood_get_powerstat, .get_info = kenwood_get_info, .reset = kenwood_reset, From bb4eb78d22c312e708cf21a614019970f023b5a4 Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Mon, 20 Jan 2025 23:05:50 -0600 Subject: [PATCH 03/16] Update NEWS --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index df5ce61f5..03f5ee844 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,7 @@ Version 4.6.1 * FLRig to add DATA-U DATA-L modes * Fix TS570 RIG_LEVEL_STRENGTH with cal table * Remove get_powerstat from IC785X -- not supported + * Fix SDRConsole by removing lots of things it does not have Version 4.6 * send_raw can now take hex digits as colon-separated -- e.g. send_raw icom xfe:xfe:x94:xe0:03:xfd From 710dfea56e79bee7ef41d060153d9e22efdf9c61 Mon Sep 17 00:00:00 2001 From: classabbyamp <5366828+classabbyamp@users.noreply.github.com> Date: Fri, 24 Jan 2025 22:40:29 -0500 Subject: [PATCH 04/16] kenwood.h: fix typo looks like `last_mode_pc` was missing a character on the type. This was caught by compiling on musl libc, where `mode_t` wasn't available from any of the other includes. --- rigs/kenwood/kenwood.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h index f1b2d0e07..f553cadc4 100644 --- a/rigs/kenwood/kenwood.h +++ b/rigs/kenwood/kenwood.h @@ -183,7 +183,7 @@ struct kenwood_priv_data int save_k2_ext_lvl; // so we can restore to original int save_k3_ext_lvl; // so we can restore to original -- for future use if needed int voice_bank; /* last voice bank send for use by stop_voice_mem */ - mode_t last_mode_pc; // last mode memory for PC command + rmode_t last_mode_pc; // last mode memory for PC command int power_now,power_min,power_max; }; From 194e18f4e45c1afabeed7f838f32407851474239 Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Sat, 25 Jan 2025 11:02:19 -0600 Subject: [PATCH 05/16] Fix CRC calculation in pmr171.c https://github.com/Hamlib/Hamlib/issues/1483#issuecomment-2614000861 --- rigs/yaesu/pmr171.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rigs/yaesu/pmr171.c b/rigs/yaesu/pmr171.c index 0799a290f..1d7d102c2 100644 --- a/rigs/yaesu/pmr171.c +++ b/rigs/yaesu/pmr171.c @@ -177,9 +177,9 @@ struct rig_caps pmr171_caps = RIG_MODEL(RIG_MODEL_PMR171), .model_name = "PMR-171", .mfg_name = "Guohe", - .version = "20240704.0", + .version = "20250125.0", .copyright = "LGPL", - .status = RIG_STATUS_ALPHA, + .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, .ptt_type = RIG_PTT_RIG, .dcd_type = RIG_DCD_RIG, @@ -456,7 +456,7 @@ static int pmr171_send_cmd1(RIG *rig, unsigned char cmd, unsigned char *reply) unsigned char buf[64] = { 0xa5, 0xa5, 0xa5, 0xa5, 0x03, 0x00, 0x00, 0x00 }; buf[5] = cmd; - unsigned int crc = CRC16Check(&buf[4], 3); + unsigned int crc = CRC16Check(&buf[4], 2); buf[6] = crc >> 8; buf[7] = crc & 0xff; rig_flush(rp); @@ -809,7 +809,7 @@ static int pmr171_set_freq(RIG *rig, vfo_t vfo, freq_t freq) to_bcd_be(&cmd[10], CACHE(rig)->freqMainB, 8); } - unsigned int crc = CRC16Check(&cmd[4], 12); + unsigned int crc = CRC16Check(&cmd[4], 2); cmd[14] = crc >> 8; cmd[15] = crc & 0xff; rig_flush(rp); From 2ed2a998e3d0d932afa184831d469f090fce50fe Mon Sep 17 00:00:00 2001 From: clzls <16474386+clzls@users.noreply.github.com> Date: Sun, 26 Jan 2025 01:35:05 +0800 Subject: [PATCH 06/16] pmr171.c: Fix mode, freq and PTT --- rigs/yaesu/pmr171.c | 171 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 132 insertions(+), 39 deletions(-) diff --git a/rigs/yaesu/pmr171.c b/rigs/yaesu/pmr171.c index 0799a290f..20b9fb51d 100644 --- a/rigs/yaesu/pmr171.c +++ b/rigs/yaesu/pmr171.c @@ -453,19 +453,106 @@ static int pmr171_send_cmd1(RIG *rig, unsigned char cmd, unsigned char *reply) { hamlib_port_t *rp = RIGPORT(rig); rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); - unsigned char buf[64] = { 0xa5, 0xa5, 0xa5, 0xa5, 0x03, 0x00, 0x00, 0x00 }; + unsigned char buf[8] = { 0xa5, 0xa5, 0xa5, 0xa5, 0x03, 0x00, 0x00, 0x00 }; buf[5] = cmd; - unsigned int crc = CRC16Check(&buf[4], 3); + unsigned int crc = CRC16Check(&buf[4], 2); buf[6] = crc >> 8; buf[7] = crc & 0xff; rig_flush(rp); - write_block(rp, buf, 9); + write_block(rp, buf, 8); return RIG_OK; } -rmode_t pmr171_modes[] = { RIG_MODE_USB, RIG_MODE_LSB, RIG_MODE_CWR, RIG_MODE_CW, RIG_MODE_FM, RIG_MODE_FMN, RIG_MODE_PKTUSB, RIG_MODE_RTTY }; +#define GUOHE_MODE_TABLE_MAX 9 +rmode_t pmr171_modes[GUOHE_MODE_TABLE_MAX] = +{ + RIG_MODE_USB, + RIG_MODE_LSB, + RIG_MODE_CWR, + RIG_MODE_CW, + RIG_MODE_AM, + RIG_MODE_FM, + RIG_MODE_FMN, + RIG_MODE_PKTUSB, + RIG_MODE_RTTY // not functioning +}; + +rmode_t guohe2rmode(unsigned char mode, const rmode_t mode_table[]) +{ + rig_debug(RIG_DEBUG_VERBOSE, "%s called, mode=0x%02x\n", __func__, + mode); + + if (mode >= GUOHE_MODE_TABLE_MAX) + { + return (RIG_MODE_NONE); + } + + rig_debug(RIG_DEBUG_VERBOSE, "%s: returning %s\n", __func__, + rig_strrmode(mode_table[mode])); + return (mode_table[mode]); +} + +unsigned char rmode2guohe(rmode_t mode, const rmode_t mode_table[]) +{ + rig_debug(RIG_DEBUG_VERBOSE, "%s called, mode=%s\n", __func__, + rig_strrmode(mode)); + + if (mode != RIG_MODE_NONE) + { + unsigned char i; + + for (i = 0; i < GUOHE_MODE_TABLE_MAX; i++) + { + if (mode_table[i] == mode) + { + rig_debug(RIG_DEBUG_VERBOSE, "%s: returning 0x%02x\n", __func__, i); + return (i); + } + } + } + + return (-1); +} + +/** + * Converting to Big-endian bytes + */ +unsigned char *to_be(unsigned char data[], + unsigned long long freq, + unsigned int byte_len) +{ + int i; + + rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + + for (i = byte_len - 1; i >= 0; i--) + { + unsigned char a = freq & 0xFF; + freq >>= 8; + data[i] = a; + } + + return data; +} + + +unsigned long long from_be(const unsigned char data[], + unsigned int byte_len) +{ + int i; + unsigned long long f = 0; + + rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + + for (i = 0; i < byte_len; i++) + { + f = (f << 8) + data[i]; + } + + return f; +} static int pmr171_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) { @@ -484,8 +571,8 @@ static int pmr171_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) pmr171_send_cmd1(rig, 0x0b, 0); read_block(rp, reply, 5); read_block(rp, &reply[5], reply[4]); - vfoa = from_bcd_be(&reply[9], 8); - vfob = from_bcd_be(&reply[13], 8); + vfoa = from_be(&reply[9], 4); + vfob = from_be(&reply[13], 4); cachep->freqMainA = vfoa; cachep->freqMainB = vfob; rig_debug(RIG_DEBUG_VERBOSE, "%s: vfoa=%.0f, vfob=%.0f\n", __func__, vfoa, @@ -494,8 +581,8 @@ static int pmr171_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) // Now grab the ptt status cachep->ptt = reply[6] == 1; // And the mode - cachep->modeMainA = pmr171_modes[reply[7]]; - cachep->modeMainB = pmr171_modes[reply[8]]; + cachep->modeMainA = guohe2rmode(reply[7], pmr171_modes); + cachep->modeMainB = guohe2rmode(reply[8], pmr171_modes); if (vfo == RIG_VFO_B) { *freq = cachep->freqMainA; } else { *freq = cachep->freqMainB; } @@ -790,7 +877,7 @@ static int pmr171_send_icmd(RIG *rig, int index, const unsigned char *data) static int pmr171_set_freq(RIG *rig, vfo_t vfo, freq_t freq) { - unsigned char cmd[16] = { 0xa5, 0xa5, 0xa5, 0xa5, 12, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + unsigned char cmd[16] = { 0xa5, 0xa5, 0xa5, 0xa5, 11, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; unsigned char reply[16]; //int retval; hamlib_port_t *rp = RIGPORT(rig); @@ -800,16 +887,16 @@ static int pmr171_set_freq(RIG *rig, vfo_t vfo, freq_t freq) /* fill in the frequency */ if (vfo == RIG_VFO_B) { - to_bcd_be(&cmd[6], CACHE(rig)->freqMainA, 8); - to_bcd_be(&cmd[10], freq, 8); + to_be(&cmd[6], CACHE(rig)->freqMainA, 4); + to_be(&cmd[10], freq, 4); } else { - to_bcd_be(&cmd[6], freq, 8); - to_bcd_be(&cmd[10], CACHE(rig)->freqMainB, 8); + to_be(&cmd[6], freq, 4); + to_be(&cmd[10], CACHE(rig)->freqMainB, 4); } - unsigned int crc = CRC16Check(&cmd[4], 12); + unsigned int crc = CRC16Check(&cmd[4], 10); cmd[14] = crc >> 8; cmd[15] = crc & 0xff; rig_flush(rp); @@ -823,34 +910,38 @@ static int pmr171_set_freq(RIG *rig, vfo_t vfo, freq_t freq) static int pmr171_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) { hamlib_port_t *rp = RIGPORT(rig); - unsigned char cmd[10] = { 0xa5, 0xa5, 0xa5, 0xa5, 3, 0x0a, 0x00, 0x00, 0x00, 0x00 }; + unsigned char cmd[10] = { 0xa5, 0xa5, 0xa5, 0xa5, 5, 0x0a, 0x00, 0x00, 0x00, 0x00 }; unsigned char reply[10]; - int i, crc; + int crc; + unsigned char i = rmode2guohe(mode, pmr171_modes); - for (i = 0; i < sizeof(pmr171_modes) / sizeof(rmode_t); ++i) + if (i != (-1)) { - if (pmr171_modes[i] == mode) + if (vfo == RIG_VFO_B) { - if (vfo == RIG_VFO_B) - { - cmd[6] = CACHE(rig)->modeMainA; - cmd[7] = i; - } - else - { - cmd[6] = i; - cmd[7] = CACHE(rig)->modeMainB; - } - - crc = CRC16Check(&cmd[4], 4); - cmd[8] = crc >> 8; - cmd[9] = crc & 0xff; - rig_flush(rp); - write_block(rp, cmd, 16); - read_block(rp, reply, 16); - dump_hex(reply, 16); - return RIG_OK; + cmd[6] = rmode2guohe(CACHE(rig)->modeMainA, pmr171_modes); + cmd[7] = i; + } + else + { + cmd[6] = i; + cmd[7] = rmode2guohe(CACHE(rig)->modeMainB, pmr171_modes); } + + crc = CRC16Check(&cmd[4], 4); + cmd[8] = crc >> 8; + cmd[9] = crc & 0xff; + rig_flush(rp); + write_block(rp, cmd, 10); + read_block(rp, reply, 5); + read_block(rp, &reply[5], reply[4]); + dump_hex(reply, reply[4] + 5); + /* + // Grab the modes + CACHE(rig)->modeMainA = guohe2rmode(reply[6], pmr171_modes); + CACHE(rig)->modeMainB = guohe2rmode(reply[7], pmr171_modes); + */ + return RIG_OK; } rig_debug(RIG_DEBUG_ERR, "%s: invalid mode=%s\n", __func__, rig_strrmode(mode)); @@ -863,13 +954,15 @@ static int pmr171_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt) hamlib_port_t *rp = RIGPORT(rig); rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); + // According to the manual, sending 0 means PTT ON. + // TODO: How to process ack messages? switch (ptt) { case RIG_PTT_ON: - return pmr171_send_cmd2(rig, 0x07, 0x01, 1); + return pmr171_send_cmd2(rig, 0x07, 0x00, 1); case RIG_PTT_OFF: - return pmr171_send_cmd2(rig, 0x07, 0x00, 0); + return pmr171_send_cmd2(rig, 0x07, 0x01, 1); default: return -RIG_EINVAL; From e44da73e9a0714efab2c67f6f15904f7116b612e Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Sat, 25 Jan 2025 11:59:25 -0600 Subject: [PATCH 07/16] Revert "Fix CRC calculation in pmr171.c" Pull request being done instead This reverts commit 194e18f4e45c1afabeed7f838f32407851474239. --- rigs/yaesu/pmr171.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rigs/yaesu/pmr171.c b/rigs/yaesu/pmr171.c index 1d7d102c2..0799a290f 100644 --- a/rigs/yaesu/pmr171.c +++ b/rigs/yaesu/pmr171.c @@ -177,9 +177,9 @@ struct rig_caps pmr171_caps = RIG_MODEL(RIG_MODEL_PMR171), .model_name = "PMR-171", .mfg_name = "Guohe", - .version = "20250125.0", + .version = "20240704.0", .copyright = "LGPL", - .status = RIG_STATUS_STABLE, + .status = RIG_STATUS_ALPHA, .rig_type = RIG_TYPE_TRANSCEIVER, .ptt_type = RIG_PTT_RIG, .dcd_type = RIG_DCD_RIG, @@ -456,7 +456,7 @@ static int pmr171_send_cmd1(RIG *rig, unsigned char cmd, unsigned char *reply) unsigned char buf[64] = { 0xa5, 0xa5, 0xa5, 0xa5, 0x03, 0x00, 0x00, 0x00 }; buf[5] = cmd; - unsigned int crc = CRC16Check(&buf[4], 2); + unsigned int crc = CRC16Check(&buf[4], 3); buf[6] = crc >> 8; buf[7] = crc & 0xff; rig_flush(rp); @@ -809,7 +809,7 @@ static int pmr171_set_freq(RIG *rig, vfo_t vfo, freq_t freq) to_bcd_be(&cmd[10], CACHE(rig)->freqMainB, 8); } - unsigned int crc = CRC16Check(&cmd[4], 2); + unsigned int crc = CRC16Check(&cmd[4], 12); cmd[14] = crc >> 8; cmd[15] = crc & 0xff; rig_flush(rp); From 62071273aae744b8dedf739be2ae1575f75a51a2 Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Sat, 25 Jan 2025 12:05:38 -0600 Subject: [PATCH 08/16] Prompt PMR-171 to stable --- rigs/yaesu/pmr171.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rigs/yaesu/pmr171.c b/rigs/yaesu/pmr171.c index 20b9fb51d..46d3b3d69 100644 --- a/rigs/yaesu/pmr171.c +++ b/rigs/yaesu/pmr171.c @@ -179,7 +179,7 @@ struct rig_caps pmr171_caps = .mfg_name = "Guohe", .version = "20240704.0", .copyright = "LGPL", - .status = RIG_STATUS_ALPHA, + .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, .ptt_type = RIG_PTT_RIG, .dcd_type = RIG_DCD_RIG, From 79f5a08210d94e26eb7908a16ad53fa10d9936a0 Mon Sep 17 00:00:00 2001 From: Tom Schaefer Date: Mon, 27 Jan 2025 12:12:16 -0500 Subject: [PATCH 09/16] Update README.developer Removed s from end of the build-essential package. It is just build-essential. There is no such package as build-essentials. --- README.developer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.developer b/README.developer index 676acbfc7..2b5f64695 100644 --- a/README.developer +++ b/README.developer @@ -239,7 +239,7 @@ That is, if you want to take part in the development of Hamlib, you'll need the following tools. Make sure you have at least the required version or you won't even be able to build from the Git clone. -N.B. The Debian and derivatives (Ubuntu and friends) 'build-essentials' +N.B. The Debian and derivatives (Ubuntu and friends) 'build-essential' package will install a number of tools and minimize the number of packages that need to be installed manually (Debian package names are listed, other distributions may differ). From 9ffbf632903d5642d4ceb2bb322baab671fed6be Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Thu, 30 Jan 2025 11:50:57 -0600 Subject: [PATCH 10/16] Add priv back to QMX as can cause segfault in some cases --- rigs/kenwood/ts480.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 4cb0eb789..043f25334 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -1943,7 +1943,7 @@ struct rig_caps qrplabs_qmx_caps = RIG_MODEL(RIG_MODEL_QRPLABS_QMX), .model_name = "QMX", .mfg_name = "QRPLabs", - .version = BACKEND_VER ".1", + .version = BACKEND_VER ".2", .copyright = "LGPL", .status = RIG_STATUS_BETA, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -1980,6 +1980,8 @@ struct rig_caps qrplabs_qmx_caps = RIG_FLT_END, }, + .priv = (void *)& ts480_priv_caps, + .rig_init = ts480_init, .rig_open = qrplabs_open, .rig_cleanup = kenwood_cleanup, From 62e44940cfa8d6ff365cb931f6e387398b26a62b Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Thu, 30 Jan 2025 12:09:35 -0600 Subject: [PATCH 11/16] Add to Segfault user award --- Segfault-award | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Segfault-award b/Segfault-award index 4bf3b4be2..e775238db 100644 --- a/Segfault-award +++ b/Segfault-award @@ -37,3 +37,6 @@ Here is the list of the brave fellows: * Josef 'Jeff' Sipek netrigctl power2mW overflow https://github.com/Hamlib/Hamlib/issues/855 + +* David Balharrie M0DGB + Using python caused seg fault on QMX due to missing priv structure From 5ecc1934fc338608c46267df584c903fb847b751 Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Thu, 30 Jan 2025 22:59:01 -0600 Subject: [PATCH 12/16] Add IC910 to Icom exceptions in rig.c --- src/rig.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/rig.c b/src/rig.c index a380cf18a..739a17fce 100644 --- a/src/rig.c +++ b/src/rig.c @@ -169,6 +169,8 @@ const char hamlib_copyright[231] = /* hamlib 1.2 ABI specifies 231 bytes */ #define CHECK_RIG_ARG(r) (!(r) || !(r)->caps || !STATE((r))->comm_state) #define CHECK_RIG_CAPS(r) (!(r) || !(r)->caps) +#define ICOM_EXCEPTIONS (rig->caps->rig_model == RIG_MODEL_IC9700 || rig->caps->rig_model == RIG_MODEL_IC9100 || rig->caps->rig_model == RIG_MODEL_IC910) + // The LOCK macro is for the primary thread calling the rig functions // For a separate thread use rig_lock directly // The purpose here is to avoid deadlock during recursion @@ -1547,7 +1549,7 @@ int HAMLIB_API rig_open(RIG *rig) { vfo_t myvfo = RIG_VFO_A; - if (rig->caps->rig_model == RIG_MODEL_IC9700 || rig->caps->rig_model == RIG_MODEL_IC9100) { myvfo = RIG_VFO_MAIN_A; } + if (ICOM_EXCEPTIONS) { myvfo = RIG_VFO_MAIN_A; } retval = rig_get_freq(rig, myvfo, &freq); @@ -1557,7 +1559,7 @@ int HAMLIB_API rig_open(RIG *rig) vfo_t tx_vfo = RIG_VFO_NONE; myvfo = RIG_VFO_B; - if (rig->caps->rig_model == RIG_MODEL_IC9700 || rig->caps->rig_model == RIG_MODEL_IC9100) { myvfo = RIG_VFO_MAIN_B; } + if (ICOM_EXCEPTIONS) { myvfo = RIG_VFO_MAIN_B; } rig_get_freq(rig, myvfo, &freq); rig_get_split_vfo(rig, RIG_VFO_RX, &split, &tx_vfo); @@ -1570,7 +1572,8 @@ int HAMLIB_API rig_open(RIG *rig) { myvfo = RIG_VFO_A; - if (rig->caps->rig_model == RIG_MODEL_IC9700 || rig->caps->rig_model == RIG_MODEL_IC9100) { myvfo = RIG_VFO_MAIN_A; } + if (ICOM_EXCEPTIONS) { myvfo = RIG_VFO_MAIN_A; } + rig_get_mode(rig, myvfo, &mode, &width); @@ -1578,7 +1581,7 @@ int HAMLIB_API rig_open(RIG *rig) { myvfo = RIG_VFO_B; - if (rig->caps->rig_model == RIG_MODEL_IC9700 || rig->caps->rig_model == RIG_MODEL_IC9100) { myvfo = RIG_VFO_MAIN_A; } + if (ICOM_EXCEPTIONS) { myvfo = RIG_VFO_MAIN_A; } rig_debug(RIG_DEBUG_VERBOSE, "xxxsplit=%d\n", split); HAMLIB_TRACE; From 6e704c5bc8a374af5db07e76a7a11c15463540ed Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Fri, 31 Jan 2025 07:29:04 -0600 Subject: [PATCH 13/16] Update NEWS --- NEWS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NEWS b/NEWS index 03f5ee844..eb4c0c89a 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,11 @@ Version 5.x -- future * rot_get_conf deprecated and replaced by rot_get_conf2 * Change FT1000MP Mark V model names to align with FT1000MP +Version 4.6.2 + * Fix IC905 for gpredict + * Fix potential segfault on QMX + * Fix pmr171 + Version 4.6.1 * Fix C++ builds failing on rig_list_foreach function * Fix IC9100 rigctld startup to end up on VFOA From a0df573df760ea8c137a26581d46d46abaf5a6c0 Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Tue, 4 Feb 2025 11:45:56 -0600 Subject: [PATCH 14/16] Reduce good news about serial port to verbose --- src/serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serial.c b/src/serial.c index 2d6fd5a7c..6fdecc739 100644 --- a/src/serial.c +++ b/src/serial.c @@ -242,7 +242,7 @@ int HAMLIB_API serial_open(hamlib_port_t *rp) return -RIG_EIO; case SER_AVAILABLE: - rig_debug(RIG_DEBUG_ERR, "%s: serial port %s is OK\n", __func__, rp->pathname); + rig_debug(RIG_DEBUG_VERBOSE, "%s: serial port %s is OK\n", __func__, rp->pathname); break; } From c939f1a83ac1b7ad1bb903120da13f19b468e4be Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Wed, 5 Feb 2025 08:01:14 -0600 Subject: [PATCH 15/16] Add missing levels for IC746/Pro RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_SWR|RIG_LEVEL_ALC --- NEWS | 1 + rigs/icom/ic746.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index eb4c0c89a..d30dfad21 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,7 @@ Version 5.x -- future * Change FT1000MP Mark V model names to align with FT1000MP Version 4.6.2 + * Add missing levels for IC746/PRO RIG_LEVEL_RFPOWER_METER,RIG_LEVEL_RFPOWER_METER_WATTS,RIG_LEVEL_SWR,RIG_LEVEL_ALC * Fix IC905 for gpredict * Fix potential segfault on QMX * Fix pmr171 diff --git a/rigs/icom/ic746.c b/rigs/icom/ic746.c index f8386e41b..6ace9675b 100644 --- a/rigs/icom/ic746.c +++ b/rigs/icom/ic746.c @@ -54,7 +54,7 @@ #define IC746_FUNC_ALL (RIG_FUNC_NB|RIG_FUNC_COMP|RIG_FUNC_VOX|RIG_FUNC_TONE|RIG_FUNC_TSQL|RIG_FUNC_SBKIN|RIG_FUNC_FBKIN|RIG_FUNC_NR|RIG_FUNC_MON|RIG_FUNC_MN|RIG_FUNC_RF|RIG_FUNC_ANF|RIG_FUNC_APF|RIG_FUNC_RESUME|RIG_FUNC_ARO) -#define IC746_LEVEL_ALL (RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_COMP|RIG_LEVEL_BKINDL|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_CWPITCH|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_KEYSPD|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_SQL|RIG_LEVEL_RAWSTR|RIG_LEVEL_APF|RIG_LEVEL_AGC_TIME) +#define IC746_LEVEL_ALL (RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_COMP|RIG_LEVEL_BKINDL|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_CWPITCH|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_KEYSPD|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_SQL|RIG_LEVEL_RAWSTR|RIG_LEVEL_APF|RIG_LEVEL_AGC_TIME|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_RFPOWER_METER_WATTS|RIG_LEVEL_SWR|RIG_LEVEL_ALC) #define IC746_GET_PARM (RIG_PARM_BACKLIGHT|RIG_PARM_BEEP) #define IC746_SET_PARM (RIG_PARM_BACKLIGHT|RIG_PARM_BEEP|RIG_PARM_ANN) @@ -181,7 +181,7 @@ struct rig_caps ic746_caps = RIG_MODEL(RIG_MODEL_IC746), .model_name = "IC-746", .mfg_name = "Icom", - .version = BACKEND_VER ".4", + .version = BACKEND_VER ".5", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, From 8703647c8cb277cad66f5a4eaff103126b7a1b5a Mon Sep 17 00:00:00 2001 From: Nate Bargmann Date: Sun, 9 Feb 2025 15:03:50 -0600 Subject: [PATCH 16/16] Prepare for 4.6.2 release Making this a branch off of the current master as it just has fixes since the 4.6.1 release. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 9bf5390d2..7d59a9c21 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ dnl Please do not use '-' in the version number, as package managers will fail, dnl however, the use of '~' should be fine as apt (others?) will treat dnl it as an earlier version than the actual release. TNX KA6MAL dnl PACKAGE_NAME + " " + PACKAGE_VERSION must not exceed 20 chars! -AC_INIT([Hamlib],[4.7~git],[hamlib-developer@lists.sourceforge.net],[hamlib],[http://www.hamlib.org]) +AC_INIT([Hamlib],[4.6.2],[hamlib-developer@lists.sourceforge.net],[hamlib],[http://www.hamlib.org]) #AC_INIT([PRODUCT_NAME], [Hamlib]) #AC_DEFINE([Hamlib], [PRODUCT_VERSION_RESOURCE]) @@ -76,7 +76,7 @@ dnl See README.release on setting these values # Set them here to keep c++/Makefile and src/Makefile in sync. ABI_VERSION=4 ABI_REVISION=6 -ABI_PATCH=0 +ABI_PATCH=2 ABI_AGE=0 AC_DEFINE_UNQUOTED([ABI_VERSION], [$ABI_VERSION], [Frontend ABI version])