[path] conf_dir = '/etc' bin_dir = '/usr/bin' tmp_dir = '/tmp' log_dir = '/var/log' # Service-wide settings [common] debug = False version = '0.0.1.trunk' commit = None primary = True # Set to False if you use several wfb instances on one card. Only primary instance will set radio channel. log_file = None # Set to "wifibroadcast.log" to disable log to stdout binary_log_file = None # Machine readable log for post-processing # File name should have '%%s' inside for profile mapping. # For example: 'wfb_telemetry_%%s.log' set_nm_unmanaged = True # Set radio interface in 'unmanaged state' in NetworkManager radio_mtu = 1445 # Used for mavlink aggregation and for tunnel packets - should be less or equal to MAX_PAYLOAD_SIZE, don't change if doubt tunnel_agg_timeout= 0.005 # aggragate tuntap packets if less than radio_mtu but no longer than 5ms mavlink_agg_timeout = 0.1 # aggragate mavlink packets if less than radio_mtu but no longer than 100ms mavlink_err_rate = True # If true then inject RX error rate else absolute values log_interval = 1000 # [ms] Default interval which wfb_rx/tx use for statistics reporting tx_sel_rssi_delta = 3 # [dB] hysteresis for antenna selection by RSSI tx_sel_counter_abs_delta = 3 # [pkt] hysteresis for antenna selection by RX packet counter tx_sel_counter_rel_delta = 0.1 # default is max(3 packets or 10% of packets from the best antenna) tx_rcv_buf_size = 2097152 # UDP SO_RCVBUF. Set 0 to use net.core.rmem_default. Increase in case of non-cbr data stream # This should not be greater than net.core.rmem_max rx_snd_buf_size = 2097152 # UDP SO_SNDBUF. Set 0 to use net.core.wmem_default. # This should not be greater than net.core.wmem_max wifi_channel = 165 # radio channel @5825 MHz, range: 5815-5835 MHz, width 20MHz # Also you can set own frequency channel for each wifi card, for example: # {'wlan0': 161, 'wlan1': 165} # Also you can specify frequency in MHz instead of channel number if your # wifi driver supports this wifi_region = 'BO' # Set CRDA region wifi_txpower = None # Leave None to use default power settings from driver. # There is a special value 'off' for RX only cards. # For 8812au set to -dBm * 100. I.e for 30dBm set to -3000 # For 8812eu set to dBm * 100. I.e for 30dBm set to 3000 # Also you can set own txpower for each wifi card, for example: # {'wlan0': -100, 'wlan1': 100, 'wlan2': 'off'} temp_measurement_interval = 10 # [s] (8812eu only) Internal RF path temp measurement. temp_overheat_warning = 60 # [*C] (8812eu only) Overheat warning threshold. # Cluster definition for distributed mode [cluster] nodes = { # required host attrs: 'wlans' # optional host attrs (will override defaults): # 'ssh', 'server_address', 'wifi_txpower', # 'wifi_channel', 'ssh_user', 'ssh_port', 'ssh_key' # 'custom_init_script' # # If ssh_user or ssh_port is set to None then node will not be automatically initialized in ssh mode. # If ssh_key is None, then ssh_agent will be used. # Local cards (use driver-default txpower settings): #'127.0.0.1': { 'wlans': ['wlan1', 'wlan2'], 'wifi_txpower': None, 'server_address': '127.0.0.1' }, # Remote cards: #'192.168.1.123' : { 'wlans': ['wlan0', 'wlan1'], 'wifi_txpower': 'off'}, # rx-only node #'192.168.1.155' : { 'wlans': ['wlan0', 'wlan1']}, # rx/tx node # OpenWRT >= 24.10 doesn't create wifi interface when wifi card is disabled # in /etc/config/wireless (this is required for wfb-ng operation). # So you need to add custom_init_script that will create this interface during wfb-ng init. # '192.168.1.222': { 'wlans': ['wlan0'], 'wifi_txpower': None, 'custom_init_script': 'iw phy phy0 interface add wlan0 type monitor flags otherbss || true'}, } # Cluster init can be auto (--cluster ssh) or manual (--cluster manual) # In second case you need to generate node setup scripts via (--gen-init) # and run them on cluster nodes yourself ssh_user = 'root' ssh_port = 22 ssh_key = None # Path to ssh private key. If None then it will try to use ssh-agent custom_init_script = None # Do some custom command inside of node init script before wfb-ng start # You can specify any bash snippet here server_address = None # Set to IP address which is reachable from all cluster nodes # For local cards need to override it to 127.0.0.1 in the node attributes! base_port_server = 10000 # UDP ports allocated on server base_port_node = 11000 # UDP ports allocated on nodes ## Stream allocation scheme: # Down streams (vehicle to GS): 0 - 127 # Up streams (GS to vehicle): 128 - 255 # Stream ranges: # 0 - 15: video streams, 0 is default video stream # 16 - 31: mavlink streams, 16 is default mavlink stream # 32 - 47: tunnel streams, 32 is default tunnel stream # All other ranges reserved for future use ################################################################################################### # WFB-ng top level profiles available as systemctl services wifibroadcast@[:] # # You can define any amount of such profiles # ################################################################################################### ## Required fiels in top level profiles ## 1. "streams" -- that have required keys: "name", "service_type" and "profiles". Any other k/v pairs can be used to override values inherided from low level profiles. ## 2. "stats_port" -- TCP port for CLI. Should be int or None to disable statistics completely. ## 3. "api_port" -- TCP port for public JSON API. Should be int or None to disable API. ## 4. "link_domain" -- moved from common.link_id ## All streams can be point-to-point(one- or two-way transfers) or point-to-multipoint(one-way transfers only), but not multipoint-to-point or multipoint-to-multipoint ## In case of one-way stream you can specify only "stream_rx" on RX side and "stream_tx" on TX side. ## For two-way streams you need to specify both of them ## One-way stream types: udp_direct_rx, udp_direct_tx, udp_proxy ## Two-way stream types: mavlink, tunnel, udp_proxy ## The difference between udp_direct_tx and udp_proxy (in tx-only mode) is that the first unable to select wifi card for TX using RSSI info from other RX channels [drone] streams = [{'name': 'video', 'stream_rx': None, 'stream_tx': 0x00, 'service_type': 'udp_direct_tx', 'profiles': ['base', 'drone_base', 'video', 'drone_video']}, {'name': 'mavlink', 'stream_rx': 0x90, 'stream_tx': 0x10, 'service_type': 'mavlink', 'profiles': ['base', 'drone_base', 'mavlink', 'drone_mavlink']}, {'name': 'tunnel', 'stream_rx': 0xa0, 'stream_tx': 0x20, 'service_type': 'tunnel', 'profiles': ['base', 'drone_base', 'tunnel', 'drone_tunnel']} ] stats_port = 8002 # used by wfb-cli, set to None completely disable statistics API api_port = 8102 # public JSON API link_domain = "default" # It will be hashed and mapped to three bytes of MAC # You can use different link ids for multi-vehicle setup without stream remapping. # For that case you need to have several profiles (both for gs and drone) - one pair for each link (GS <-> droneX) # Redefine peer addresses, tunnel interfaces and tunnel addresses to not overlap # On GS use ":" to separate active profiles in command-line. For example "wfb-server gs1:gs2:gs3 wlan1 wlan2" [gs] streams = [{'name': 'video', 'stream_rx': 0x00, 'stream_tx': None, 'service_type': 'udp_direct_rx', 'profiles': ['base', 'gs_base', 'video', 'gs_video']}, {'name': 'mavlink', 'stream_rx': 0x10, 'stream_tx': 0x90, 'service_type': 'mavlink', 'profiles': ['base', 'gs_base', 'mavlink', 'gs_mavlink']}, {'name': 'tunnel', 'stream_rx': 0x20, 'stream_tx': 0xa0, 'service_type': 'tunnel', 'profiles': ['base', 'gs_base', 'tunnel', 'gs_tunnel']} ] stats_port = 8003 # used by wfb-cli api_port = 8103 # public JSON API link_domain = "default" ## Example of custom profiles not related to drones [two_way_udp_example_side_a] streams = [{'name': 'audio', 'stream_rx': 0xb0, 'stream_tx': 0x30, 'service_type': 'udp_proxy', 'profiles': ['base', 'radio_base'], 'peer': 'listen://127.0.0.1:1235', 'keypair': 'drone.key'}] stats_port = 8004 api_port = 8104 link_domain = "test_two_way_udp" [two_way_udp_example_side_b] streams = [{'name': 'audio', 'stream_rx': 0x30, 'stream_tx': 0xb0, 'service_type': 'udp_proxy', 'profiles': ['base', 'radio_base'], 'peer': 'connect://127.0.0.1:1234', 'keypair': 'gs.key'}] stats_port = 8005 api_port = 8105 link_domain = "test_two_way_udp" ## Special profiles for drone provisioning [drone_bind] streams = [{'name': 'bind_tunnel', 'stream_rx': 0xff, 'stream_tx': 0x7f, 'service_type': 'tunnel', 'profiles': ['base', 'bind_base', 'tunnel', 'drone_bind_tunnel']}] stats_port = 8098 api_port = 8198 link_domain = "drone_bind" [gs_bind] streams = [{'name': 'bind_tunnel', 'stream_rx': 0x7f, 'stream_tx': 0xff, 'service_type': 'tunnel', 'profiles': ['base', 'bind_base', 'tunnel', 'gs_bind_tunnel']}] stats_port = 8099 api_port = 8199 link_domain = "drone_bind" ########################################################################################################################### # Low level profiles can be used to build top level profiles via inheritance # # You can define any number of them and split options between them as you want - only resulting set of options has matter # ########################################################################################################################### ## Low level profiles have protocol-dependant fields [base] stream_rx = None stream_tx = None keypair = None mirror = False # Set to true if you want to mirror packet via all cards for redundancy. Not recommended if cards are on one frequency channel. # Radio settings for TX and RX bandwidth = 20 # bandwidth 20 or 40 MHz force_vht = False # Use VHT for 20 and 40 MHz bandwidth # Radiotap flags for TX: short_gi = False # use short GI or not stbc = 1 # stbc streams: 1, 2, 3 or 0 if unused ldpc = 1 # use LDPC FEC. Currently available only for 8812au and must be supported both on TX and RX. mcs_index = 1 # mcs index # Packet queueing control use_qdisc = False # Use or bypass kernel qdisc. Set to True if you want to use traffic shaper fwmark = 0 # If use qdisc then set fwmark to this value for data packets and to fwmark + 1 for FEC packets control_port = 0 # Override in tx sections if you want to manually control wfb_tx processes via wfb_tx_cmd utility [drone_base] keypair = 'drone.key' [gs_base] keypair = 'gs.key' [bind_base] keypair = 'bind.key' # Special keypair for drone binding only! stbc = 0 # Use settings compatible with all ldpc = 0 # wifi cards to avoid deadlock short_gi = False bandwidth = 20 mcs_index = 1 [radio_base] frame_type = 'data' # Use data or rts frames fec_k = 1 # FEC K (For tx side. Rx will get FEC settings from session packet) fec_n = 2 # FEC N (For tx side. Rx will get FEC settings from session packet) fec_timeout = 0 # [ms], 0 to disable. If no new packets during timeout, emit one empty packet if FEC block is open fec_delay = 0 # [us], 0 to disable. Issue FEC packets with delay between them. [video] frame_type = 'data' # Use data or rts frames fec_k = 8 # FEC K (For tx side. Rx will get FEC settings from session packet) fec_n = 12 # FEC N (For tx side. Rx will get FEC settings from session packet) fec_timeout = 0 # [ms], 0 to disable. If no new packets during timeout, emit one empty packet if FEC block is open fec_delay = 0 # [us], 0 to disable. Issue FEC packets with delay between them. peer = None [mavlink] log_messages = False # Log all messages to binary log for post processing frame_type = 'data' # Use data or rts frames fec_k = 1 # FEC K (For tx side. Rx will get FEC settings from session packet) fec_n = 2 # FEC N (For tx side. Rx will get FEC settings from session packet) fec_timeout = 0 # [ms], 0 to disable. If no new packets during timeout, emit one empty packet if FEC block is open fec_delay = 0 # [us], 0 to disable. Issue FEC packets with delay between them. peer = None osd = None inject_rssi = True # inject RADIO_STATUS packets mavlink_sys_id = 3 # for injected rssi packets mavlink_comp_id = 68 # MAV_COMP_ID_TELEMETRY_RADIO call_on_arm = None # call program on arm call_on_disarm = None # call program on disarm mavlink_tcp_port = None # listen for connections from QGC or from onboard computer [tunnel] frame_type = 'data' # Use data or rts frames fec_k = 1 # FEC K (For tx side. Rx will get FEC settings from session packet) fec_n = 2 # FEC N (For tx side. Rx will get FEC settings from session packet) fec_timeout = 0 # [ms], 0 to disable. If no new packets during timeout, emit one empty packet if FEC block is open fec_delay = 0 # [us], 0 to disable. Issue FEC packets with delay between them. [drone_video] fwmark = 20 # traffic shaper label peer = 'listen://0.0.0.0:5602' # listen for video stream (drone) [drone_mavlink] fwmark = 10 # traffic shaper label peer = 'listen://0.0.0.0:14560' # incoming connection #peer = 'connect://127.0.0.1:14560' # outgoing connection [drone_tunnel] fwmark = 30 # traffic shaper label ifname = 'drone-wfb' ifaddr = '10.5.0.2/24' default_route = False [drone_bind_tunnel] fwmark = 30 # traffic shaper label ifname = 'drone-bind' ifaddr = '10.5.99.2/24' default_route = False [gs_video] fwmark = 20 # traffic shaper label peer = 'connect://127.0.0.1:5600' # outgoing connection for video sink (GS) [gs_mavlink] fwmark = 10 # traffic shaper label peer = 'connect://127.0.0.1:14550' # outgoing connection # peer = 'listen://0.0.0.0:14550' # incoming connection # osd = 'connect://127.0.0.1:14551' # mirroring mavlink packets to OSD [gs_tunnel] fwmark = 30 # traffic shaper label ifname = 'gs-wfb' ifaddr = '10.5.0.1/24' default_route = False [gs_bind_tunnel] fwmark = 30 # traffic shaper label ifname = 'gs-bind' ifaddr = '10.5.99.1/24' default_route = False