Link protocol
NavLink
NavLink is the single source of truth for the Vayu link protocol, NavLink v2. A file, dialect.json, defines every message, and generate.py emits matching codecs for firmware (C), ground control (C and C++) and tools (Python).
- Who it is for
- Firmware developers, ground control developers and tool authors.
- Version
- v2.4.0
- Dialect
- vayu-core, version 2, 57 messages
- This book
- 10 chapters
Chapters
- 01What NavLink is, and why there is one dialectNavLink is the link protocol of the Vayu flight stack: the bytes that pass between the flight controller (FC), the ground station (GCS) and the tools that talk to either.
- 02Architecture: dialect, generator, codecsEverything above the boundary is generated and must not be edited.
- 03The frameEvery NavLink v2 message travels in a frame. This chapter gives the layout, the header fields, the limits and the message id space.
- 04Integrity: CRC-16 and CRC_EXTRAA link between a flight controller and a ground station will lose and corrupt bytes, and the two ends can also disagree about what a message looks like.
- 05Field encoding and timeThis chapter is about the payload: how fields are laid out, how a message can grow without breaking old peers, and how time is carried.
- 06The dialect and the message catalogdialect.json holds three things: a sections tree used only for documentation, a list of enums, and the list of messages.
- 07Services: commands, parameters, files, time syncTelemetry on NavLink is best effort: a message is sent and may be lost.
- 08Faults, capabilities and securityA vehicle needs to tell the ground station "the barometer is missing" in a way that is stable, short and does not depend on parsing free text.
- 09Using NavLinkThis is the how-to. It covers generating the codecs, wiring them into firmware, a ground station and Python tools, and trying a link on a bench with the emulator.
- 10Compatibility, versioning and limitsThe stable contract is the wire image plus the generated C struct layout.
Written from the ragnar-vallhala/navlink repository. Each chapter ends with the sources it was checked against.