Skip to content

WFB-NG — Configuration

Encryption keys

WFB-NG encrypts traffic. Keys are generated with a single command (so they form a valid pair):

bash
wfb_keygen

It creates two files. Place them like this:

  • drone.key → on the camera (drone): /etc/drone.key
  • gs.key → on the ground station: /etc/gs.key

Keys must be from the same pair

If gs.key and drone.key were generated by different wfb_keygen runs, the link will not come up (decryption error). Generate both keys together, then distribute them to the devices.

Configuration: /etc/wifibroadcast.cfg

The main link config. Channel and region are set in [common]; the video/telemetry streams live in separate sections.

ini
[common]
wifi_channel = 161          # 161 = 5825 MHz (5.8 GHz)
wifi_region = 'BO'          # region for maximum transmit power

[drone_video]
peer = 'connect://127.0.0.1:5600'   # where to push video
bandwidth = 20              # 20 or 40 MHz
stbc = 1
ldpc = 1
mcs_index = 1
fec_k = 8
fec_n = 12

[gs_video]
peer = 'listen://0.0.0.0:5600'

[gs_mavlink]
peer = 'connect://127.0.0.1:14550'

Key parameters

ParameterValueDescription
wifi_channele.g. 161Wi-Fi channel (must match on drone and GS)
wifi_regione.g. 'BO'Region/power (choose one legal for your country)
bandwidth20 / 40Channel width, MHz
mcs_index07Modulation scheme: higher = more bitrate, less range
stbc / ldpc0/1Coding for interference resilience
fec_k / fec_ne.g. 8 / 12FEC: k data out of n packets (more headroom = more robust)
short_giTrue/FalseShort guard interval

Power and region

The wifi_region parameter affects the allowed transmit power. Use a value that is legal for your country and band. Excessive power may be illegal and can overheat the card.

Bitrate Calculator

Select your parameters — the calculator shows the real video bitrate after FEC overhead.

MCS Index (modulation scheme)
QPSK 1/2
Channel bandwidth
Guard Interval
FEC — quick select
fec_k8
/
fec_n12
Lower k/n = more robust, less bitrate
Video bitrate
FEC
PHY: 13 Mbps
Video bitrate
8.7 Mbps
FEC 8/12 · 67% of PHY

How to read the result

PHY is the raw Wi-Fi channel bitrate. Video bitrate is what actually reaches the screen after FEC overhead. For smooth HD video you need ≥ 15 Mbps, for comfortable flying — ≥ 20 Mbps. Default settings: MCS 1, 20 MHz, Long GI, FEC 8/12 give ~8.7 Mbps — enough for basic FPV.