-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmaster.cfg
207 lines (148 loc) · 9.16 KB
/
master.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
[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
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
tx_sel_delta = 3 # hysteresis for antenna selection, [dB]
tx_rcv_buf_size = 524288 # UDP SO_RCVBUF. Set 0 to use net.core.rmem_default. Increase in case of non-cbr data stream
wifi_channel = 161 # 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}
wifi_region = '00' # Set CRDA region
wifi_txpower = None # Leave None to use default power settings from driver.
# 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
temp_measurement_interval = 10 # [s] (8812eu only) Internal RF path temp measurement.
temp_overheat_warning = 60 # [*C] (8812eu only) Overheat warning threshold.
## 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@<profile1>[:<profile2>] #
# 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" -- UDP port for CLI. Should be int or None to disable statistics completely.
## 3. "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
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']}
]
stats_port = 8003 # used by wfb-cli
link_domain = "default"
## Example of custom profiles not related to drones
[two_way_udp_example_side_a]
streams = [{'name': 'audio', 'stream_rx': 0x30, 'stream_tx': 0x30, 'service_type': 'udp_proxy',
'profiles': ['base', 'radio_base'], 'peer': 'connect://127.0.0.1:1235', 'keypair': 'drone.key'}]
stats_port = 8004
link_domain = "test_two_way_udp"
[two_way_udp_example_side_b]
streams = [{'name': 'audio', 'stream_rx': 0x30, 'stream_tx': 0x30, 'service_type': 'udp_proxy',
'profiles': ['base', 'radio_base'], 'peer': 'listen://127.0.0.1:1234', 'keypair': 'gs.key'}]
stats_port = 8005
link_domain = "test_two_way_udp"
###########################################################################################################################
# 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
[drone_base]
keypair = 'drone.key'
[gs_base]
keypair = 'gs.key'
[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
[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
peer = None
[mavlink]
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
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
[drone_video]
peer = 'listen://0.0.0.0:5602' # listen for video stream (drone)
[drone_mavlink]
peer = 'listen://0.0.0.0:14560' # incoming connection
#peer = 'connect://127.0.0.1:14560' # outgoing connection
[drone_tunnel]
ifname = 'drone-wfb'
ifaddr = '10.5.0.2/24'
default_route = False
[gs_video]
peer = 'connect://127.0.0.1:5600' # outgoing connection for video sink (GS)
[gs_mavlink]
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]
ifname = 'gs-wfb'
ifaddr = '10.5.0.1/24'
default_route = False