Setup your Wi-Fi network

When setting up the Wi-Fi network, you actually need to set things up in two places: on your router and on your drones. Start with the router settings first. It is hard to provide specific instructions because the admin area of each router is different, and the configuration of the Wi-Fi modules of the drones may also differ, so we are only providing generic instructions that outline the structure of the network. Please refer to the user manuals of your Wi-Fi router and the drones if you need further help.

Configure the router

First of all, some general guidelines:

  • The router should not be connected to the Internet (for security reasons), so make sure that your router does not expect an upstream connection towards the Internet. In most cases, when your router asks you to select the type of Internet connection that you have, just set it to "automatic" and the router should be able to figure out that there is no upstream connection.

  • Configure the router to an IP network of 192.168.0.0/24, i.e. the IP addresses managed by the router should span the range from 192.168.0.1 to 192.168.0.255. You may use any other IP network if you want to, but then adapt the IP addresses in the rest of this page accordingly; the examples will always refer to the 192.168.0.0/24 subnet.

You need to decide which IP address range will correspond to the drones on the network, which IP address corresponds to your router and which IP addresses are reserved for ground equipment (laptops, RTK base stations and so on). The standard setup that we recommend for at most 250 drones is as follows:

  • IP addresses from 192.168.0.1 to 192.168.0.250 are reserved for drones.

  • The router is configured to use 192.168.0.251 as its IP address. Note that this is different from the defaults; most routers are configured to take the IP address ending in 1 (i.e. 192.168.0.1) by default so you need to change this in the router. If you do not want to change this or the router provides no option for this, that is fine, but then start numbering your drones from 2 to make sure that the number of the drone (typically displayed on a sticker on the drone) matches the last byte of the IP address — it will make things much easier in the long run.

  • 192.168.0.255 is reserved as a broadcast address; it is not allowed to use it as an IP address for a network device (and most operating systems will prevent you from doing so anyway).

  • The remaining IP addresses from 192.168.0.252 to 192.168.0.254 are to be used by ground equipment. In our recommendations, the primary ground station should be 192.168.0.254 because Skybrush Server uses 254 as its MAVLink system ID by default, and this way the last byte of any network equipment matches its MAVLink system ID nicely. If you have a secondary ground station and/or a Wi-Fi-connected RTK base, you can assign those to 192.168.0.253 and 192.168.0.252.

  • If possible, turn off the DHCP server in the router to prevent it from handing out IP addresses on its own, or restrict the DHCP server to manage IP addresses only in the range of 192.168.0.252 to 192.168.0.254 so it does not start handing out IP addresses in the range that is reserved for drones.

If you have more than 250 drones, set up multiple routers and use distinct IP networks like 192.168.1.0/24, 192.168.2.0/24 and so on. If you have less than 250 drones and you do not plan to reach this number in the near future, you can use a smaller IP address range for the drones and leave more space for ground equipment.

Configure the drones for your router

Ensure that your drones are configured to the same wireless network as the router 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.

Summary

  • Make a plan of how you are going to distribute IP addresses on the network, which addresses are reserved for drones and which addresses are reserved for ground equipment.

  • When possible, set up all the equipment (drones, GCS, RTK base) to static IP addresses. The drones must use static IP addresses to avoid the overhead of requesting an IP address over DHCP after startup, especially when the drone is far from the router.

  • 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.