-
Notifications
You must be signed in to change notification settings - Fork 0
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.
Hardware:
- Board:
STM32F411
(STM32F411VE
MCU) - Wi-Fi Module:
ESP-01 (1MB)
(ESP8266
) - Adapter USB-to-TTL for UART:
RS232
(CP2102
)
Betaflight (STM32F411DISCOVERY
target):
- Download Betaflight 4.0.0 STM32F411DISCOVERY [DEV] (built from
betaflight/betaflight@a6fabe1
) - Download Betaflight Configurator
- Flash downloaded target (instructions here)
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
)
- Replace