Arduino problem with gPredict and rotctld

client

#1

Hello

this is my first post so let me introduce myself. I am Hoonse from austria
i am a ham for about one year.

i wanted to build my own antenna rotor but then i noticed your project.

the last days i have build everything and setup the electronics on a breadboard.
i also have installed the software on the tplink.

everything works fine expect one thing.

when i connect gPredict i engage the rotor and then only the elevation works. the azimut doesn’t move.

after some research i noticed that when i send a string with nectat both axis move (P 10.0 20.0 for example)
but when i send the P command too (for get angle in rotctrld) then too only the elevation moves.

i noticed that in the arduino code there is no function for “get angle” so the rotctld doesn’t get the angle from the arduino and because of that something goes wrong.

i have searched a very long time on the internet to get some information about the rotctld protocol so that i could write the code for “get angle” myself but i have not found anything usefull.

i used the precompiled packages from openwrt for the tilink (hamlink, ect.) and i am using gpredict for windows.

maybe someone can show me the way to get this thing going.

greetings from austria and please excuse my bad english
Hoonse


Custom rotator with satnogs firmware
#2

Hey Hoonse!

While trying to debug a homing issue with our #1 SatNOGS we also encountered the need to “get angle” from arduino. We are implementing this as we speak (Agis is literally across my desk coding right now) so stay tuned for some new arduino code so you can debug easier. Cheers! :smile:


#3

hi there

thanks for the fast answer.
its good to here that you are working on the issue =)

i really have tried everything myself, the problem is that i have no idea how the protocoll between the rotctld and the arduino is (on the serial lines…).

it would be great to get a new version of the arduino code soon. because here in austria we dont have to work tomorrow and the day after so i would have a little bit of time to get my rotor working. =)

and if you need a betatester for the new arduino code i would sacrifice me hint =)

on my way to setuo the openwrt board and the arduino i noticed some smaller problems that werent written down in the manual. if you want i could send you a small list so that you can change it if you have the time to.

now best wishes from austria
Hoosne


#4

Hey Hoonse,

Agis just pushed the latest code here: https://github.com/satnogs/satnogs-arduino/commit/7de7fa36214c3ce5ddbadbad4770d258a94502e9

In theory this should be working and you should be getting back the position for every move. Please test and report back :slight_smile: #betatesting !


#5

hey there

thanks for the update of the file
the first thing i did today is pushing the new code on the arduino and see if it works. =)

unfortunatly it doesn’t.
its the same behaviour as before but this time the elevation axis dont move at all.
not with the command line (echo “P 50 40” | nc 192.168.0.110 2000)
and not with gpredict.
in gpredict there is also not the get value displays.

here is the output from rotctld in verbose mode.
from gPredict:

write_block(): TX 35 bytes
0000    41 5a 31 38 30 2e 30 20 45 4c 34 34 2e 30 20 55     AZ180.0 EL44.0 U
0010    50 30 30 30 20 58 58 58 20 44 4e 30 30 30 20 58     P000 XXX DN000 X
0020    58 58 0a                                            XX.             
rotctl(d): p '' '' '' ''
easycomm_rot_get_position called
write_block(): TX 1 bytes
0000    21                                                  !               
read_string(): Timed out 0.200264 seconds without reading a character.
rotctl(d): P '180.00' '44.00' '' ''
easycomm_rot_set_position called: 180.000000 44.000000
write_block(): TX 35 bytes
0000    41 5a 31 38 30 2e 30 20 45 4c 34 34 2e 30 20 55     AZ180.0 EL44.0 U
0010    50 30 30 30 20 58 58 58 20 44 4e 30 30 30 20 58     P000 XXX DN000 X
0020    58 58 0a                                            XX.             
rotctl(d): p '' '' '' ''
easycomm_rot_get_position called
write_block(): TX 1 bytes
0000    21                                                  !               
read_string(): Timed out 0.200266 seconds without reading a character.
rotctl(d): P '180.00' '44.00' '' ''
easycomm_rot_set_position called: 180.000000 44.000000
write_block(): TX 35 bytes
0000    41 5a 31 38 30 2e 30 20 45 4c 34 34 2e 30 20 55     AZ180.0 EL44.0 U
0010    50 30 30 30 20 58 58 58 20 44 4e 30 30 30 20 58     P000 XXX DN000 X
0020    58 58 0a                                            XX.             
rotctl(d): p '' '' '' ''

here from echo “P 50 40” | nc 192.168.0.110 2000:

Connection opened from 0.0.0.0:61214
rotctl(d): P '50' '40' '' ''
easycomm_rot_set_position called: 50.000000 40.000000
write_block(): TX 34 bytes
0000    41 5a 35 30 2e 30 20 45 4c 34 30 2e 30 20 55 50     AZ50.0 EL40.0 UP
0010    30 30 30 20 58 58 58 20 44 4e 30 30 30 20 58 58     000 XXX DN000 XX
0020    58 0a                                               X.              
fscanf: Success
Connection closed from 0.0.0.0:61214

and here from echo “p P 30 30” | nc 192.168.0.110 2000:

Connection opened from 0.0.0.0:61269
rotctl(d): p '' '' '' ''
easycomm_rot_get_position called
write_block(): TX 1 bytes
0000    21                                                  !               
read_string(): Timed out 0.200373 seconds without reading a character.
Command ' ' not found!
rotctl(d): P '30' '30' '' ''
easycomm_rot_set_position called: 30.000000 30.000000
write_block(): TX 34 bytes
0000    41 5a 33 30 2e 30 20 45 4c 33 30 2e 30 20 55 50     AZ30.0 EL30.0 UP
0010    30 30 30 20 58 58 58 20 44 4e 30 30 30 20 58 58     000 XXX DN000 XX
0020    58 0a                                               X.              
fscanf: Success
Connection closed from 0.0.0.0:61269

so sorry for the long post.
i will search a little bit for a solution and if you know there i fckd up please let me know. =)

greetings from austria
Hoonse


#6

Hoonse: what is the exact functionality you’re looking for?

What do you have working and what is buggy?


#7

hello jinxcat

thank you for your reply

i want to controll the rotor with gpredict
the problem is that gpredict first sends the “p” command to the rotctld wich stands for getAZandEL
and after that it sends “P 10.0 10.0” wich stands for move to AZ10.0 and EL10.0

the problem is that when the arduino doesnt send the coordinates then the move command wont be executed right.

unfortunatly i cant find the serial protocol from rotctld on the internet so i cant tell where exactly the sh*t hits the van but it must be somewhere between the serial communication…

i hope i could bring my problem to a point here.

greetings from austria
Hoonse


#8

One of the guys back in Athens can verify this, but in our case sending “P” did not respond the current position. So we zeroed it with “P 0 0”, if needed, and the went along sending P positioning commands in a series.

I don’t think I’ve ever seen a P response :smile:


#9

thanks for the fast answer.

i think i finally did it.
i rewrote the serial funktion and somehow now it works…

i have still a little bit of work to do because the electronics are on a breadboard until now and i would like to make a pcb so i dont rip the cables out when something happens.

i will also have to change some settings in the arduino code because i have a different hardware design than you guys. (i have build my own rotor half the way and then a friend send me the link to you guys. if i knew that i would have had a lot more free time =))

i will keep you up to date. =)

greetings from austria
Hoonse


#10

Hey,
we implement the easycomm2 protocol according to https://github.com/N0NB/hamlib/blob/master/easycomm/easycomm.c .
I think that i fixed the problems ( https://github.com/satnogs/satnogs-arduino/tree/fix_commands/Arduino ) but i could not test it today.


SatNOGS #1 in Athens, Greece
#11

Hi, I am trying to make satellite tracker. I am new to raspberry pi as well. I have installed gpredict and hamlib in raspberry pi. currently I am trying to send azimuth and elevation value from gpredict to arduino via usb. I tried ‘rotctld -r /dev/ttyUSB0 -s 9600’ and I am trying to read the value by just Serial.read(); in the arduino. But its not working. Can anyone help me what should I do? I am new to this project.


#12

Hi.
Try to do this

– Installing gpredict (sudo apt-get install gpredict) and configuring it with a rotator on localhost, port 4533. Gpredict is a satellite tracking program.

– Installing rotctld (sudo apt-get install libhamlib-utils). Rotctld is a software daemon that provides a network server to control a rotator on a serial port.

– Starting rotctld with sudo rotctld -m 202 -r /dev/ttyACM0 -s 19200 -T 127.0.0.1
This command starts the rotator control daemon identifying the rotator as a model “EasycommII”, on the specified serial port.
For me it works and don’t forget to click engage and track under Gpredict

how to: from brandenburgtech.com

IZ5RZR