qwf_wifi_ConnectToAccessPoint()

Connect to the specified Wi-Fi access point

Synopsis:

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

Arguments:

pCtx
A pointer to the QWF service context created by qwf_Init()
scanResultId
The ID of an entry in the most recent scan results

Library:

qwf_interface

Description:

This function requests the Wi-Fi Manager service to connect to a recently scanned Wi-Fi access point. After getting the latest scan results through the qwf_wifi_GetScanResults() function, the client can create a Saved Network profile based on a specific results entry by providing that 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:

Returns:

WIFI_OK Successful result

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

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