INAV Ground Station CLI
The INAV Ground Control Station has a Command Line Interface (CLI) that can be used to change settings and configure the flight controller (FC) board.
I. CLI Access Methods
The CLI can be accessed through graphical interface tools (such as INAV Configurator) or by connecting to the serial port where the CLI is located using a terminal emulator.
📌 Connection Methods
- Use a serial terminal tool (such as PuTTY, SerialPort, terminal window, etc.) to connect to the CLI serial port (defaults to the same as the MSP serial port).
- Set the baud rate to the value specified by msp_baudrate, which defaults to
115200. - After a successful connection, enter any character (such as pressing # once) to activate the CLI.
💾 Save and Exit
- Save settings and restart the flight controller: Enter the command save, the system will save the current settings and automatically restart the flight controller.
- Exit CLI without saving: Enter the command exit
📋 Common Commands Description - View all available commands: Enter help and press Enter
- Export the current complete configuration (including the current profile): Enter dump
- View only modified settings: Enter diff
II. Backup via CLI
- Disconnect the main power source (such as the LiPo battery) to ensure safe operation.
- Connect to the flight controller board via USB or FTDI to serial module, and enter the CLI interface.
You can use the following commands to export all configuration files (profiles) settings:
Important
profile 0
dump
If you use multiple Profiles, continue entering:
Important
profile 1
dump profile
Important
profile 2
dump profile
✅ Tip: After executing each dump, copy the CLI window output and save it as a text file for later restoration or configuration comparison.
If you only want to export configuration items that differ from default values, you can use the following command:
Important
diff
This command will only show parameters that you have actually changed, making it easier for version control or migrating settings.
III. Restore Settings via CLI
Before restoring a backup, it is recommended to run the following command first to reset flight controller parameters to default values:
Important
defaults
Why is it not recommended to directly paste the entire backup?
- Default parameters may change with each firmware update.
- If you blindly restore the entire backup, you might miss improved default values in the new firmware, and it could even lead to restoration errors or abnormal flight controller behavior due to changes in parameter meanings or value ranges.
✅ Recommended approach: - Execute the dump command once before and after upgrading, and save the output text;
- Then use the diff command to restore only the settings you manually adjusted, avoiding risks from default value changes.
Recommended Restoration Method
If you previously exported changed parameters using thediffcommand, you can paste these parameters back into the CLI to restore the configuration:
- Open the CLI tab in the Configurator;
- Paste the saved configuration (diff or dump output) into it;
- Enter and execute the save command
The flight controller will automatically restart and apply the new settings.
Post-Restoration Check
After completing the restoration, run the following again:
Important
dump 或者 diff
Compare the output with the backup before restoration to ensure all parameters are correct.
CLI Command Reference
| Command | Description |
|---|---|
| adjrange | Configure adjustment range |
| assert | |
| aux | Configure modes |
| batch | Start or end a batch of commands |
| battery_profile | Change battery profile |
| beeper | Display/set beeper usage |
| bind_rx | Start binding of SRXL2 or CRSF receiver |
| blackbox | Configure blackbox fields |
| bootlog | Display boot events |
| color | Configure colors |
| defaults | Reset to defaults and restart |
| dfu | DFU mode on restart |
| diff | List configuration changes from defaults |
| dump | Dump configuration |
| exit | |
| feature | List, enable or disable <-val> |
| flash_erase | Erase flash chip |
| flash_info | Display flash chip information |
| flash_read | |
| flash_write | |
| get | Get variable value |
| gpspassthrough | GPS passthrough to serial |
| gvar | Configure global variables |
| help | Display CLI help and command parameters/options |
| led | Configure LEDs |
| logic | Configure logic conditions |
| map | Configure RC channel order |
| memory | View memory usage |
| mmix | Customize motor mixer |
| mode_color | Configure mode and special colors |
| motor | Get/set motor |
| msc | Enter USB MSC mode. For usage information, see USB MSC documentation. |
| osd_layout | Get or set OSD item layout |
| pid | Configurable PID controller |
| play_sound | <index> or next item is none |
| profile | Change profile |
| resource | View currently used resources |
| rxrange | Configure RX channel range |
| safehome | Define safe home position. For usage information, see safehome documentation. |
| save | Save and restart |
| sd_info | SD card information |
| serial | Configure serial port. Usage |
| serialpassthrough | Passthrough serial data to port, where <id> is zero-based port index, <baud> is standard baud rate, <mode> is rxtx, rx, tx, or both (rxtx), <options> is a short string like 8N1 or 8E2 |
| servo | Configure servos |
| set | Change settings, use name=value or blank or * for list |
| smix | Customize servo mixer |
| status | Display status. Error codes can be found here |
| tasks | Display task statistics |
| temp_sensor | List or configure temperature sensors. For more information, see Temperature sensors documentation. |
| timer_output_mode | Override automatic timer/PWM function assignment. Other information |
| version | Display version |
| wp | List or configure waypoints. See navigation documentation. |
| Flash Chip Management | |
| For targets with flash data chips (typically used for blackbox logging), the following additional commands are provided. | |
| Command | Function |
| --- | --- |
| flash_erase | Erase flash chip |
| flash_info | Display flash chip information (used space, free space, etc.) |
| flash_read <length> <address> | Read byte data of specified length from specified address |
| flash_write <address> <data> | Write data to specified address |
| These commands are typically used to manage data stored in flash chips, especially when using blackbox logging in flight controllers or other embedded systems. | |
| ————This article is referenced from the INAV official website: https://github.com/iNavFlight/inav/blob/master/docs/Cli.md |