Updated: October 26, 2022

Connect to the specified Wi-Fi access point


#include <qwf/qwf_wifi.h>
qwf_wifi_Results_e qwf_wifi_ConnectToAccessPoint(qwf_Context_t *pCtx,
                                                 uint8_t scanResultId)


A pointer to the QWF service context
The ID of an entry in the most recent scan results




This function makes the Wi-Fi Manager service connect to a recently scanned Wi-Fi access point. After getting the latest scan results through qwf_wifi_GetScanResults(), the client can create a Saved Network profile from a specific results entry by providing the entry's ID to qwf_wifi_ConnectToAccessPoint().

This function creates the profile using the scan results data, which include the SSID and supported authentication protocols for the access point. Then, the function enables the profile and the service tries to connect to the access point.

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


WIFI_OK Successful result

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 or read the response

WIFI_ERR_PARAM pCtx is NULL, or scanResultId is 0 or is greater than the number of scan results entries