UDP Unicast vs. Multicast

A project log for EVPR: Electric Variable Pitch Rotor

An electrically actuated variable pitch rotor with a wireless interface

Peter McCloudPeter McCloud 11/10/2017 at 05:210 Comments

With the basic EVPR hardware working, the firmware needs some work to support multiple rotors and add some redundancy. Right now only the single rotor is supported and if the rotor resets for whatever reason, both the master and slave need to be rebooted to re-establish the connection.

Doing some research on what's available on the ESP32, it seemed like UDP Multicast might be the solution. A single data packet would be sent out to all of the rotors. Using the ESP-IDF example, it was straight forward to create a branch of the firmware to support multicast.

The end result was less than satisfactory. Multiple devices were able to receive data and if a device got disconnected, it was able to pickup the data packets successfully. However, the latency was unacceptable. There was sometimes delays of one to two seconds using multicast. It'd probably be fine for other applications, but for trying to control a quadcopter, the delays are really unacceptable.

Thank goodness for version control and branches. Now it's back to the unicast method to add the required support there.