Betaflight

A lot of flight controllers that come with integrated receivers have them connected via SPI to the processor. If you have an AIO flight controller where the receiver is connected via SPI you do not need to push the physical bind button on the flight controller anymore - you can simply bind from the Betaflight CLI.

This is especially handy when the bind button is hard to reach. In the future bind buttons might be omitted on the boards at all - mechanical parts are expensive, so the manufacturers can save a couple of cents.

SPI stands for “Serial Peripheral Interface” and allows multiple devices to use the same serial wires. One device, in this case the MCU, is the master and other devices are the slaves. The communication always happens between the master and one of the slaves, in this case our receiver.

Betaflight

Click “Load Firmware Online” button on the right bottom. After the firmware is downloaded, click “Flash Firmware” and wait until the firmware flashing is completed. How to Set Various Flight Controller Parameters. After the firmware is updated, click the “Connect” button on the right top to enter the Setting page of the flight. If barometer on your flight controller don’t work by default after flashing it with Betaflight, Pls click “firmwares” button below to check out customized Betaflight 4.2.x and tips. With ArduPilot firmware, you might use the onboard DPS310 as external barometer, set GNDEXTBUS -0, GNDPROBEEXT -64, save and reboot F405-STD. With the quadcopter plugged into your PC and the battery connected, make sure you have disconnected from BetaFlight. Now click the connect button in BLHeli configurator. Once connected, click the ‘Read Setup’ button to load the ESC information. The left column shows settings that are common among all four of the ESCs. Betaflight Configurator is a configuration tool for the Betaflight flight control system. It allows you to configure the Betaflight software running on any supported Betaflight target. Betaflight is a flight controller software (firmware) used to fly multi-rotor craft and fixed wing craft. Download Betaflight - Configurator for Windows now from Softonic: 100% safe and virus free. More than 1386 downloads this month. Download Betaflight.

Binding from the Betaflight CLI can be used with a lot of the current brushless whoop AIO boards, for example the Crazybee F4 PRO flight controller - the flightcontroller for the trashcan has its receiver connected via SPI. But also the receiver of the Mobula7 is connected via SPI.

Depending on the Betaflight version you are using, there are different commands to put the receiver into bind mode:

For Betaflight 4.1.x and 4.2.x type

For Betaflight 4.0.x type

into the CLI and hit enter.

The beta version of Betaflight 4.0 used a different command:

Betaflight

So if the first command does nothing, try the second one. I found that a lot of the models that use the Crazybee F4 Pro AIO flight controller have a beta version of Betaflight 4.0 flashed so with those you have to use the bind command.

For Betaflight 3.x type

into the CLI and hit enter.

This will put your receiver into bind mode - same as pushing the physical button. From here you do everything on your transmitter as you would do it after pushing the button.

If you like this content, please consider supporting me by shopping through my affiliate links. It does not cost you anything extra and I will get a small commission for everything you buy.

Other Receivers

Unfortunately this method only works with SPI receivers, meaning you can not bind your FrSky R-XSR, XM+ or any other SBUS enabled receiver with this command, you will have to use your receivers native binding procedure instead. Usually this involves pressing a button on the receiver while plugging in power to the quadcopter.

Betaflightf

Via Graphical User interface

In the latest versions of the Betaflight Configurator you can now also activate SPI binding by clicking the “Bind Receiver” button from the “Receiver” tab.

What is CLI ?

CLI is abbreviation of the a Command Line Interface. It is special configuration mode where commands are given insted of the dedicated setting controls and inputs. Every flight controllers firmware configurator (Cleanflight, Betaflight, Butterflight, iNav, etc) has this mode. It is useful for more specific change of settings and detailed configuration the Flight Controller. It is also usefur for dumping the whole flight controller configuration, backuping and restoring the settings in the easy way. Read more about it below.

How to use CLI?

In order to start using CLI you have to connect to your flight controller with configurator software (See here how to install the standalone configurator software). Click on the “CLI” tab – this will enable flight controllers CLI mode. Write the command in the input field and hit the [Enter] to execute it.

You need to execute save command if you want all the commands and changes to be saved into Flight Controllers memory. Saving will reboot the flight controller. Close the CLI tab or send the exit command to exit the CLI mode without saving.

CLI Dump or Diff?

dump command dumps all the setting of the flight controller. This can be quite a long list
diff command was introduced in the BetaFlight version 3.0 and it dumps only the settings that are different from the defaults.
diff all command dumps only differencies from the defaults but also dumps all the PID profiles.

It is highly recommended to use diff instead of the dump as it results in the significant smaller settings list and only the ones that were changed or differ from the defaults.

Betaflight Github

How to Backup/Restore the settings using CLI?

Sometimes it is usefull to save the Flight Controller settings and restore them in case you need. These cases include FC firmware upgrade, restoring the FC to the point where it worked and etc. Backuping and restoring is very simple task.

Backup: Go to CLI, enter diff (or diff all if you have multiple PID profiles) and copy the provided text to anywhere just to save it for later use.

Restore: Go to CLI, paste the saved settings text to the command input field, hit [Enter]. Your FC settings are restored. Don’t forget to save the settings.

CLI commands list

Betaflight
CommandDescription
1wire <esc>passthrough 1wire to the specified esc
adjrangeshow/set adjustment ranges settings
auxshow/set aux settings
colorconfigure colors
defaultsreset controller to defaults and reboot
dumpprint configurable settings in a pastable form
diffdump only the settings that are different from the defaults. Includes only the current PID profile.
diff alldump only the settings that are different from the defaults. Includes ALL PID profiles.
exitexit without saving
featurelist or -val or val
getget the value of the specified variable
gpspassthroughpassthrough gps to serial
helplists all commands
ledconfigure leds
mapmapping of rc channel order
mixermixer name or list
mode_colorconfigure mode colors
motorget/set motor output value
play_soundindex, or none for next
profileindex (0 to 2)
rateprofileindex (0 to 2)
rxrangeconfigure rx channel ranges (end-points)
rxfailshow/set rx failsafe settings
savesave settings and reboot
serialpassthroughserial passthrough mode, reset board to exit
setset the the given value to the variable. (name=value or blank or * for list)
statusshow system status
versionshow version
serialconfigure serial ports
servoconfigure servos
sd_infosdcard info
tasksshow task stats
mmixdesign custom motor mixer
smixdesign custom servo mixer
Betaflight

Note that specific command list depends on the type of the firmware (BetaFlight, Butterflight, iNav) and firmware version you are using. For exact list of the commands type help in CLI mode.

Usefull CLI commands

bl or dfu command to enter the DFU mode without pushing the button. Reboots the FC board in bootloader mode.

set small_angle = 180 – sets any angle your quadcopter will be able to arm. Usefull when you land unexpectedly severely angled and you are unable to re-arm.

set ledstrip_visual_beeper = ON – When set to on, and the LEDLOW mode is active (i.e. LED strip off), blink the LED strip in synch with beeping, as a visual indicator in cases where the craft is too far away for the beeper to be heard / multiple craft are flying. Values available: [ON,OFF (default)]

Binding with integrated Receivers (connected via SPI):

For Betaflight 4.x – command bind_rx_spi
For Betaflight 3.x: – command frsky_bind
Don’t forget to issue save command after the sucessfull bind.

History:
2018-05-23 – article created
2019-02-13 – Usefull CLI commands updated
2019-07-01 – Usefull CLI commands updated

  • Guide: How to Arm, PreArm and start your quad
    What is Arm and why do we need it? All modern quadcopters (or any
  • ExpressLRS – Open Source Long Range radio control system – Complete Guide
    ExpressLRS is the Open Source Long Range radio control system, developed by Alessandro Carcione (aka AlessandroAU)