kernel: move mv88e6xxx fix to generic backports
[openwrt/openwrt.git] / package / network / services / hostapd / README.md
1 # UBUS methods - hostapd
2
3 ## bss_mgmt_enable
4 Enable 802.11k/v features.
5
6 ### arguments
7 | Name | Type | Required | Description |
8 |---|---|---|---|
9 | neighbor_report | bool | no | enable 802.11k neighbor reports |
10 | beacon_report | bool | no | enable 802.11k beacon reports |
11 | link_measurements | bool | no | enable 802.11k link measurements |
12 | bss_transition | bool | no | enable 802.11v BSS transition support |
13
14 ### example
15 `ubus call hostapd.wl5-fb bss_mgmt_enable '{ "neighbor_report": true, "beacon_report": true, "link_measurements": true, "bss_transition": true
16 }'`
17
18
19 ## bss_transition_request
20 Initiate an 802.11v transition request.
21
22 ### arguments
23 | Name | Type | Required | Description |
24 |---|---|---|---|
25 | addr | string | yes | client MAC address |
26 | disassociation_imminent | bool | no | set Disassociation Imminent bit |
27 | disassociation_timer | int32 | no | disassociate client if it doesn't roam after this time |
28 | validity_period | int32 | no | validity of the BSS Transition Candiate List |
29 | neighbors | array | no | BSS Transition Candidate List |
30 | abridged | bool | no | prefer APs in the BSS Transition Candidate List |
31 | dialog_token | int32 | no | identifier for the request/report transaction |
32 | mbo_reason | int32 | no | MBO Transition Reason Code Attribute |
33 | cell_pref | int32 | no | MBO Cellular Data Connection Preference Attribute |
34 | reassoc_delay | int32 | no | MBO Re-association retry delay |
35
36 ### example
37 `ubus call hostapd.wl5-fb bss_transition_request '{ "addr": "68:2F:67:8B:98:ED", "disassociation_imminent": false, "disassociation_timer": 0, "validity_period": 30, "neighbors": ["b6a7b9cbeebabf5900008064090603026a00"], "abridged": 1 }'`
38
39
40 ## config_add
41 Dynamically load a BSS configuration from a file. This is used by netifd's mac80211 support script to configure BSSes on multiple PHYs in a single hostapd instance.
42
43 ### arguments
44 | Name | Type | Required | Description |
45 |---|---|---|---|
46 | iface | string | yes | WiFi interface name |
47 | config | string | yes | path to hostapd config file |
48
49
50 ## config_remove
51 Dynamically remove a BSS configuration.
52
53 ### arguments
54 | Name | Type | Required | Description |
55 |---|---|---|---|
56 | iface | string | yes | WiFi interface name |
57
58
59 ## del_client
60 Kick a client off the network.
61
62 ### arguments
63 | Name | Type | Required | Description |
64 |---|---|---|---|
65 | addr | string | yes | client MAC address |
66 | reason | int32 | no | 802.11 reason code |
67 | deauth | bool | no | deauthenticates client instead of disassociating |
68 | ban_time | int32 | no | ban client for N milliseconds |
69
70 ### example
71 `ubus call hostapd.wl5-fb del_client '{ "addr": "68:2f:67:8b:98:ed", "reason": 5, "deauth": true, "ban_time": 10000 }'`
72
73
74 ## get_clients
75 Show associated clients.
76
77 ### example
78 `ubus call hostapd.wl5-fb get_clients`
79
80 ### output
81 ```json
82 {
83 "freq": 5260,
84 "clients": {
85 "68:2f:67:8b:98:ed": {
86 "auth": true,
87 "assoc": true,
88 "authorized": true,
89 "preauth": false,
90 "wds": false,
91 "wmm": true,
92 "ht": true,
93 "vht": true,
94 "he": false,
95 "wps": false,
96 "mfp": true,
97 "rrm": [
98 0,
99 0,
100 0,
101 0,
102 0
103 ],
104 "extended_capabilities": [
105 0,
106 0,
107 0,
108 0,
109 0,
110 0,
111 0,
112 64
113 ],
114 "aid": 3,
115 "signature": "wifi4|probe:0,1,45,127,107,191,221(0017f2,10),221(001018,2),htcap:006f,htagg:1b,htmcs:0000ffff,vhtcap:0f825832,vhtrxmcs:0000ffea,vhttxmcs:0000ffea,extcap:0000008000000040|assoc:0,1,33,36,48,45,127,191,221(0017f2,10),221(001018,2),221(0050f2,2),htcap:006f,htagg:1b,htmcs:0000ffff,vhtcap:0f825832,vhtrxmcs:0000ffea,vhttxmcs:0000ffea,txpow:14f9,extcap:0000000000000040",
116 "bytes": {
117 "rx": 1933667,
118 "tx": 746805
119 },
120 "airtime": {
121 "rx": 208863,
122 "tx": 9037883
123 },
124 "packets": {
125 "rx": 3587,
126 "tx": 2185
127 },
128 "rate": {
129 "rx": 866700,
130 "tx": 866700
131 },
132 "signal": -50,
133 "capabilities": {
134 "vht": {
135 "su_beamformee": true,
136 "mu_beamformee": false,
137 "mcs_map": {
138 "rx": {
139 "1ss": 9,
140 "2ss": 9,
141 "3ss": 9,
142 "4ss": -1,
143 "5ss": -1,
144 "6ss": -1,
145 "7ss": -1,
146 "8ss": -1
147 },
148 "tx": {
149 "1ss": 9,
150 "2ss": 9,
151 "3ss": 9,
152 "4ss": -1,
153 "5ss": -1,
154 "6ss": -1,
155 "7ss": -1,
156 "8ss": -1
157 }
158 }
159 }
160 }
161 }
162 }
163 }
164 ```
165
166
167 ## get_features
168 Show HT/VHT support.
169
170 ### example
171 `ubus call hostapd.wl5-fb get_features`
172
173 ### output
174 ```json
175 {
176 "ht_supported": true,
177 "vht_supported": true
178 }
179 ```
180
181
182 ## get_status
183 Get BSS status.
184
185 ### example
186 `ubus call hostapd.wl5-fb get_status`
187
188 ### output
189 ```json
190 {
191 "status": "ENABLED",
192 "bssid": "b6:a7:b9:cb:ee:bc",
193 "ssid": "fb",
194 "freq": 5260,
195 "channel": 52,
196 "op_class": 128,
197 "beacon_interval": 100,
198 "phy": "wl5-lan",
199 "rrm": {
200 "neighbor_report_tx": 0
201 },
202 "wnm": {
203 "bss_transition_query_rx": 0,
204 "bss_transition_request_tx": 0,
205 "bss_transition_response_rx": 0
206 },
207 "airtime": {
208 "time": 259561738,
209 "time_busy": 2844249,
210 "utilization": 0
211 },
212 "dfs": {
213 "cac_seconds": 60,
214 "cac_active": false,
215 "cac_seconds_left": 0
216 }
217 }
218 ```
219
220
221 ## link_measurement_req
222 Initiate an 802.11k Link Measurement Request.
223
224 ### arguments
225 | Name | Type | Required | Description |
226 |---|---|---|---|
227 | addr | string | yes | client MAC address |
228 | tx-power-used | int32 | no | transmit power used to transmit the Link Measurement Request frame |
229 | tx-power-max | int32 | no | upper limit of transmit power to be used by the client |
230
231
232 ## list_bans
233 List banned clients.
234
235 ### example
236 `ubus call hostapd.wl5-fb list_bans`
237
238 ### output
239 ```json
240 {
241 "clients": [
242 "68:2f:67:8b:98:ed"
243 ]
244 }
245 ```
246
247
248 ## notify_response
249 When enabled, hostapd will send a ubus notification and wait for a response before responding to various requests. This is used by e.g. usteer to make it possible to ignore probe requests.
250
251 :warning: enabling this will cause hostapd to stop responding to probe requests unless a ubus subscriber responds to the ubus notifications.
252
253 ### arguments
254 | Name | Type | Required | Description |
255 |---|---|---|---|
256 | notify_response | int32 | yes | disable (0) or enable (!0) |
257
258 ### example
259 `ubus call hostapd.wl5-fb notify_response '{ "notify_response": 1 }'`
260
261 ## reload
262 Reload BSS configuration.
263
264 :warning: this can cause problems for certain configurations:
265
266 ```
267 Mon May 16 16:09:08 2022 daemon.warn hostapd: Failed to check if DFS is required; ret=-1
268 Mon May 16 16:09:08 2022 daemon.warn hostapd: Failed to check if DFS is required; ret=-1
269 Mon May 16 16:09:08 2022 daemon.err hostapd: Wrong coupling between HT and VHT/HE channel setting
270 ```
271
272 ### example
273 `ubus call hostapd.wl5-fb reload`
274
275
276 ## rrm_beacon_req
277 Send a Beacon Measurement Request to a client.
278
279 ### arguments
280 | Name | Type | Required | Description |
281 |---|---|---|---|
282 | addr | string | yes | client MAC address |
283 | op_class | int32 | yes | the Regulatory Class for which this Measurement Request applies |
284 | channel | int32 | yes | channel to measure |
285 | duration | int32 | yes | compile Beacon Measurement Report after N TU |
286 | mode | int32 | yes | mode to be used for measurement (0: passive, 1: active, 2: beacon table) |
287 | bssid | string | no | filter BSSes in Beacon Measurement Report by BSSID |
288 | ssid | string | no | filter BSSes in Beacon Measurement Report by SSID|
289
290
291 ## rrm_nr_get_own
292 Show Neighbor Report Element for this BSS.
293
294 ### example
295 `ubus call hostapd.wl5-fb rrm_nr_get_own`
296
297 ### output
298 ```json
299 {
300 "value": [
301 "b6:a7:b9:cb:ee:bc",
302 "fb",
303 "b6a7b9cbeebcaf5900008095090603029b00"
304 ]
305 }
306 ```
307
308
309 ## rrm_nr_list
310 Show Neighbor Report Elements for other BSSes in this ESS.
311
312 ### example
313 `ubus call hostapd.wl5-fb rrm_nr_list`
314
315 ### output
316 ```json
317 {
318 "list": [
319 [
320 "b6:a7:b9:cb:ee:ba",
321 "fb",
322 "b6a7b9cbeebabf5900008064090603026a00"
323 ]
324 ]
325 }
326 ```
327
328 ## rrm_nr_set
329 Set the Neighbor Report Elements. An element for the node on which this command is executed will always be added.
330
331 ### arguments
332 | Name | Type | Required | Description |
333 |---|---|---|---|
334 | list | array | yes | array of Neighbor Report Elements in the format of the rrm_nr_list output |
335
336 ### example
337 `ubus call hostapd.wl5-fb rrm_nr_set '{ "list": [ [ "b6:a7:b9:cb:ee:ba", "fb", "b6a7b9cbeebabf5900008064090603026a00" ] ] }'`
338
339
340 ## set_vendor_elements
341 Configure Vendor-specific Information Elements for BSS.
342
343 ### arguments
344 | Name | Type | Required | Description |
345 |---|---|---|---|
346 | vendor_elements | string | yes | Vendor-specific Information Elements as hex string |
347
348 ### example
349 `ubus call hostapd.wl5-fb set_vendor_elements '{ "vendor_elements": "dd054857dd6662" }'`
350
351
352 ## switch_chan
353 Initiate a channel switch.
354
355 :warning: trying to switch to the channel that is currently in use will fail: `Command failed: Operation not supported`
356
357 ### arguments
358 | Name | Type | Required | Description |
359 |---|---|---|---|
360 | freq | int32 | yes | frequency in MHz to switch to |
361 | bcn_count | int32 | no | count in Beacon frames (TBTT) to perform the switch |
362 | center_freq1 | int32 | no | segment 0 center frequency in MHz (valid for HT and VHT) |
363 | center_freq2 | int32 | no | segment 1 center frequency in MHz (valid only for 80 MHz channel width and an 80+80 channel) |
364 | bandwidth | int32 | no | channel width to use |
365 | sec_channel_offset| int32 | no | secondary channel offset for HT40 (0 = disabled, 1 = HT40+, -1 = HT40-) |
366 | ht | bool | no | enable 802.11n |
367 | vht | bool | no | enable 802.11ac |
368 | he | bool | no | enable 802.11ax |
369 | block_tx | bool | no | block transmission during CSA period |
370 | csa_force | bool | no | restart the interface in case the CSA fails |
371
372 ## example
373 `ubus call hostapd.wl5-fb switch_chan '{ "freq": 5180, "bcn_count": 10, "center_freq1": 5210, "bandwidth": 80, "he": 1, "block_tx": 1, "csa_force": 0 }'`
374
375
376 ## update_airtime
377 Set dynamic airtime weight for client.
378
379 ### arguments
380 | Name | Type | Required | Description |
381 |---|---|---|---|
382 | sta | string | yes | client MAC address |
383 | weight | int32 | yes | airtime weight |
384
385
386 ## update_beacon
387 Force beacon frame content to be updated and to start beaconing on an interface that uses start_disabled=1.
388
389 ### example
390 `ubus call hostapd.wl5-fb update_beacon`
391
392
393 ## wps_status
394 Get WPS status for BSS.
395
396 ### example
397 `ubus call hostapd.wl5-fb wps_status`
398
399 ### output
400 ```json
401 {
402 "pbc_status": "Disabled",
403 "last_wps_result": "None"
404 }
405 ```
406
407
408 ## wps_cancel
409 Cancel WPS Push Button Configuration.
410
411 ### example
412 `ubus call hostapd.wl5-fb wps_cancel`
413
414
415 ## wps_start
416 Start WPS Push Button Configuration.
417
418 ### example
419 `ubus call hostapd.wl5-fb wps_start`