V2.03 RIGCTL issue

Brief summary of problem (put in title as well): v2.03 RIGCTL issue
Radio Model: R8600
Connectivity (USB/Ethernet/Wifi/Other): Ethernet
Operating System: Win 11
wfview version (press “About”): 2.03
Checked the wfview manual (Y/N): Y
Checked the wfview FAQ (Y/N): Y
Tried to google it (Y/N/NA): Y

I’ve wrote a python script to set the frequency in Wfview from WxToIMG.

Running manually my script, it sends the command in text encoded utf-8 “F 137100000” for instance.

  • wfview v1.64 respond : b’RPRT 0\n’ which once decoded gives RPRT 0 (I don’t know what it means)

  • wfview v2.04 respond a binary sequence : b’\xfe\xfe\x96\xe1\x15\x02\xfd’ or a longer sequence (very long more than 20 lines)
    b"\xfe\xfe\xe1\x96’\x00\x00\x01\x01\x00\x00\x00\x907\x01\x00\x00\x00\x01\x00\x00\x10\x02\x0f\x07\x06\x15\x0b\x00\x10\n\x0e\x16\x1d\x1a\x18\x0e\x0e\x04 … (cut)

V1.64 settings:

v2.03 settings:

Questions :

  1. why a difference between versions ?
  2. what is supposed to respond wfview ?

Regards
Stephane

I suspect that is corruption caused by using UTF-8 encoding? It should be 8 bit (latin1) encoding.

Phil

Actually for debugging purpose I’ve removed the format decoding on the received string. Just displaying raw data

1.64 responds with a string, (what does it mean RPRT 0) ?
2.03 responds in binary (looks like a CI-V dataframe starting with 0xFE which is CI-V preamble ?)

look like the behavior is different from the two versions but not an encoding matter…

Just need to know what is the output content to adapt my code…

thanks
Stephane

and I should have mentionned as well that a ‘F 137100000’ command doesn’t work in 2.03 whereas it works perfectly with 1.64

here is my python code to reproduce:

this can be called from a command line:

python wxctl.py 'NOAA 19', 137.1, COM7
import sys
import socket

# Get the parameters from WXTOIMG
satellite_name = sys.argv[1]
frequency = sys.argv[2]
control_port = sys.argv[3]

# If not satellite is selected then we do nothing
if satellite_name == "" and frequency == "0.00":
    print("No selectes satellite, no frequency to program.")
else:
    # Convert frequency in Hz for wfview
    frequency_hz = float(frequency) * 1e6
    print(f"Frequency : {frequency_hz} Hz")

    # Connect  wfview via TCP server
    try:
        # wfview server parameters
        wfview_host = "localhost"  # To replace by wfview IP Address if not on the same computer
        wfview_port = 4532  # Port set in wfview

        # Connect wfview TCP server
        print(f"Connexion to wfview on: {wfview_host}:{wfview_port}")
        with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
            s.connect((wfview_host, wfview_port))

            # Command to program the frequency
            cmd = f"F {int(frequency_hz)}\n"
            print(f"Command : {cmd}")
            s.sendall(cmd.encode('utf-8'))

            # Read wfview response
            #response = s.recv(1024).decode('utf-8')
            #print("wfview response :", response)
            response = s.recv(1024)  # Lire en mode binaire
            print(f'raw wfview response is : {response}')
            decoded_response = response.decode('latin-1')

            print("wfview response :", decoded_response)

    except Exception as e:
        print(f"Error when connecting wfview : {e}")

Why are you encoding the command utf-8? I have already told you that is NOT supported!

I just connected to my ICR8600 and then connected to the rigctld port:

F 137100000
RPRT 0

this is what I was doing successfully in 1.64… but encoding in latin-1 doesn’t change the behavior. No control of the frequency and still binary response which looks like CI-V

You are sending invalid data, as the way that the command is parsed has changed, it will likely respond in a different way. If you send valid data, it will work (as I have just verified by manually sending F 137100000 to my radio)

You need to look at the actual raw data that is being sent.

Try connecting to the rigctld port using telnet (or any other raw terminal program) and enter F 137100000 and you will see that it works.

using MobaXterm and connecting with telnet on localhost port 4532:

v1.64

v2.03
as soon as I set the connection, the windows is filled with continuous and fast data…

I have spotted the error, you have TCP Port configured to 4532 as well as Rigctl. TCP Port is a raw connection direct to the radio, so you are seeing the raw radio communications!

Yep ! Putting 0 in TCP server port has solved
but the same setting in 1.64 wasn’t providing the same result. you can see I have also the 4532 port in TCP server in 1.64. Does it mean the TCP server in 1.64 wasn’t working ?

It depends which was being started first. In v1.64 the rigctld was started very early in the program initialization, so it would have grabbed the port before TCP Server port could. In v2 rigctld is only started once wfview is connected to an actual radio.

got it!
Thanks for your prompt help. Problem solved

By the way played with my python script and encoding both in utf-8 or latin-1 are working and providing the same result

cheers
Stephane

Yes that was just a guess as to why you were seeing all of that data, it was only when I looked closer that I saw they were rig commands. It should really be 8-bit encoded (latin1) but the connection handler likely does the conversion for wfview?