<<< etheli.com Home Page

Cleanflight / Betaflight Modification for
'vtx_' Settings and SetFreqByMHzMsp Support

This Cleanflight / Betaflight modification enhances how a connected video transmitter can be configured.  With these changes, TBS-SmartAudio and IRC-Tramp video transmitters can be configured via CLI settings, and can be directly tuned to a frequency in MHz using a CLI setting or a Taranis/OpenTX transmitter (via smartport telemetry and modified 'lua' script).

The connected video transmitter must support configuration via a serial port on the flight controller (UART or SoftSerial); see the Unify Smartaudio and IRC Tramp articles in the Betaflight wiki for more information.

The modification is posted as a Github PR here:  Implement 'vtx_' settings and SetFreqByMHzMsp support #4265

See below for firmware files with this modification.

(For a receiver that can be directly turned to a frequency in MHz, see the ArduVidRx project.)

Implemented 'vtx_' CLI settings for SmartAudio and Tramp

This takes the 'vtx_' settings that were created for the SPRacingNEO boards and also implements them for TBS-SmartAudio and IRC-Tramp video transmitters. At startup the settings are applied to the transmitter.  If the video setup is modified via the CMS OSD menu or via MSP (Taranis/OpenTX smartport), the settings are updated.

One nice thing the settings can provide is a way to configure a frequency (via USB / CLI) while the video transmitter is not powered up.  Afer a save and power cycle, the system will startup at the new frequency.

Also, this adds a 'vtx_freq' setting for TBS-SmartAudio and IRC-Tramp video transmitters.  If vtx_band=0 and vtx_freq!=0 then the 'vtx_freq' value (in MHz) will be configured on the transmitter at startup.  If both are zero then the settings will be ignored.  If vtx_band!=0 and a video transmitter is connected then 'vtx_freq' will be set to the current frequency value (in MHz) at startup.

vtx_band = #
Allowed range: 0 - 5
0=user, 1=A, 2=B, 3=E, 4=F(Airwaves/Fatshark), 5=Raceband

vtx_channel = #
Allowed range: 1 - 8

vtx_power = #
Allowed range: 0 - 5
for SmartAudio:  0=25mW, 1=25mW, 2=200mW, 3=500mW, 4=800mW
for TrampHV:  0=25mW, 1=25mW, 2=100mW, 3=200mW, 4=400mW, 5=600mW

vtx_freq = ####
Allowed range: 0 - 5999
if vtx_band!=0 and VTX connected then shows freq in MHz
if vtx_band==0 then sets frequency in MHz

if vtx_band==0 and vtx_freq==0 then the settings will not be sent out to the VTX

For example, to configure the VTX to use band 'F' and channel '6' (5840 MHz), enter the CLI and input:
set vtx_band = 4
set vtx_channel = 6
The VTX configuration will not be changed until after the 'save' and restart.  If it is successful then entering 'set vtx_freq' will show the current frequency value in MHz.

Frequency table:
                  1       2       3       4       5       6       7       8
Band 1:  5865 5845 5825 5805 5785 5765 5745 5725  (A: Boscam A / TBS / RC305)
Band 2:  5733 5752 5771 5790 5809 5828 5847 5866  (B: Boscam B)
Band 3:  5705 5685 5665 5645 5885 5905 5925 5945  (E: Boscam E / DJI)
Band 4:  5740 5760 5780 5800 5820 5840 5860 5880  (F: IRC NexWave / Fatshark)
Band 5:  5658 5695 5732 5769 5806 5843 5880 5917  (R: Raceband)

5.8GHz FPV "Visual" Frequency Chart

SmartAudio-CMS fixes and improvements

This modification implements several improvements to the SmartAudio CMS OSD functionality; see here for details.

(CMS is a setup menu that may be operated via the RC sticks and viewed on the FPV video output; see here for info on CMS.)

Added SetFreqByMHzMsp support for SmartAudio and Tramp

Adds support for setting the VTX frequency in MHz via MSP for TBS-SmartAudio and IRC-Tramp video transmitters.  When using the updated 'lua' script (below) on a Taranis / OpenTX transmitter, the VTX can be directly tuned to a frequency value in MHz.

posted modified 'betaflight-tx-lua-scripts' that utilize this new functionality, here:


In the modified scripts, if the "Band" field is set to 'U' then the "Freq" field may be set to a frequency in MHz.  (The channel field may be used to set the frequency in 100-MHz increments.)  If the "Band" field is set to one of the other values (A/B/E/F/R), then modifying the "Freq" field will make it step through the MHz values corresponding to the various band / channel settings.

To use this functionality a receiver that supports Smartport telemetry must be connected to a serial port (UART) on the flight controller; see here for a how-to:  http://www.nitbeatfpv.com/tramphv-unify-vtx-settings-taranis

This article on Oscar Liang's site is also a good reference:  https://oscarliang.com/betaflight-change-pid-vtx-settings-taranis

Also note the issue with inverted SBUS/Smartport signals, discussed here.

Firmware Files

For firmware builds of this modification applied to Betaflight v3.2.0 (release), see here: 
bf_builds directory.

For firmware builds of this modification applied to Cleanflight v2.1.0 (release), see here:  cf_builds directory.

Source code:
  Betaflight etVtxCfgCMSFreqViaMsp_v3.2.0rel_20171008
  Cleanflight etVtxFreqViaMsp_v2.1.0rel_20171001

Note:  These firmware files should be considered beta-test releases and are to be used at your own risk.  After loading this firmware the controller's configuration may be reset to factory-default values, so the configuration should be backed up before and restored after the firmware update.

Click here to contact me

Back to etheli.com home page

ET Heli