fillods / grig

A simple Ham Radio control (CAT) program based on Hamlib.
http://groundstation.sourceforge.net/grig/
GNU General Public License v2.0
11 stars 5 forks source link

Fix NET rigctl model #14

Closed fillods closed 1 year ago

fillods commented 1 year ago

Grig does not work with "NET rigctl" model id 2. This is unfortunate because not only Hamlib rigctld uses this remote protocol but others like Gqrx, ...

How to reproduce the bug:

Upon start-up (and during running), Grig times-out repeatedly:

2023/01/04 16:53:18;;HAMLIB;;4;;netrigctl_get_func called
2023/01/04 16:53:18;;HAMLIB;;5;;netrigctl_vfostr: called vfo=currVFO
2023/01/04 16:53:18;;HAMLIB;;5;;netrigctl_vfostr: vfo==RIG_VFO_CURR, curr=VFOA
2023/01/04 16:53:18;;HAMLIB;;5;;netrigctl_vfostr: vfo_opt=0
2023/01/04 16:53:18;;HAMLIB;;4;;netrigctl_transaction: called len=3
2023/01/04 16:53:18;;HAMLIB;;5;;rig_flush: called for network device
2023/01/04 16:53:18;;HAMLIB;;4;;network_flush called
2023/01/04 16:53:18;;HAMLIB;;5;;write_block(): TX 3 bytes, method=2
2023/01/04 16:53:18;;HAMLIB;;5;;0000    75 20 0a                                            u .
2023/01/04 16:53:18;;HAMLIB;;5;;read_string_generic called, rxmax=1024 direct=1, expected_len=1

2023/01/04 16:53:28;;HAMLIB;;3;;read_string_generic(): Timed out 10.010 seconds after 0 chars, direct=1
2023/01/04 16:53:28;;GRIG;;2;;rig_daemon_check_func: Could not get  status

It happens after querying u SCEN and before u TRANSCEIVE, and many times later on.

Please note the "NET rigctl" is a special Hamlib rig model, a kind of virtual rig that retrieves its caps (of the real distant rig) remotely during opening.

mattmelling commented 1 year ago

Working here on db891187 against my IC7300 with grig -m 2 -r localhost:

$ rigctld -V
rigctl Hamlib 4.4 Thu Dec 02 23:46:51 2021 +0000 SHA=5f8c4c

Also appears to work with gqrx 2.15.9.

However if I fire up another instance of rigctld using either the "Dummy" (1) or "Dummy No VFO" (6) rigs, startup seems to take a lot longer. No timeout errors, however it takes well over a minute for the grig window to appear. That is odd as I would expect the dummy rig to be quick as it is not working with any hardware.

fillods commented 1 year ago

So this is good news @mattmelling, thanks for reporting. The bug only disturbs rigctld launched with "Dummy" (1) or "Dummy No VFO" (6) rigs then, It's a lower priority fixing it.

mdblack98 commented 1 year ago

I fixed it in the latest Hamlib -- it will be in 4.5.4 You can compile the latest master repo and it should work. git clone https://github.com/Hamlib/Hamlib.git cd Hamlib ./bootstrap ./configure make install

fillods commented 1 year ago

Indeed, fixed in the forthcoming Hamlib 4.5.4. Thanks @mdblack98 for taking care of this issue :+1: