MAVLINKHUD

ArduPilot Integration: Setup & Params

Executive Summary

Integrating ELRS with ArduPilot is straightforward, but optimizing it for MAVLink requires specific settings. The default "Auto-Detect" works for RC control, but high-speed telemetry requires locking the baud rates and configuring the RSSI feedback path.

Theory & Concepts

1. The Baud Rate Bottleneck

ELRS air rates have increased faster than the default serial rates.

  • Legacy: CRSF defaults to 420kbaud.
  • The Problem: At 500Hz or 1000Hz air rates, the serial link becomes the bottleneck. If the receiver receives packets faster than it can push them down the wire, it drops them.
  • The Fix: ArduPilot and ELRS now standardize on 460,800 baud. This is a standard integer multiple of 115200, making it more stable on STM32 UARTs than the "odd" 416k/420k rates.

Architecture (The Engineer's View)

1. Protocol Selection

  • RC Control: SERIALx_PROTOCOL = 23 (RCIN). ArduPilot detects the CRSF header.
  • MAVLink Bridge: SERIALx_PROTOCOL = 2 (MAVLink 2). The UART is passed directly to the GCS router.

Legacy OSDs expect "RSSI" (Signal Strength). ELRS users care about "LQ" (Link Quality).

  • The Translation: RSSI_TYPE = 5 (Telemetry).
  • RC_OPTIONS: Bit 8 (USE_CRSF_LQ_AS_RSSI).
    • Effect: ArduPilot maps the 0-100 LQ value onto the 0-100 RSSI range for OSDs that don't support a dedicated LQ field.

Key Parameters

Parameter Value Description
SERIALx_PROTOCOL 23 RCIN (for Control).
SERIALx_BAUD 460 460,800 Baud. Critical for high-speed telemetry.
RC_OPTIONS 256 Use LQ for RSSI (Bit 8).
RSSI_TYPE 5 Receive RSSI from Telemetry protocol.

Source Code Reference

Practical Guide: The 460k Baud Standard

If you use ELRS 3.0+ with ArduPilot 4.4+, you should standardize on 460,800 baud.

The Problem

  • Default: Many ELRS receivers ship defaulting to 420,000 baud.
  • Symptoms: You see occasional "Failsafe" warnings even when close, or telemetry is choppy. This is because 420k is not a "native" UART speed, leading to framing errors on some F4 flight controllers.

The Fix

  1. WiFi Config: Connect to your ELRS Receiver via WiFi.
  2. Model Tab: Set "Serial Protocol" to CRSF and "Baud Rate" to 460800.
  3. ArduPilot: Set SERIALx_BAUD = 460 (where x is your RC port).
  4. Reboot: Reboot both the receiver and the flight controller.

Health Check (OSD)

  • RxBt (Receiver Battery): If this updates rapidly (several times a second), your telemetry link is healthy.
  • Link Quality (LQ): Should stay at 9:100 (mode 2) or 100 (mode 1) during bench testing. If it dips to 50 or below just a few meters away, check your antenna orientation.