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 |
34 `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 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.
41 | Name | Type | Required | Description |
43 | iface | string | yes | WiFi interface name |
44 | config | string | yes | path to hostapd config file |
48 Dynamically remove a BSS configuration.
51 | Name | Type | Required | Description |
53 | iface | string | yes | WiFi interface name |
57 Kick a client off the network.
60 | Name | Type | Required | Description |
62 | addr | string | yes | client MAC address |
63 | reason | int32 | no | 802.11 reason code |
64 | deauth | bool | no | deauthenticates client instead of disassociating |
65 | ban_time | int32 | no | ban client for N milliseconds |
68 `ubus call hostapd.wl5-fb del_client '{ "addr": "68:2f:67:8b:98:ed", "reason": 5, "deauth": true, "ban_time": 10000 }'`
72 Show associated clients.
75 `ubus call hostapd.wl5-fb get_clients`
82 "68:2f:67:8b:98:ed": {
101 "extended_capabilities": [
112 "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",
132 "su_beamformee": true,
133 "mu_beamformee": false,
168 `ubus call hostapd.wl5-fb get_features`
173 "ht_supported": true,
174 "vht_supported": true
183 `ubus call hostapd.wl5-fb get_status`
189 "bssid": "b6:a7:b9:cb:ee:bc",
194 "beacon_interval": 100,
197 "neighbor_report_tx": 0
200 "bss_transition_query_rx": 0,
201 "bss_transition_request_tx": 0,
202 "bss_transition_response_rx": 0
206 "time_busy": 2844249,
212 "cac_seconds_left": 0
218 ## link_measurement_req
219 Initiate an 802.11k Link Measurement Request.
222 | Name | Type | Required | Description |
224 | addr | string | yes | client MAC address |
225 | tx-power-used | int32 | no | transmit power used to transmit the Link Measurement Request frame |
226 | tx-power-max | int32 | no | upper limit of transmit power to be used by the client |
233 `ubus call hostapd.wl5-fb list_bans`
246 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.
248 :warning: enabling this will cause hostapd to stop responding to probe requests unless a ubus subscriber responds to the ubus notifications.
251 | Name | Type | Required | Description |
253 | notify_response | int32 | yes | disable (0) or enable (!0) |
256 `ubus call hostapd.wl5-fb notify_response '{ "notify_response": 1 }'`
259 Reload BSS configuration.
261 :warning: this can cause problems for certain configurations:
264 Mon May 16 16:09:08 2022 daemon.warn hostapd: Failed to check if DFS is required; ret=-1
265 Mon May 16 16:09:08 2022 daemon.warn hostapd: Failed to check if DFS is required; ret=-1
266 Mon May 16 16:09:08 2022 daemon.err hostapd: Wrong coupling between HT and VHT/HE channel setting
270 `ubus call hostapd.wl5-fb reload`
274 Send a Beacon Measurement Request to a client.
277 | Name | Type | Required | Description |
279 | addr | string | yes | client MAC address |
280 | op_class | int32 | yes | the Regulatory Class for which this Measurement Request applies |
281 | channel | int32 | yes | channel to measure |
282 | duration | int32 | yes | compile Beacon Measurement Report after N TU |
283 | mode | int32 | yes | mode to be used for measurement (0: passive, 1: active, 2: beacon table) |
284 | bssid | string | no | filter BSSes in Beacon Measurement Report by BSSID |
285 | ssid | string | no | filter BSSes in Beacon Measurement Report by SSID|
289 Show Neighbor Report Element for this BSS.
292 `ubus call hostapd.wl5-fb rrm_nr_get_own`
300 "b6a7b9cbeebcaf5900008095090603029b00"
307 Show Neighbor Report Elements for other BSSes in this ESS.
310 `ubus call hostapd.wl5-fb rrm_nr_list`
319 "b6a7b9cbeebabf5900008064090603026a00"
326 Set the Neighbor Report Elements. An element for the node on which this command is executed will always be added.
329 | Name | Type | Required | Description |
331 | list | array | yes | array of Neighbor Report Elements in the format of the rrm_nr_list output |
334 `ubus call hostapd.wl5-fb rrm_nr_set '{ "list": [ [ "b6:a7:b9:cb:ee:ba", "fb", "b6a7b9cbeebabf5900008064090603026a00" ] ] }'`
337 ## set_vendor_elements
338 Configure Vendor-specific Information Elements for BSS.
341 | Name | Type | Required | Description |
343 | vendor_elements | string | yes | Vendor-specific Information Elements as hex string |
346 `ubus call hostapd.wl5-fb set_vendor_elements '{ "vendor_elements": "dd054857dd6662" }'`
350 Initiate a channel switch.
352 :warning: trying to switch to the channel that is currently in use will fail: `Command failed: Operation not supported`
355 | Name | Type | Required | Description |
357 | freq | int32 | yes | frequency in MHz to switch to |
358 | bcn_count | int32 | no | count in Beacon frames (TBTT) to perform the switch |
359 | center_freq1 | int32 | no | segment 0 center frequency in MHz (valid for HT and VHT) |
360 | center_freq2 | int32 | no | segment 1 center frequency in MHz (valid only for 80 MHz channel width and an 80+80 channel) |
361 | bandwidth | int32 | no | channel width to use |
362 | sec_channel_offset| int32 | no | secondary channel offset for HT40 (0 = disabled, 1 = HT40+, -1 = HT40-) |
363 | ht | bool | no | enable 802.11n |
364 | vht | bool | no | enable 802.11ac |
365 | he | bool | no | enable 802.11ax |
366 | block_tx | bool | no | block transmission during CSA period |
367 | csa_force | bool | no | restart the interface in case the CSA fails |
370 `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 Set dynamic airtime weight for client.
377 | Name | Type | Required | Description |
379 | sta | string | yes | client MAC address |
380 | weight | int32 | yes | airtime weight |
384 Force beacon frame content to be updated and to start beaconing on an interface that uses start_disabled=1.
387 `ubus call hostapd.wl5-fb update_beacon`
391 Get WPS status for BSS.
394 `ubus call hostapd.wl5-fb wps_status`
399 "pbc_status": "Disabled",
400 "last_wps_result": "None"
406 Cancel WPS Push Button Configuration.
409 `ubus call hostapd.wl5-fb wps_cancel`
413 Start WPS Push Button Configuration.
416 `ubus call hostapd.wl5-fb wps_start`