INAV Serial Gimbal and Serial Configuration
About 2 minINAVINAV串口云台WalksnailGM 系列头控HeadtrackerUART
I. Introduction
INAV 8.0 introduced serial control support for Walksnail GM series gimbals. Compared to traditional PWM control methods, serial control offers the following advantages:
- Saves up to 4 PWM channels
- Controls gimbal behavior through modes
- More precise data communication and expansion capabilities
However, the disadvantages are: - Cannot enjoy the full flexibility of INAV Mixer like PWM (e.g., complex custom mixing).
II. Control Methods
✅ PWM Channel Control (Standard Control)
- Directly maps RC transmitter sticks/knobs to gimbal channels;
- Assign RC channels in Configuration → Serial Gimbal settings to control the gimbal's three axes;
- Unassigned channels default to center, the gimbal won't respond to input and operates by mode;
- Simpler wiring than PWM (saves 4 SERVO interfaces);
✅Headtracker Control (Enhanced Immersion) - Must enable Gimbal Headtracker mode;
- Serial port receives independent Headtracker data, replacing RC input channels;
- Supports bidirectional serial port, FC TX connects to gimbal, RX connects to Headtracker.
gimbal_serial_single_uart = ON: Allows one serial port on the FC to control the gimbal and receive headtracker data simultaneously.
III. Gimbal Modes (Set via Modes Page)
| Mode Name | Description |
|---|---|
| No Mode (Default) | Default behavior similar to FPV or Follow mode; responds to flight attitude and user input |
| Gimbal Center | Centers and locks the camera, ignoring user input, suitable for restoring view or resetting orientation |
| Gimbal Headtracker | Switches to headtracker input, behaves like Gimbal Center when no headtracker is connected |
| Gimbal Level Tilt | Locks the gimbal's tilt axis to maintain the horizon, can be叠加 with Roll mode |
| Gimbal Level Roll | Locks the gimbal's roll axis to maintain level, can be叠加 with Tilt mode |
IV. Gimbal Advanced Settings (Configurable via CLI)
| Parameter Name | Description | Value Range |
|---|---|---|
| gimbal_pan_trim | Horizontal direction trim | -500 ~ 500 |
| gimbal_tilt_trim | Tilt direction trim (commonly used for FPV pitch-up) | -500 ~ 500 |
| gimbal_roll_trim | Roll direction trim | -500 ~ 500 |
| Wiring Instructions |
- Connect Walksnail Gimbal's serial port TX to FC's RX
- FC's TX can simultaneously output control signals to Gimbal, or use RX to receive Headtracker data
- If the serial port is used for both gimbal control and headtracker input, enable: set gimbal_serial_single_uart = ON
V. INAV Serial Configuration
5.1 Serial Port Type Overview
INAV supports multiple serial port types:
| Serial Port Type | Description |
|---|---|
| VCP | Virtual serial port, directly connects to main controller chip via USB, no additional USB-to-serial module needed |
| UART | Hardware serial port, a pair of TX/RX pins, communication handled by hardware, most stable and efficient |
| SoftSerial | Software-emulated serial port, simulated through software interrupts, high resource usage, only for low-speed applications (e.g., low-speed telemetry) |
5.2 Serial Port Uses
Serial ports can be used for different functions:
| Function | Application Scenario |
|---|---|
| MSP | Flight controller communication (connecting to INAV Configurator) |
| Serial RX | Serial receiver (such as SBUS, CRSF, IBUS, etc.) |
| GPS | GPS module |
| Telemetry | Telemetry data (such as FrSky, MAVLink) |
| Blackbox | Blackbox data recording |
5.3 Configuration Principles
- Configure serial ports first, then enable corresponding features
- Maximum of 3 MSP interfaces allowed
- SoftSerial limited to 19200 baud rate, SOFTSERIAL feature must be enabled
- Each telemetry protocol can only use one serial port (e.g., FrSky telemetry can only be used once)
- Serial ports cannot be arbitrarily shared (MSP and Telemetry or Blackbox can be shared, other combinations are not allowed)
5.4 CLI Advanced Configuration Commands (For Advanced Users Only)
serial <port_index> <function_bitmask> <msp_baud> <gps_baud> <telemetry_baud> <blackbox_baud>- <port_index>: Port number (usually starts from 0, e.g., UART1 is 0)
- <function_bitmask>: Function bitmask (refer to serialPortFunction_e in the source code)
- <baud>: Baud rate, refer to the table below for settings
Baud Rate Number:
| Number | Baud Rate |
| --- | --- |
| 0 | Auto (Automatic) |
| 8 | 115200 (Common) |
| 9 | 230400 |
| 11 | 460800 |
| 12 | 921600 |
| 14 | 1500000 |
| 15 | 2000000 |
| 16 | 2470000 |
————This article is quoted from the official INAV website: https://github.com/iNavFlight/inav/blob/master/docs/Serial.md