Updated: October 28, 2024 |
Set a passphrase before creating or updating a Saved Network profile
#include <qwf/qwf_wifi.h>
qwf_wifi_Results_e qwf_wifi_SetPassphrase(qwf_Context_t *pCtx, char *pPassphrase)
This function sets a passphrase to be used for WPA-PSK or WPA-PSK2 authentication. The client application must call this function to temporarily save the passphrase before calling qwf_wifi_CreateSavedNetwork() or qwf_wifi_UpdateSavedNetwork().
After the Saved Network profile is created or updated, the temporary passphrase is reset to an empty string. At this point, the passphrase is part of the persisted profile, and is used when connecting to the associated access point.
The passphrase must be between 8 and 64 characters long. If it's too long, it gets truncated; if it's too short, the function fails.
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 A pointer argument is NULL or the QWF Wi-Fi Manager context can't be retrieved