MAVLink wireless bridge (MAVBridge)
I have been using MAVLink on various flight controllers for ~ 2 years now and one thing that made me mad was lack of high bandwidth wireless connectivity between PC and airborne platform.
The most common wireless options for MAVLink are RF transceivers operating in ISM bands and Bluetooth SPP (serial-port-profile) modules. However, the serial data rate for both of these is rather low (57 to 115 kbit/s).
I wanted to stream a lot more data in real time and the serial data rate limits were annoying. Since I mostly tested the platforms indoors in close range and had previously seen ESP8266, I put two and two together and made a WiFi MAVLink bridge using ESP8266 and small number of external parts.
The resulting solution is MAVBridge. It's a small device that is connected to MAVLink-speaking flight controller and allows to connect to it from ground-station software (APMPlanner, qGroundcontrol, Mission Planner etc).
It has been tested at 921 kbit/s serial baud rate and was a great aid during development and testing of quadcopter platform.
The sources (firmware and hardware) are available on github.
A few of the left-over devices are available on tindie.
Lessons learned
If using unfamiliar system: small steps at a time and validate assumptions as you go (preferably, having test cases).
Found and fixed two bugs in the framework/library I was using.
This is a well-known fact but I finally experienced it myself: UDP based protocols just perform better than TCP when physical link is unreliable and some data-loss can be tolerated.
Development for ESP8266 using Sming was overall a pleasant experience. However, the rough edges associated with young projects (it was ~ 6 months old when I started using it) were still visible.
Having a test setup which tests stability, maximum throughput and data loss was crucial for having confidence in the code I wrote and changes I made.
Comments