Updated: October 28, 2024 |
Start acting as an access point
#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)
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.
You can further configure the access point by specifying optional hostapd parameters with qwf_wifi_SetHostapdOptions().
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