qwf_wifi_StartAccessPoint()

Updated: April 19, 2023

Start acting as an access point

Synopsis:

#include <qwf/qwf_wifi.h>
qwf_wifi_Results_e qwf_wifi_StartAccessPoint(qwf_Context_t *pCtx,
                                             qwf_wifi_Ssid_t *pSsid,
                                             qwf_wifi_SecurityProtocol_e authProtocol,
                                             uint16_t maxClients,
                                             qwf_wifi_Standard_e standard,
                                             qwf_wifi_FrequencyBand_e band,
                                             bool privacy,
                                             uint16_t dhcpLeaseTime,
                                             char *pGatewayIpAddress,
                                             char *pGatewaySubnet)

Arguments:

pCtx
A pointer to the QWF service context
pSsid
A pointer to a qwf_wifi_Ssid_t structure containing the SSID of the access point
authProtocol
A qwf_wifi_SecurityProtocol_e constant specifying the authentication protocol to use
maxClients
The maximum number of clients allowed on the access point. Currently, 8 is the upper limit.
standard
A qwf_wifi_Standard_e constant specifying the Wi-Fi standard to use
band
A qwf_wifi_FrequencyBand_e constant specifying the frequency band to use
privacy
Whether clients will be prevented from seeing other connected clients
dhcpLeaseTime
The DHCP Lease Time, in minutes, which defines how long before a DHCP-assigned IP address needs to be renewed
pGatewayIpAddress
A string containing the DHCP gateway's IP Address
pGatewaySubnet
A string containing the DHCP gateway's subnet mask

Library:

qwf_interface

Description:

This function makes the Wi-Fi Manager service start acting as an access point so that remote clients can connect to the device. The service creates a persistent profile to be used as an access point, then enters into Access Point (AP) mode using this configured profile.

Before calling this function, the client application must set all parameters needed for authentication, by calling the following functions as needed:

You can further configure the access point by specifying optional hostapd parameters with qwf_wifi_SetHostapdOptions().

Returns:

WIFI_OK Successful result

WIFI_ERR_EXISTS The access point is already started

WIFI_ERR_INACTIVE The QWF Wi-Fi Manager service is inactive or not ready

WIFI_ERR_INT The QWF Wi-Fi Manager service couldn't issue the request

WIFI_ERR_PARAM A pointer argument is NULL, authProtocol is out of the qwf_wifi_SecurityProtocol_e range, or the QWF Wi-Fi Manager context can't be retrieved