AeroCoder Logo

Introduction to MAVLink

What is MAVLink

History, purpose, key features, and where MAVLink sits in the drone software stack.

MAVLink (Micro Air Vehicle Link) is a lightweight messaging protocol designed for communicating with drones and between onboard drone components. First released in early 2009 by Lorenz Meier, it has become the de-facto standard for UAV communication.

MAVLink follows a hybrid publish-subscribe and point-to-point design pattern. Telemetry data streams are published as topics, while configuration sub-protocols (missions, parameters) use reliable point-to-point exchanges with retransmission.

Key features

Very efficient (8 bytes overhead in v1, 14 in v2) · Very reliable (field-proven since 2009) · Supports up to 255 concurrent systems · Works across C, Python, Rust, Java, JS, and more · Enables both offboard and onboard communication.

Messages are defined in XML files. Each XML file defines a "dialect" — the message set a particular system supports. The reference dialect is common.xml, which most autopilots and ground stations implement. Code generators then produce language-specific libraries from these definitions.

The C reference implementation is a header-only library optimized for resource-constrained microcontrollers with limited RAM and flash. Generated libraries are typically MIT-licensed and can be used in closed-source applications.

Where MAVLink sits in the stack

Ground station ↔ MAVLink ↔ Autopilot (PX4 / ArduPilot) ↔ Sensors, motors, and payloads. MAVLink rides on top of serial, UDP, or TCP transports — it does not define the physical layer.

Next →

MAVLink 1 vs MAVLink 2

Edit this page on mavlink.io ↗

On This Page

Key featuresWhere MAVLink sits in the stack

© 2024 AeroCoder. All rights reserved

TwitterYouTubeInstagram