Post · 2 min read· pp. 315–317

Serial Ports

Each UART on the flight controller does one job -- receiver, ESC telemetry, GPS, Blackbox logger and so on. Set them on the Configuration tab; this page covers the details and the CLI.

Rules

  • Each function can be on one port only. Telemetry functions can't share a port with other telemetry functions.
  • At most 3 ports can run MSP, and one port must always be available for MSP/CLI (USB counts).
  • Turn on the matching feature for some functions -- e.g. GPS.
  • If the configuration is invalid, the serial settings reset to defaults.

CRSF, ExpressLRS, F.Port, F.Bus, SRXL2, iBUS2, EX Bus and Ghost receivers carry telemetry over the receiver link itself, so they don't need a separate telemetry port.

The serial command

text
serial <port> <function> <msp baud> <gps baud> <telemetry baud> <blackbox baud>

diff shows your current port settings as serial lines. For example serial 3 64 115200 57600 0 115200 sets UART4 to Serial Rx.

Port identifiers

PortID
UART1 ... UART100 ... 9
USB (VCP)20
SoftSerial 1, 230, 31
LPUART140

Functions

The function is a bit mask; ports with combined functions add the values.

FunctionValueConfigurator name
None0Disabled
MSP1MSP
GPS2GPS
FrSky Hub telemetry4Telemetry: FrSky Hub
HoTT telemetry8Telemetry: Graupner HoTT
LTM telemetry16Telemetry: LTM
SmartPort telemetry32Telemetry: FrSky SmartPort
Serial RX64Serial Rx
Blackbox128Blackbox Logging
MAVLink telemetry512Telemetry: MAVLink
ESC sensor1024ESC Telemetry
VTX SmartAudio2048
iBUS telemetry4096Telemetry: FlySky iBUS
VTX Tramp8192
RunCam device16384
Benewake LIDAR32768
FrSky OSD65536
SBUS output262144S.BUS Output
F.Bus master524288F.BUS
S.Port master1048576S.PORT Master

Baud rates

UseRates
MSP9600, 19200, 38400, 57600, 115200, 230400, 250000, 500000, 1000000
GPS9600, 19200, 38400, 57600, 115200 (auto-baud available)
TelemetryAUTO, 9600 ... 115200 -- most telemetry protocols ignore this
Blackbox19200 ... 2000000, 2470000 -- use 2000000 for OpenLager

Receiver protocols and most telemetry set their own speed.

Pin swap, inversion and half-duplex

Several functions have their own signalling settings, for when the wiring needs it:

FunctionSettings
Receiverserialrx_inverted, serialrx_halfduplex, serialrx_pinswap
Telemetrytlm_inverted, tlm_halfduplex, tlm_pinswap
ESC telemetryesc_sensor_halfduplex, esc_sensor_pinswap
F.Bus masterfbus_master_inverted, fbus_master_pinswap
S.Port mastersport_master_inverted, sport_master_pinswap

Inversion and pin swap need an F7, G4 or H7 processor.

Serial passthrough

serialpassthrough connects USB straight through to a device on a UART -- for configuring or flashing a GPS, receiver or other peripheral with its own software.

text
serialpassthrough <port id> [baud] [mode] [DTR pinio] [port2 id] [port2 baud] [port2 mode]

For example serialpassthrough 2 115200 connects USB to UART3 at 115200 baud. Disconnect the Rotorflight Configurator first, then open the device's software. Power cycle the flight controller to leave passthrough.

With a second port given, two UARTs are connected to each other instead of to USB.

gpspassthrough is a shortcut for the GPS port.