Updated: April 19, 2023

Query the hostapd daemon from a command-line client


hostapd_cli-version [-a action_file] [-Bhv] [-G ping_interval] 
    [-i ifname] [-P PID_file] [-p path] [-s dir_path]
    [command ...]

Runs on:

QNX Neutrino


-a action_file
(QNX Neutrino 6.6 or later) Run in daemon mode executing the specified action file based on an event from hostapd.
(QNX Neutrino 6.6 or later) Run as a daemon in the background.
-G ping_interval
(QNX Neutrino 6.6 or later) The ping interval, in seconds. The default is 5 seconds.
Show the help information.
-i ifname
The interface on which to listen. The default is the first interface found in the socket path.
-P PID_file
(QNX Neutrino 7.0 or later) Specify the location of the PID file.
-p path
The path to find control sockets. The default path is /var/run/hostapd.
-s dir_path
(QNX Neutrino 7.0 or later) The directory path to open control sockets. The default is /var/run/hostapd.
Show the version information.


Add/Delete/Show/Clear the accept MAC ACL.
Report the VSE in the Association/Reassociation request.
Send a BSS Transition Management Request.
chan_switch cs_count freq [sec_channel_offset=offset] [center_freq1=cfreq1] [center_freq2=cfreq2] [bandwidth=MHz] [blocktx] [ht|vht]
Initiate a channel switch announcement, to inform the connected station that the AP is changing the channel. The first mandatory parameter tells the AP to switch the channel after cs_count beacon frames; the second parameter indicates the frequency of the new channel (in MHz). The remaining parameters are optional and specify the following information:
  • the offset to use in calculating the center frequency for the secure channel
  • the center frequency of the entire channel (for mono) or the first sub-channel (for stereo)
  • the center frequency of the second sub-channel (for stereo)
  • the bandwidth of the new channel (in MHz)
  • whether to prevent the AP from transmitting packets to the internet
  • whether to enable HT or VHT mode
Add/Delete/Show/Clear the deny MAC ACL.
Disable hostapd on the current interface.
Send a Disassociation Imminent notification.
Show the supported driver flags.
Enable hostapd on the current interface.
Drop all ERP keys.
Send an ESS Dissassociation Imminent notification.
get name
Get the value of a runtime variable.
Show the current configuration.
Show the usage information.
hs20_deauth_req addr code reauth_delay [url]
Send a WNM-Notification Imminent Deauthentication notification. This command has three mandatory parameters:
  • the station's address
  • the code to transmit, either 0 or 1
  • the reauthentication delay, in seconds

It also has one optional parameter, for specifying the URL of the deauthenticating server.

hs20_wnm_notif addr url
Send a WNM-Notification Subscription Remediation Request. This command takes two parameters: the station's address and the URL of the Subscription Remediation server.
interface [ifname]
Show all interfaces or select the interface indicated by ifname.
level debug_level
Change the debug level.
Show the full hostapd_cli license.
log_level [level]
Show/change the logging verbosity level.
Show PMKSA cache entries.
Flush the PMKSA cache.
poll_sta address
Poll the station with the indicated address to check connectivity, using a QoS null frame.
Exit hostapd_cli.
raw parameters...
Send an unprocessed command, which can take parameters.
Reload the configuration for the current interface.
Reload the WPA PSK file only.
remove_neighbor address ssid=SSID
Remove the specified AP from the neighbor database.
req_beacon address [req_mode=mode] measurement_req_hexdump
Send a Beacon Report request, represented as a hexadecimal dump, to the station with the specified address and optionally, in the specified request mode.
req_lci address
Send an LCI request to the specified station.
Send an FTM range request.
send_qos_map_conf address
Send a QoS Map Configure frame to the specified address.
set name value
Set the value of a runtime variable.
set_neighbor address ssid=SSID nr=arg [lci=arg] [civic=arg] [stat]
Add an AP to the neighbor database. The mandatory parameters specify the AP's address, SSID, and neighbor data. There are optional parameters for sending LCI data and/or civic data, and for marking the neighbor entry as stationary.
set_qos_map_set arg1,arg2,...
Set QoS mapset elements.
Update Beacon frame contents.
vendor vendor_ID sub_command_ID [hex_data]
Send a vendor-specific driver command represented as hexadecimal data.
wps_ap_pin command [parameters...]
Enable or disable the AP PIN. For information about the specific commands you can send, see:
Cancel the pending WPS operation.
wps_config SSID auth encr key
Configure the AP to use the specified SSID, authentication protocol, encryption algorithm, and key.
Show the current WPS status.
Indicate a button was pushed to initiate PBC.


Use the hostapd_cli utility to obtain the current authentication status of the hostapd daemon and get MIB variables such as dot1x, dot11, and radius.

The number in the hostapd_cli utility name indicates the WPA version it supports. For example, hostapd_cli-2.9 supports version 2.9.

The utility supports two modes: interactive and command line. Both modes share the same command set. To start interactive mode, run the hostapd_cli utility without any parameters on the command line and then enter hostapd_cli commands at the prompt. In command-line mode, enter hostapd_cli commands as command-line arguments.