How to connect antennatracker to Rover over wifi

Hi,

how would I go about connecting my wifi antennatracker featuring a Navio+ with my rover (Navio2) over a network connection?
Up until now, I was not able to get the two to talk to each other. With 3dr radios it is easy, since both instances just connect to the device, reading whatever data comes from there.
With a network connection, APM either sends the data out via udp, or waits for a connection with tcp.
How do I tell APM to be a tcp client or read incoming udp data? Do I have to use socat to simulate a serial connection?

You should be able to set TCP server like this:
-A tcp:*:6000:wait

And for the client use:
-A tcp:xxx.xxx.xxx.xxx:6000

There’s no UDP-listen in the Ardupilot at the moment.

I dare not to say I tried that already, I kinda lost track of what I did and what not. Will try it right now.

I had a change a few things in my network setup. I can now ping every RPi from any other RPi, but I still can not get the rovers telemetry to the tracker.
Setup now looks like this:

Rover:

RPi2/Navio
dnsmasq on eth0 (192.168.50.1)
-A tcp:0.0.0.0:6000

connected with an ethernet cable to:

RPi2
hostapd
brigded eth0, wlan0 (192.168.50.110)
Raspicam webserver

Tracker:

RPi3
hostapd
dnsmasq
USB wifi dongle as AP
USB wifi dongle as client for rover (192.168.50.13)
mavproxy
-A tcp:192.168.50.1:6000 -C udp:127.0.0.1:14550

Are you able to manually open a server\listener port on one Raspberry and connect to it from another? Using netcat \ socat.

The tracker is working now. I am testing with MP SITL. The tracker will not accept the initial position setting, so I am testing it with lat 0, lon 0.
Every few minutes MP displays a warning “failed to update home location”. Right before the message appears the data transmission stops and resumes after I click the warning away. Maybe the wifi connection is a bit dodgy.
PIDs are looking good already. I just let the simulated plane fly to the other side of the tracker, while it is in stop mode. When the bearing error jumps to >180°, I set the tracker to auto mode again and see how much it overshoots the position of the plane. Pitch did not need much tuning, the only strange thing is, that I had meassured and set the PWM values/corresponding angles pitch can reach, but it would not go to the -25° I had set. Pitch always stopped at about +15°.
I then doubled the pitch min setting to -50 and now it reaches -25°.

Thanks for your help, Mikhail! I would not have figured out the network issue without you!

Here are a few pictures of my tracker.
I made it from bits and pieces I had lying around (except the RPi3).
The baseplate is a centerplate from a diy quadcopter. The other wooden parts are from a robotarm experiment I did.
Servos are Robbe S100, one of them modified for continouus rotation. They are over 25 years old.
It rotates on the same base as my other tracker, so I just have to undo one screw to switch between them.
I use two servos for tilt. That way, I did not have to make a bearing opposite the servo. Since APM antennatracker does not support dual tilt servos, I used a KKmini board flashed with OpenAeroVTOL. Tilt output goes into the KKmini, which outputs the signal for the two servos and inverts one of them.




Wow, this is pretty cool! You even have a display :slight_smile:

@schuermannsebastian
Hello!
I have an issue with connecting WiFi network with Mavproxy.
So I heard mavproxy automatically detects networks around it but my Mavproxy doesn’t say anything but bunch of zeros.

Is there a way to make mavproxy detect my WiFi network?
Also I have connected WiFi network to my computer through TCP connection.

Thanks!
Can u please help me? It would save my grade :pray:
P.s.
I have a deadline by next week to hover my drone stably and I can’t with a USB cable using mavproxy as it disconnects whenever it takes off

Mavproxy does not detect anything. You have to start it with the right parameters to make it work. The connection to APM must already be established, be it through direct usb/serial, telemetry radios or a network connection (wifi, cable, localhost etc.). Have a look at the mavproxy documentation here:
http://ardupilot.github.io/MAVProxy/html/index.html