Skip to content

Betaflight MAVLink Telemetry

jonpas edited this page Jan 10, 2019 · 9 revisions

This page describes how to wire a Betaflight flight controller board and a USB-to-TTL Serial Converter (USART) to get MAVLink Telemetry data out of Betaflight to your PC and decode it.

Click to Download

Hardware:

  • Board: STM32F411 (STM32F411VE MCU)
  • Wi-Fi Module: ESP-01 (1MB) (ESP8266)
  • Adapter USB-to-TTL for UART: RS232 (CP2102)

Setup

Betaflight (STM32F411DISCOVERY target):

Betaflight Telemetry:

  • Connect to Configurator via USER USB port
  • Go to "Configuration" (tab) -> "Other Features" (box) and enable "TELEMETRY"
  • "Save and Reboot"
  • Go to "Ports" (tab) and for "UART6" select "MAVLink" in "Telemetry Output" (dropdown) and set it to "115200"
  • "Save and Reboot"

USB-to-TTL Module Connection:

  • Connect the following pins (module -> board)
    • RXD -> PC6 (USART6 TX)
    • TXD -> PC7 (USART6 RX)
    • GND -> GND
  • Connect USB-to-TTL to a USB port on PC
  • Verify telemetry is getting sent with a serial reader (picocom, minicom, screen, RealTerm, ...)
    • Make sure serial reader baud rate is set to 115200!
    • Data is sent in MAVLink protocol (garbled without a decoder)

MAVLink Decoder (Python 3):

  • Download pymavlink (eg. via pip)
  • Download mavlink_listener
  • Run pythonk mavlink_listener.py --device=<port> --baudrate=115200
    • Replace <port> with connected TTY/COM port (eg. Linux: /dev/ttyUSB0, Windows: COM0)
Clone this wiki locally