Connecting from other Computers

This page describes how to set up the computer hosting Virtual Skynode such that other devices in the network can connect to Virtual Skynode

Overview

In case you intend to run AMC or any other application connection to a virtual skynode on another host in your network, this page describes how to expose the necessary ports on your simulation machine.

spinner
circle-info

Assumptions:

  • The Virtual Skynode host is a Linux computer with access to iptablesarrow-up-right

  • No services on the host computer are already listening to port 5790 via TCP

Automated exposition of ports

Since virtual skynode 0.2.0, you can simply run

virtual-skynode expose -i <any-network-interface>

to expose MAVLink via port 5790 and RTSP (video) via port 8553 over any viable ethernet connection your simulation machine has access to.

A typical configuration summary looks like:

--- Configuration Complete! ---
Summary of Applied iptables Rules:
---------------------------------
PC's Primary Interface:       enx68da73a18a2f
PC's Primary IPv4 Address:    192.168.178.29
PC's Local Network:           192.168.178.0/24
Virtual Skynode Internal IP:  10.41.200.2
MAVLink Port:                 5790 (TCP)
RTSP Port:                    8553 (TCP & UDP)
Skynode Outgoing Interface:   vsnbridge
PC's IP on Skynode Network:   10.41.200.1

In case your virtual skynode`s IP differs from the default, use --skynode-ip <your-skynode-ip> to adapt.

Manual IP forwarding

The following instructions are required for older versions of the virtual-skynode package and build a starting point to help users connect a GCS device such as an Android Tablet to a separate host computer that is running Virtual Skynode. Depending on your exact setup the steps below might need to be adopted. The goal of this guide is to provide a minimal starting point.

TCP Packet forwarding via iptables

We are going to configure packet forwarding on the host machine that is running Virtual Skynode. With this method the ground station device will be connecting to the host machine. The ground station is not aware of there being a Virtual Skynode. The ground station also does not need to know anything about the IPV4 address 10.41.200.2, as from its perspective the host machine itself is a Skynode.

The method below uses IP forwardingarrow-up-right to get packets from the incoming interface to virtual skynode and back. Network Address Translation (NAT)arrow-up-right is required to manipulate the source and destination IPv4 address of packets such that Virtual Skynode is cleanly "hidden" behind the host machine.

circle-info

The commands bellow generally require root

circle-info

All changes mentioned below generally reset after a reboot of the host machine. Making iptables persistent after a reboot is outside the scope of this guide.

Configuring iptables:

Enable packet forwarding in the Linux kernel

Last updated