1 # UBUS methods - hostapd
4 Enable 802.11k/v features.
7 | Name | Type | Required | Description |
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 |
15 `ubus call hostapd.wl5-fb bss_mgmt_enable '{ "neighbor_report": true, "beacon_report": true, "link_measurements": true, "bss_transition": true
19 ## bss_transition_request
20 Initiate an 802.11v transition request.
23 | Name | Type | Required | Description |
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 |
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 }'`
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.
44 | Name | Type | Required | Description |
46 | iface | string | yes | WiFi interface name |
47 | config | string | yes | path to hostapd config file |
51 Dynamically remove a BSS configuration.
54 | Name | Type | Required | Description |
56 | iface | string | yes | WiFi interface name |
60 Kick a client off the network.
63 | Name | Type | Required | Description |
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 |
71 `ubus call hostapd.wl5-fb del_client '{ "addr": "68:2f:67:8b:98:ed", "reason": 5, "deauth": true, "ban_time": 10000 }'`
75 Show associated clients.
78 `ubus call hostapd.wl5-fb get_clients`
85 "68:2f:67:8b:98:ed": {
104 "extended_capabilities": [
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",
135 "su_beamformee": true,
136 "mu_beamformee": false,
171 `ubus call hostapd.wl5-fb get_features`
176 "ht_supported": true,
177 "vht_supported": true
186 `ubus call hostapd.wl5-fb get_status`
192 "bssid": "b6:a7:b9:cb:ee:bc",
197 "beacon_interval": 100,
200 "neighbor_report_tx": 0
203 "bss_transition_query_rx": 0,
204 "bss_transition_request_tx": 0,
205 "bss_transition_response_rx": 0
209 "time_busy": 2844249,
215 "cac_seconds_left": 0
221 ## link_measurement_req
222 Initiate an 802.11k Link Measurement Request.
225 | Name | Type | Required | Description |
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 |
236 `ubus call hostapd.wl5-fb list_bans`
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.
251 :warning: enabling this will cause hostapd to stop responding to probe requests unless a ubus subscriber responds to the ubus notifications.
254 | Name | Type | Required | Description |
256 | notify_response | int32 | yes | disable (0) or enable (!0) |
259 `ubus call hostapd.wl5-fb notify_response '{ "notify_response": 1 }'`
262 Reload BSS configuration.
264 :warning: this can cause problems for certain configurations:
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
273 `ubus call hostapd.wl5-fb reload`
277 Send a Beacon Measurement Request to a client.
280 | Name | Type | Required | Description |
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|
292 Show Neighbor Report Element for this BSS.
295 `ubus call hostapd.wl5-fb rrm_nr_get_own`
303 "b6a7b9cbeebcaf5900008095090603029b00"
310 Show Neighbor Report Elements for other BSSes in this ESS.
313 `ubus call hostapd.wl5-fb rrm_nr_list`
322 "b6a7b9cbeebabf5900008064090603026a00"
329 Set the Neighbor Report Elements. An element for the node on which this command is executed will always be added.
332 | Name | Type | Required | Description |
334 | list | array | yes | array of Neighbor Report Elements in the format of the rrm_nr_list output |
337 `ubus call hostapd.wl5-fb rrm_nr_set '{ "list": [ [ "b6:a7:b9:cb:ee:ba", "fb", "b6a7b9cbeebabf5900008064090603026a00" ] ] }'`
340 ## set_vendor_elements
341 Configure Vendor-specific Information Elements for BSS.
344 | Name | Type | Required | Description |
346 | vendor_elements | string | yes | Vendor-specific Information Elements as hex string |
349 `ubus call hostapd.wl5-fb set_vendor_elements '{ "vendor_elements": "dd054857dd6662" }'`
353 Initiate a channel switch.
355 :warning: trying to switch to the channel that is currently in use will fail: `Command failed: Operation not supported`
358 | Name | Type | Required | Description |
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 |
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 }'`
377 Set dynamic airtime weight for client.
380 | Name | Type | Required | Description |
382 | sta | string | yes | client MAC address |
383 | weight | int32 | yes | airtime weight |
387 Force beacon frame content to be updated and to start beaconing on an interface that uses start_disabled=1.
390 `ubus call hostapd.wl5-fb update_beacon`
394 Get WPS status for BSS.
397 `ubus call hostapd.wl5-fb wps_status`
402 "pbc_status": "Disabled",
403 "last_wps_result": "None"
409 Cancel WPS Push Button Configuration.
412 `ubus call hostapd.wl5-fb wps_cancel`
416 Start WPS Push Button Configuration.
419 `ubus call hostapd.wl5-fb wps_start`