Question on Gpredict Rotor Protocol

I am building a Arduino Based Antenna.
I would like to GET / SET directly to the Arduino so not requiring using the library.
When receiving the “P 100.10 4.56” I parse the values and reply with RPRT 0
When receiving the “p” I print the AZ EL positions like so… “100.10 4.56\n”
I am seeing both returned values on the Antenna Tracker… however after about a dozen replies, the Enable Button un-sets and Error shows up at the Read Angle.

Can anyone provide any insight on the cor4ect format / responses or know why it Errors Out ?

73 de N4LDR

Basically what you need to do is: implement (a part of) the interface to hamlib.

  • Which gpredict version are you using?
  • What is the output of the logger?

You might have a look into gtk-rot-ctrl.c.

I am running Gpredict 2.2.1
Havent gotten a chance to look at the gtk-rot-ctrl.c lib yet.

When replying to the Lowercase p, i fixed the values to 123.00 4.56
Not sure why it is splitting the values. Seems to only affect the AZ.

The log is showing
ERROR gtk-rot-ctrl.c:340 rotctld returned a bad response (123)
ERROR gtk-rot-ctrl.c:340 rotctld returned a bad response (.00 4.00)
ERROR gtk-rot-ctrl.c:340 rotctld returned a bad response (123.)
ERROR gtk-rot-ctrl.c:340 rotctld returned a bad response (00 4.00)
(repeats a few times)
ERROR rotctld_socket_rw: SIZE ERROR - 1/2
ERROR rotctld_socket_rw: rotcltd Socket Down

There’s still a lot of info missing.

  • Build system
  • locale
  • OS

From the referenced file:
gtk-rot-ctrl.c, lines 330, 331:

[..]
                *az = g_strtod(vbuff[0], NULL);
                *el = g_strtod(vbuff[1], NULL);
[..]

You will have to provide the correct (locale spedcific) format for a g_double.

See also: the GTK reference

Locale is "en_US.UTF-8
Installed on OSX via MacPorts, gpredict @2.2.1_1 (science)

I may have to switch to Linux and see if there is any difference.
I have hard coded the response with fixed double values…
Tried returning them on a single line with space between them.
Tried returning AZ value, followed by CR/LF then the EL Value… etc…
When looking at the Gpredict Log, it seems to chop up the values returned and not consistent at that.

Try with telnet, use rotctld -m 1 for comparison :wink:

Ok, that works like expected.
When my rotor receives the “P AZvalue ELvalue” it responds with the RPRT 0
When it receives the lowercase “p” it sends back the read AZ value followed by \n then the EL value and \n
The tracking indicator and “Read values” show the value i’m pushing back. but the log shows an error with every reply.

Maybe I don’t understand how this is working.
Does Gpredict launch roctld when tracking is enabled? If so where is the rotor type configured ?

What log file? You should once connect to the rotctld and watch what is replied, and once connect to your rotator and compare the reply to the one from rotctld - using telnet.

This suggests that each message gets split up in several packets and gpredict is not capable of handling that. Gpredict expects one read/write message to be in one packet.

Got it working…
Found the network lease time was set to 60 seconds and causing the Socket to close.
I was assuming Gpredict was closing the socket due to response errors, so tried everything to fix the issues.
Thanks guys for your assistance, it sure helped to locate the issue.

1 Like