See 'rigs/simplecat/SIMPLE_CAT_PROTOCOL.md' for the protocol spec.
Notes:
- Memory correctness checks were done using Valgrind.
- Tested with wsjtx-3.1.0_improved_PLUS_260228.tgz (with mods) and
Bunzee Labs' DDX HF Digital Transceiver
https://bunzee-labs.com/products/ddx
Tested on:
- Ubuntu Linux
- macOS Tahoe
- Windows 11
(cherry picked from commit debe6fcaf9)
This shouldn't be needed, but somebody somewhere sometime is going
to use an old rigctl with a new hamlib and get an undefined symbol.
Should go away with 5.0.
Re: GitHub Issue #1895
Thanks to inspiration from Jan Engelhardt <ej@inai.de> via the GNU
automake mailing list on Thu, 25 Sep 2025 20:40:21 +0200 (CEST):
https://lists.gnu.org/archive/html/automake/2025-09/msg00013.html
The 'diff' command has been wrapped inside an 'if' conditional to
hopefully hide its return value from FreeBSD make.
Also make a couple other small changes.
Re: GitHub Issue #1895
In response to a query to the automake mailing list, this reply was
received:
On Wednesday 2025-09-24 19:05, Nate Bargmann wrote:
>make[1]: don't know how to make ./hamlibdatetime.h. Stop
Something wanted to make "./hamlibdatetime.h", but you only provide
a rule for "hamlibdatetime.h":
>hamlibdatetime.h: FORCE
> @if test -x $(top_srcdir)/.git ; then \
> echo "/* This date time is from the last non-merge commit to Hamlib. */" > $(builddir)/$(@F).tmp ;\
> echo "#define HAMLIBDATETIME "\"$$(TZ=UTC git --git-dir=$(top_srcdir)/.git log --no-merges
+--date='format-local:%Y-%m-%dT%H:%M:%SZ SHA=' --format='%cd' -n 1)$$(git --git-dir=$(top_srcdir)/.git log --no-merges -n 1 | head
+-n 1 | cut -c8-13)\" >> $(builddir)/$(@F).tmp ;\
The distinction is important.
>BUILT_SOURCES = $(builddir)/hamlibdatetime.h
All targets are already relative to ${builddir},
so explicitly mentioning ${builddir} is wrong for
targets, and redundant in the recipe.
----------------------
Removing "$(builddir)/" allows FreeBSD make to enter the rule. GNU make
wasn't bothered by the prepending of the path when comparing to the
Makefile target.
As reported in GitHub issue #1892, configure on FreeBSD failed to search
for the name of the library correctly which is libusb. As pkg-config
correctly holds the library name for linking, modify the search for
libusb-1.0 to use the pkg-config capability. If pkg-config (now largely
replaced by pkgconf) is not installed or found, the modules depending on
it will be gracefull disabled, i.e. the configure script will complete
with those modules disabled.
Modify the output summary to use spaces instead of tabs as things were
not lining up nicely in my FreeBSD terminal.
Rename the Automake substituted variable 'HAVE_LIBUSB' to
'TESTS_HAVE_LIBUSB' to avoid confusion with identically named variable
written to include/hamlib/config.h.
Likewise, rename the AutoConf substituted name 'LIBUSB' to
'HAMLIB_PC_LIBUSB' to avoid confusion with the 'LIBUSB' string passed to
PKG_CHECK_MODULES.
Update hamlib.pc.in and tests/Makefile.am to use the new variable names.
Make sure all source files no longer reference HAVE_LIBUSB_H or
HAVE_LIBUSB_1_0_LIBUSB_H as these variables no longer exist.
Fix src/Makefile.am to provide include path for usb_port.c.
Turn off -x option in cppcheck.sh, fix missing '\'.
This fixes all the "error" messages from cppcheck except those
due to its own inability to handle concatenated format strings.
Avoids a segfault in lower level functions that can more easily
happen when using the bindings.
Simmetric with amp_get_conf() via amp_get_conf2() and rot_get_conf()
via rot_get_conf2().
This is a followup of commit ede84bfce4
that made the same change to conf.c
Test case:
tests/rigctl get_conf range_list_number get_conf range_list_name
error = *1:event.c(269):rig_poll_routine_start entered
*1:event.c(309):rig_poll_routine_start returning(0)
rig.c(294):add_opened_rig entered
rig.c(306):add_opened_rig returning2(0)
rig.c(1669):rig_open returning2(0)
*1:rig.c(6904):rig_get_powerstat entered
*rig.c(6918) trace
**2:dummy.c(1680):dummy_get_powerstat entered
**2:dummy.c(1683):dummy_get_powerstat returning(0)
*1:rig.c(6931):rig_get_powerstat returning(0)
Backend version: 20240709.0, Status: Stable
rigctl_parse: called, interactive=0
rigctl_parse: vfo_opt=0
rig_set_cache_timeout_ms: called selection=0, ms=1000
rig_set_cache_timeout_ms: called selection=0, ms=1000
rigctl_get_conf:
rig_token_lookup called for range_list_number
rig_confparam_lookup called for range_list_number
rig_get_conf2 called
Feature not available
error = **2:dummy.c(1680):dummy_get_powerstat entered
**2:dummy.c(1683):dummy_get_powerstat returning(0)
*1:rig.c(6931):rig_get_powerstat returning(0)
Backend version: 20240709.0, Status: Stable
rigctl_parse: called, interactive=0
rigctl_parse: vfo_opt=0
rig_set_cache_timeout_ms: called selection=0, ms=1000
rig_set_cache_timeout_ms: called selection=0, ms=1000
rigctl_get_conf:
rig_token_lookup called for range_list_number
rig_confparam_lookup called for range_list_number
rig_get_conf2 called
Feature not available
rigctl_parse: called, interactive=0
rigctl_parse: vfo_opt=0
rigctl_get_conf:
rig_token_lookup called for range_list_name
rig_confparam_lookup called for range_list_name
rig_get_conf2 called
Feature not available
Adds code keeping the same order of token.h to `get_conf` the
following tokens:
freq_skip
offset_vfoa
offset_vfob
range_list_name (always returns an empty string)
range_list_number (always returns 0)
tuner_control_pathname
Change also the descriptions.
Test case
before:
tests/rigctl dump_conf | grep range
Selected range list: "The tx/rx range list in use"
Selected range list: "The tx/rx range list name"
after:
tests/rigctl dump_conf | grep range
range_list_number: "The tx/rx range list number in use"
range_list_name: "The tx/rx range list name in use"
The bug is that we don't know why the string is invalid.
Test case:
before
tests/rigctl -r "invalid:123:port" -m 2
Unhandled host=invalid:123:port
Unhandled host=invalid:123:port
after:
tests/rigctl -r "invalid:123:port" -m 2
(no output)
tests/rigctl -r "invalid:123:port" -m 2 -v
parse_hoststr: Unhandled host=invalid:123:port
parse_hoststr: Unhandled host=invalid:123:port
The function rig_init() doesn't touch the hardware, it's rig_open()
that initiates the connection and in fact the first use of comm_status
in rig_open() is when it gets the value RIG_COMM_STATUS_CONNECTING and
rig_close() sets it to RIG_COMM_STATUS_DISCONNECTED.