Protocol Overview

XLRS is a 2.4GHz radio-based remote control system for FPV drones and robotics, built on the SX1280 LoRa radio module. It uses a split architecture where an RC board reads inputs and communicates with a TX module, which then transmits to an RX module over the air.

Architecture

The system consists of three main components:

  1. RC Board: Reads analog inputs (joysticks, switches) and sends channel data to the TX module via UART.
  2. TX Module: Receives channels from the RC board and transmits them over the SX1280 radio to the RX.
  3. RX Module: Receives radio signals from the TX and outputs CRSF protocol signals to the flight controller.

Communication Flow

graph LR RC[RC Board] -->|UART 420kbps| TX[TX Module] TX -->|SX1280 2.4GHz| RX[RX Module] RX -->|CRSF 420kbps| FC[Flight Controller] FC -.->|Battery Telemetry| RX RX -.->|Radio Telemetry| TX TX -.->|UART Telemetry| RC

Radio Protocol (SX1280)

The system uses SX1280 radio modules with FLRC (Fast Long Range Communication) modulation.

Configuration

  • Frequency: 2420 MHz (default, configurable)
  • Modulation: FLRC
  • Bitrate: 1300 kbps
  • Coding Rate: 1/2
  • Output Power: 10 dBm (configurable)
  • Packet Length: 33 bytes fixed

Half-Duplex Operation

The SX1280 operates in half-duplex mode. The implementation includes timing logic to:

  • Pause channel transmission briefly after sending SYNC packets to allow SYNC_ACK reception.
  • Alternate between TX and RX operations to maintain connection state.
  • Use hysteresis (3 missed sync ACKs) to prevent false disconnects.

Connection Management

The system uses a robust connection state machine:

  • DISCONNECTED: Initial state, waiting for pairing.
  • PAIRING: Exchanging pairing packets with binding UID.
  • CONNECTING: Paired, establishing connection via SYNC handshake.
  • CONNECTED: Active link, transmitting channel data.
  • LOST: Connection timeout detected, attempting to reconnect.

Connection is maintained via a SYNC/SYNC_ACK handshake. Connection loss is detected by monitoring SYNC_ACK reception with hysteresis.

Interfaces

CRSF Output (RX)

  • Standard CRSF protocol at 420000 baud.
  • 16 channels (8 active from radio, 8 centered at 1500µs).
  • 50Hz frame rate (20ms intervals).
  • Bidirectional: receives battery telemetry from flight controller.

UART Protocol (RC ↔ TX)

  • High-speed UART at 420000 baud.
  • Frame-based protocol with CRC8 checksum.
  • Non-blocking state machine for reliable reception.