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
- scanResultId
- The ID of an entry in the most recent scan results
Library:
qwf_interfaceDescription:
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.
- qwf_wifi_SetPassphrase(), for the WPA-PSK and WPA2-PSK authentication protocols
- qwf_wifi_SetWepKey(), for WEP authentication
- qwf_wifi_SetEnterpriseCredentials(), for WPA-EAP or WPA2-EAP authentication
Returns:
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
