Issue with Data Forwarding from Drone to GCS via Server and Reverse SSH Tunnel

Description:
I am currently facing a challenge in establishing remote control for my drone, which is connected to the internet via a 4G shield. The issue arises from the lack of static IP addresses at both the drone and the Ground Control Station (GCS) ends. To address this, I attempted to implement a server as an intermediary.

Current Setup:

  • The drone sends data to the server with a static IP using the command “mavproxy.py --out=udp:staticip:14550,” and this part is functioning correctly.
  • To establish a connection from the server to the GCS in the field (also connected via 4G), I set up a reverse SSH tunnel with the command “ssh -R 14551:localhost:14550 username@staticip.”
  • Following this, I run the command “mavproxy.exe --master=udp:localip(10.x.x.x):14550 --out=udp:127.0.0.1:14551” on the server side to forward data received on port 14551 back to the GCS. This command works to get the data and it is displayed in the console on server but is not forwarded.

Challenge:
Despite the reverse SSH tunnel, I am unable to receive the data on the GCS. For context, the server runs a Windows instance on Google Cloud Platform (GCP).

Request for Assistance:
I seek guidance on resolving this issue or any alternative methods for efficiently forwarding data from the server to the GCS in the field. It’s crucial to note that both the drone and GCS lack fixed IP addresses and rely on 4G connections.

Additional Information:

  • The GCS is situated in a field, and both the drone and GCS are connected via 4G.
  • The server utilizes a Windows instance on GCP.

I appreciate any insights or suggestions to overcome this challenge. Thank you in advance for your assistance.

Hello

Try Zerotier or Tailscale to have simple to deploy VPN.
That solution will even allow you to get ride of the cloud server if you have only on gcs client

Hey, thanks for the suggestion, but I have multiple client and also adding VPN would add one more layer in the already complex setting. I was able to workout a solution. On the cloud instance instead of the --out=udp, I used --out=udpin:localIP:Port. After this I used my GCS to request the data from the Cloud server. This can be achieved without the reverse ssh tunnel.

Hey, this is interesting, when you say “request the data from the Cloud server” you mean reading udp localIP:Port or do you have another action to make ? Also, is the localIp your choice or the IP of the Cloud or the ip of the computer with the GCS ?

Local IP is the computer’s IP in the VPC provided by your cloud service provider. For example, if the public IP of your cloud instance is 1.2.3.4 then it will redirect all of the traffic on the IP to the local IP of your cloud instance that is eg. 10.10.0.1. Now the pixhawk, and the companion computer will send the data to 1.2.3.4:port-1 which will be forwarded to 10.10.0.1:port-1. The computer on this IP will run the mavproxy script to forward the data to 10.10.0.1:port-2. Now the data from the 10.10.0.1:port-2 will be eventually forwarded to 1.2.3.4:port-4 and the GCS will request the data from 1.2.3.4:port-2.

1 Like

Amazing ! Thank you very much for your help, just one last question, do you use UDP, TCP or UDPCI to read data with MP ? Because with UDP you can’t specify the port, and mavproxy forwards on UDP so I am not sure TCP can work since it is a different protocol and I don’t understand very much how UDPCI works.

Use UDPCI on Mission Planner. After selecting when you connect, you need to enter the IP and the port number from where you will be receiving the data.

1 Like