Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hamlib/WSJT-X issue with SDRPlusPlus #1266

Closed
x31415926 opened this issue Apr 8, 2023 · 7 comments
Closed

Hamlib/WSJT-X issue with SDRPlusPlus #1266

x31415926 opened this issue Apr 8, 2023 · 7 comments
Labels
bug fixed Issue has been fixed
Milestone

Comments

@x31415926
Copy link

Run into a compatibility issue between SDRPlusPlus and WSJT-x (Hamlib). I detailed my findings in AlexandreRouma/SDRPlusPlus#573, but, in short, it appears that according to the manual netrigctl should only send the VFO string if vfo_mode is set, not when vfo_option OR vfo_mode is.

Code snippet from https://github.com/Hamlib/Hamlib/blob/master/rigs/dummy/netrigctl.c#L121
if (rig->state.vfo_opt || priv->rigctld_vfo_mode) {

The consequence of the current implementation is that a server responding to the chk_fvo command with CHKVFO 0 still receives the vfo string. If this is somehow expected, then I would imagine there should be a recommended response the software implementer can use to indicate the server doesn't support that option .

This may also be the root cause for #930

@mdblack98
Copy link
Contributor

mdblack98 commented Apr 9, 2023 via email

@x31415926
Copy link
Author

Can you compile yourself? If so, try changing this line around 267 in netrigctl.c and see if it fixes the problem.    if (sscanf(buf, "CHKVFO %d", &priv->rigctld_vfo_mode) == 1)    {        rig->state.vfo_opt = priv->rigctld_vfo_mode; >

  1. I am not setup to test this fast/easily, unfortunately.
  2. I understand what your suggestion will accomplish, but if you do just that you'd still leave the door open for set_vfo_opt having the same problem, no?

So, why not just change
if (rig->state.vfo_opt || priv->rigctld_vfo_mode) {

into

if (priv->rigctld_vfo_mode) {

?

@mdblack98
Copy link
Contributor

mdblack98 commented Apr 9, 2023 via email

@x31415926
Copy link
Author

Thanks, but I run into a different error which may be [similar to] #1186? As far as I can see from the sdrpp logging this occurs on open, before any chk_vfo / F commands, so cannot confirm the fix.

Hamlib error:   2:rig.c(7511):async_data_handler_start entered
async_data_handler_start: async data support disabled since async_data_enabled=0
  2:rig.c(7518):async_data_handler_start returning(0) 
rig.c(262):add_opened_rig returning2(0) 
rig_open: 000000004d029f0c rs->comm_state==1?=1
  2:rig.c(6110):rig_get_powerstat entered
../../src/src/rig.c(6130) trace
netrigctl_get_powerstat called
netrigctl_transaction: called len=15
rig_flush: called for network device
network_flush called
write_block(): TX 15 bytes, method=2
0000    5c 67 65 74 5f 70 6f 77 65 72 73 74 61 74 0a        \get_powerstat. 
read_string_generic called, rxmax=1024 direct=1, expected_len=1
read_string_generic(): RX 7 characters, direct=1
0000    52 50 52 54 20 31 0a                                RPRT 1.         
  2:rig.c(6135):rig_get_powerstat returning(0) 
rig_open: rig power is off, use --set-conf=auto_power_on if power on is wanted
Rig is not powered on
Rig is not powered on
 while opening connection to rig

@mdblack98
Copy link
Contributor

mdblack98 commented Apr 10, 2023 via email

@mdblack98 mdblack98 added the bug label Apr 10, 2023
@mdblack98 mdblack98 added this to the 4.6 milestone Apr 10, 2023
@mdblack98 mdblack98 added the needs test Patches have been submitted but need testing to close issue label Apr 10, 2023
@x31415926
Copy link
Author

SDR++ is not emulating  rigctld correctly....but this should fix the problem.They really need to emulate a real rig like a TS-480 to prevent future problems like this. https://www.dropbox.com/s/tgeouohpw8x7ezt/bin.zip?dl=0 Mike W9MDB

I have copied these files onto a wsjtx2.6 instance and the original issue is fixed.

Do you mind expressing the minimal requirements for emulating rigctld so that an implementer (like sdrpp) can adhere to? The reason I am asking is mostly for capturing and documenting the expectations on chk_vfo (the original issue)?

@mdblack98
Copy link
Contributor

mdblack98 commented Apr 11, 2023 via email

@mdblack98 mdblack98 added fixed Issue has been fixed and removed needs test Patches have been submitted but need testing to close issue labels Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fixed Issue has been fixed
Projects
None yet
Development

No branches or pull requests

2 participants