Mistake on this page?
Report an issue in GitHub or email us
Functions
WHD Wi-Fi SoftAP API

Wi-Fi APIs to perform SoftAP related functionalities. More...

Functions

uint32_t whd_wifi_init_ap (whd_interface_t ifp, whd_ssid_t *ssid, whd_security_t auth_type, const uint8_t *security_key, uint8_t key_length, uint8_t channel)
 Initialises an infrastructure WiFi network (SoftAP) More...
 
uint32_t whd_wifi_start_ap (whd_interface_t ifp)
 Start the infrastructure WiFi network (SoftAP) using the parameter set by whd_wifi_init_ap() and optionaly by whd_wifi_manage_custom_ie() More...
 
uint32_t whd_wifi_stop_ap (whd_interface_t ifp)
 Stops an existing infrastructure WiFi network. More...
 
uint32_t whd_wifi_ap_get_max_assoc (whd_interface_t ifp, uint32_t *max_assoc)
 Get the maximum number of associations supported by AP interfaces. More...
 
uint32_t whd_wifi_get_associated_client_list (whd_interface_t ifp, void *client_list_buffer, uint16_t buffer_length)
 Gets the current number of active connections. More...
 
uint32_t whd_wifi_deauth_sta (whd_interface_t ifp, whd_mac_t *mac, whd_dot11_reason_code_t reason)
 Deauthenticates a STA which may or may not be associated to SoftAP. More...
 
uint32_t whd_wifi_get_ap_info (whd_interface_t ifp, whd_bss_info_t *ap_info, whd_security_t *security)
 Retrieves AP information. More...
 
uint32_t whd_wifi_ap_set_beacon_interval (whd_interface_t ifp, uint16_t interval)
 Set the beacon interval. More...
 
uint32_t whd_wifi_ap_set_dtim_interval (whd_interface_t ifp, uint16_t interval)
 Set the DTIM interval. More...
 

Detailed Description

Wi-Fi APIs to perform SoftAP related functionalities.

Function Documentation

uint32_t whd_wifi_ap_get_max_assoc ( whd_interface_t  ifp,
uint32_t *  max_assoc 
)

Get the maximum number of associations supported by AP interfaces.

Parameters
ifpPointer to handle instance of whd interface
max_assocThe maximum number of associations supported by Soft AP interfaces.
Returns
WHD_SUCCESS if the maximum number of associated clients was successfully read WHD_ERROR if the maximum number of associated clients was not successfully read
uint32_t whd_wifi_ap_set_beacon_interval ( whd_interface_t  ifp,
uint16_t  interval 
)

Set the beacon interval.

Note that the value needs to be set before ap_start in order to beacon interval to take effect.

Parameters
ifpPointer to handle instance of whd interface
intervalBeacon interval in time units (Default: 100 time units = 102.4 ms)
Returns
WHD_SUCCESS or Error code
uint32_t whd_wifi_ap_set_dtim_interval ( whd_interface_t  ifp,
uint16_t  interval 
)

Set the DTIM interval.

Note that the value needs to be set before ap_start in order to DTIM interval to take effect.

Parameters
ifpPointer to handle instance of whd interface
intervalDTIM interval, in unit of beacon interval
Returns
WHD_SUCCESS or Error code
uint32_t whd_wifi_deauth_sta ( whd_interface_t  ifp,
whd_mac_t mac,
whd_dot11_reason_code_t  reason 
)

Deauthenticates a STA which may or may not be associated to SoftAP.

Parameters
ifpPointer to handle instance of whd interface
macPointer to a variable containing the MAC address to which the deauthentication will be sent NULL mac address will deauthenticate all the associated STAs
reasonDeauthentication reason code
Returns
WHD_SUCCESS On successful deauthentication of the other STA WHD_ERROR If an error occurred
uint32_t whd_wifi_get_ap_info ( whd_interface_t  ifp,
whd_bss_info_t *  ap_info,
whd_security_t security 
)

Retrieves AP information.

Parameters
ifpPointer to handle instance of whd interface
ap_infoReturns a whd_bss_info_t structure containing AP details
securityAuthentication type
Returns
WHD_SUCCESS if the AP info was successfully retrieved Error code if the AP info was not successfully retrieved
uint32_t whd_wifi_get_associated_client_list ( whd_interface_t  ifp,
void *  client_list_buffer,
uint16_t  buffer_length 
)

Gets the current number of active connections.

Parameters
ifpPointer to handle instance of whd interface
client_list_bufferBuffer to store list of associated clients
buffer_lengthLength of client list buffer
Returns
WHD_SUCCESS if the active connections was successfully read WHD_ERROR if the active connections was not successfully read
uint32_t whd_wifi_init_ap ( whd_interface_t  ifp,
whd_ssid_t ssid,
whd_security_t  auth_type,
const uint8_t *  security_key,
uint8_t  key_length,
uint8_t  channel 
)

Initialises an infrastructure WiFi network (SoftAP)

Parameters
ifpPointer to handle instance of whd interface
ssidA null terminated string containing the SSID name of the network to join
auth_typeAuthentication type
security_keyA byte array containing the cleartext security key for the network
key_lengthThe length of the security_key in bytes.
channel802.11 channel number
Returns
WHD_SUCCESS if successfully initialises an AP Error code if an error occurred
uint32_t whd_wifi_start_ap ( whd_interface_t  ifp)

Start the infrastructure WiFi network (SoftAP) using the parameter set by whd_wifi_init_ap() and optionaly by whd_wifi_manage_custom_ie()

Returns
WHD_SUCCESS if successfully creates an AP Error code if an error occurred
uint32_t whd_wifi_stop_ap ( whd_interface_t  ifp)

Stops an existing infrastructure WiFi network.

Parameters
ifpPointer to handle instance of whd interface
Returns
WHD_SUCCESS if the AP is successfully stopped or if the AP has not yet been brought up Error code if an error occurred
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.