VTX Setup via Betaflight CLI

Smart audio is one of the few Betaflight features that you can not set from the Betaflight configurator. You either set your video transmitter from the OSD or via command line interface - sometimes it might even be necessary to set your VTX via Betaflight CLI, for example when you switched your transmitter to a channel that your goggles are not capable of receive on, or your video transmitter is stuck on a channel that it itself does not support.

This is what happened to me once on my tinyhawk, I wanted to switch to E8, the frequency I am usually on, but did not check the manual and as it turns out this frequency is by default blocked on the tinyhawks video transmitter - you can set it to this frequency, but that is it - it will not transmit anything.

So what to do now? Of course you can switch your channel with the button on your video transmitter, but it will reset every time you power cycle to the frequency that was set by smartaudio.

This article also applies to the IRC Tramp protocol. Within Betaflight the same commands are used no matter which protocol you actually use.

Setting the Band

To set the band invoke the following command from the CLI tab:

set vtx_band=n

n being a number from 0 to 5, representing the following bands:

n Band
0 User *
1 A
2 B
3 E
4 F (also Airwave or Fatshark)
5 C (also Raceband)

* The value 0 or user band has a special meaning - when you set it, it allows you to set an absolute frequency, more about that later.

If you want to set your band to raceband you would type:

set vtx_band=5

into the CLI.

Setting the channel

To set the channel simply type:

set vtx_channel=n

n being a number from 1-8 corresponding to the actual channel you want ot use, so for example:

set vtx_channel=8

Setting the Frequency

If you set the band to 0, you can manually set your frequency:

set vtx_freq=n

n being the actual frequency you want your transmitter to be set to. For example:

set vtx_freq=5917

I would still recommend setting the band and channel instead, it is simply easier.

Setting the output power

If you have a video transmitter on which you can change the output power, you can use the following command:

set vtx_power=n

n being a number from 0 to 5. Which power is actually set, highly depends on your transmitter, here are some examples:

n Smart Audio TBS Unify Nano IRC Tramp
0 25mW 25mW 25mW
1 25mW 25mW 25mW
2 200mW 50mW 100mW
3 500mW 200mW
4 800mW 400mW
5 600mW

Saving

After you are done, do not forget to save - otherwise your settings are not committed. Once you are done simply type:

save

Your settings should now be saved. You can quickly validate that everything worked out by querying the frequency the video transmitter is currently set to:

get vtx_freq

Full Example

If you want to set your VTX to E8 via CLI you would type the following

set vtx_band=3
set vtx_channel=8
save

After saving check your frequency:

get vtx_freq

This should now show:

vtx_freq  =  5945
Allowed  range:  0  -  5999
Default  value:  5740

Chris is a Vienna based software developer. In his spare time he enjoys reviewing tech gear, ripping quads of all sizes and making stuff.

Learn more about Chris, the gear he uses and follom him on social media:

Also check out

Betaflight CLI bind

Betaflight CLI bind

Happymodel - Mobula7

Happymodel - Mobula7
Show more comments