[DOC] add additional descriptions to settings.yaml
[inav/snaewe.git] / docs / Cli.md
bloba538fb2ccdc2c7d915f9c878c9fddcce9819c856
1 # Command Line Interface (CLI)
3 INAV has a command line interface (CLI) that can be used to change settings and configure the FC.
5 ## Accessing the CLI.
7 The CLI can be accessed via the GUI tool or via a terminal emulator connected to the CLI serial port.
9 1. Connect your terminal emulator to the CLI serial port (which, by default, is the same as the MSP serial port)
10 2. Use the baudrate specified by msp_baudrate (115200 by default).
11 3. Send a `#` character.
13 To save your settings type in 'save', saving will reboot the flight controller.
15 To exit the CLI without saving power off the flight controller or type in 'exit'.
17 To see a list of other commands type in 'help' and press return.
19 To dump your configuration (including the current profile), use the 'dump' or 'diff' command.
21 See the other documentation sections for details of the cli commands and settings that are available.
23 ## Backup via CLI
25 Disconnect main power, connect to cli via USB/FTDI.
27 dump using cli
29 ```
30 profile 0
31 dump
32 ```
34 dump profiles using cli if you use them
36 ```
37 profile 1
38 dump profile
39 profile 2
40 dump profile
41 ```
43 copy screen output to a file and save it.
45 Alternatively, use the `diff` command to dump only those settings that differ from their default values (those that have been changed).
48 ## Restore via CLI.
50 Use the cli `defaults` command first.
52 When restoring from backup it's a good idea to do a dump of the latest defaults so you know what has changed - if you do this each time a firmware release is created you will be able to see the cli changes between firmware versions. If you blindly restore your backup you would not benefit from these new defaults or may even end up with completely wrong settings in case some parameters changed semantics and/or value ranges.
54 It may be good idea to restore settings using the `diff` output rather than complete `dump`. This way you can have more control on what is restored and the risk of mistakenly restoring bad values if the semantics changes is minimised.
56 To perform the restore simply paste the saved commands in the Configurator CLI tab and then type `save`.
58 After restoring it's always a good idea to `dump` or `diff` the settings once again and compare the output with previous one to verify if everything is set as it should be.
61 ## CLI Command Reference
63 | `Command`        | Description                                    |
64 |------------------|------------------------------------------------|
65 | `1wire <esc>`    | passthrough 1wire to the specified esc         |
66 | `adjrange`       | show/set adjustment ranges settings            |
67 | `aux`            | show/set aux settings                          |
68 | `beeper`         | show/set beeper (buzzer) usage (see docs/Buzzer.md) |
69 | `mmix`           | design custom motor mixer                      |
70 | `smix`           | design custom servo mixer                      |
71 | `color`          | configure colors                               |
72 | `defaults`       | reset to defaults and reboot                   |
73 | `dump`           | print configurable settings in a pastable form |
74 | `diff`           | print only settings that have been modified    |
75 | `exit`           |                                                |
76 | `feature`        | list or -val or val                            |
77 | `get`            | get variable value                             |
78 | `gpspassthrough` | passthrough gps to serial                      |
79 | `help`           |                                                |
80 | `led`            | configure leds                                 |
81 | `map`            | mapping of rc channel order                    |
82 | `motor`          | get/set motor output value                     |
83 | `msc`            | Enter USB Mass storage mode. See docs/USB_Mass_Storage_(MSC)_mode.md for usage information.|
84 | `play_sound`     | index, or none for next                        |
85 | `profile`        | index (0 to 2)                                 |
86 | `rxrange`        | configure rx channel ranges (end-points) |
87 | `save`           | save and reboot                                |
88 | `serial`         | Configure serial ports                         |
89 | `serialpassthrough <id> <baud> <mode>`| where `id` is the zero based port index, `baud` is a standard baud rate, and mode is `rx`, `tx`, or both (`rxtx`) |
90 | `set`            | name=value or blank or * for list              |
91 | `status`         | show system status                             |
92 | `temp_sensor`    | list or configure temperature sensor(s). See docs/Temperature sensors.md |
93 | `wp`             | list or configure waypoints. See more in docs/Navigation.md section NAV WP |
94 | `version`        |                                                |
96 ### serial
98 The syntax of the `serial` command is `serial <id>  <functions> <msp-baudrate> <gps-baudrate> <telemetry-baudate> <peripheral-baudrate>`.
100 A shorter form is also supported to enable and disable functions using `serial <id> +n` and
101 `serial <id> -n`, where n is the a serial function identifier. The following values are available:
103 | Function              | Identifier    |
104 |-----------------------|---------------|
105 | MSP                   | 0             |
106 | GPS                   | 1             |
107 | TELEMETRY_FRSKY       | 2             |
108 | TELEMETRY_HOTT        | 3             |
109 | TELEMETRY_LTM         | 4             |
110 | TELEMETRY_SMARTPORT   | 5             |
111 | RX_SERIAL             | 6             |
112 | BLACKBOX              | 7             |
113 | TELEMETRY_MAVLINK     | 8             |
114 | TELEMETRY_IBUS        | 9             |
115 | RCDEVICE              | 10            |
116 | VTX_SMARTAUDIO        | 11            |
117 | VTX_TRAMP             | 12            |
118 | UAV_INTERCONNECT      | 13            |
119 | OPTICAL_FLOW          | 14            |
120 | LOG                   | 15            |
121 | RANGEFINDER           | 16            |
122 | VTX_FFPV              | 17            |
124 `serial` can also be used without any argument to print the current configuration of all the serial ports.
126 ## CLI Variable Reference
128 See [Settings.md](Settings.md).