Servers by jDrones

RPi + PX4 + VPN: Getting telemetry to PC

Hi there. I’m struggling to get this working, so this is a last resource I’m trying.

So, I have a PixHawk PX4, with a RPi Zero W connected to it. I managed to send telemetry over to the RPi and fetch it in a PC that is on the same Wi-Fi network as the Pi, via mission planner and MAVProxy.

My next step is to connect this Pi to the internet via a 3G modem and connect the Pi to a VPN (which I already achieved), where this PC will be connected, on a different Wi-Fi network, and get the telemetry, being the two devices in different places.

In other words, forward the telemetry to the PC that’s connected to the same VPN as the Pi/Drone. But I’m unable to do so.

Any thoughts? I’m sure it is related to this command that’s executed on the RPi: mavproxy.py --master=/dev/ttyS0 --baudrate 111100 –-out=udpin:0.0.0.0:14550 --aircraft MyCopter

But I can’t figure the issue. Thanks in advance.

Try with

–out=udp:VPN_IP_YOURPC:14550

take a look at the baudrate too, maybe it should be 115200.

Depending on how you configured your vpn you may need to forward ports if pc and raspberry can’t see them directly. If for example you have a router that connect to the vpn on the pc side, than you need to forward the 14550 port from the router to the pc.

If you tell us a bit more of the vpn architecture than we can help more.

make sure you can reach the pc from the raspberry trough the vpn tunnel.

My VPN is on the server. Both drone and server are connected as well with static IP addresses. PuTTy SSH to the drone works with the server on and off the VPN. Also, mission planner connects too by introducing the drone IP address.

However, via Python script, there’s no use. I’m using dronekit, introducing the same drone IP on there and using the connect() method. Getting the Win 10049 error: The requested address is not valid in its context, so the server is not even trying to connect.

By the way, I already did what you mentioned. No change…

Servers by jDrones