Setup your wifi network

Ensure that your drones are on the same wireless network as Skybrush Server and that they will be broadcasting MAVLink heartbeat packets on the port where Skybrush Server is listening.

The serial-to-wifi modules of most light show drones are set up to use IP addresses in the range 192.168.0.1 to 192.168.0.254 and 192.168.0.255 is reserved for broadcasting. In this section, we will therefore assume the same IP address space. If your drones are configured to a different IP network (such as 192.168.10.1 to 192.168.10.255), please adjust the IP addresses accordingly.

It is advised to set up the drones in a way that the last byte of the IP address and the MAVLink system ID (controlled by the SYSID_THISMAV parameter in the firmware) is the same, and they match the number of a sticker that you put on the drone so you can easily identify a drone by looking at its sticker and then using that number as the MAVLink system ID and as the last byte of the IP address.

In the default setup, Skybrush Server listens on UDP port 14550 on all network interfaces of the computer that is running on. Therefore, you need to set up your drone to send MAVLink heartbeat packets to UDP port 14550 of either the broadcast address 192.168.0.255, or to the IP address of the computer running Skybrush Server. In the former case, you can run the server on any of the computers in your network, while in the latter case you can run it only on the particular machine whose IP address you set up earlier.

Unicast (one-to-one) communication between the drone and Skybrush Server is then managed by the server: it listens on UDP port 14550 and registers inbound MAVLink heartbeat packets, creating an association between the MAVLink system ID of the drone and the IP address and port that the packet came from. Commands that are intended for the drone with the given MAVLink system ID are then sent by the server to the particular IP address and port where the heartbeat came from. Therefore, the drone must also listen on the same UDP port where it is sending its packets from. Most serial-to-wifi modules are set up this way with the factory defaults.

Broadcast communication between Skybrush Server and the drones is used for RTK corrections (when sent over wifi) and for certain commands that affect the entire swarm. In the default setup, Skybrush Server sends broadcasts to UDP port 14555 of the broadcast address of the network (192.168.0.255). Therefore, the serial-to-wifi modules on the drones also have to listen for incoming packets on UDP port 14555 and must be able to recognise broadcast addresses. Serial-to-wifi modules that are compliant with the IP specification should already work this way, but we have encountered a few serial-to-wifi modules out in the wild that are not IP-compliant, so make sure that your wifi module is compliant.

To sum it all up:

  • Skybrush Server listens on UDP port 14550 of all network interfaces, and sends broadcast communication to 192.168.0.255, UDP port 14555.

  • The drones must send heartbeats to UDP port 14550 of either the IP address of Skybrush Server or to the broadcast address of the network. The port number that the drones use for sending is irrelevant, except in one particular case, which is outlined in the last bullet point.

  • The drones must listen on the UDP ports they use for sending heartbeats in order to receive unicast messages from Skybrush Server.

  • The drones must also listen for incoming broadcast packets on UDP port 14555. Most wifi modules are capable of listening on a particular port while using another UDP port for sending, but some are not, in which case you must use UDP port 14555 for sending as well as listening.

Further recommendations:

  • It is advisable to set up the IP addresses of the drones such that the last byte matches their MAVLink IDs.

  • Ground stations should use MAVLink system IDs from the high end of the allowed MAVLink system ID range (1 to 255) to make it easier to add new drones to the swarm at the low end. The system ID of Skybrush Server is configurable in the configuration file and defaults to 254.

  • It is also advisable to match the last byte of the IP addresses of the ground stations to also match their MAVLink system IDs.