qwf_wifi_UpdateSavedNetwork()
Update a Saved Network profile
Synopsis:
#include <qwf/qwf_wifi.h>qwf_wifi_Results_e qwf_wifi_UpdateSavedNetwork(qwf_Context_t *pCtx,
uint16_t networkId,
qwf_wifi_SecurityProtocol_e newProtocol,
qwf_wifi_FrequencyBand_e newBand,
uint16_t newPriority,
const char *const pNewBssid,
const qwf_wifi_Ssid_t *const pNewSsid)Arguments:
- pCtx
- A pointer to the QWF service context
- networkId
- The network profile ID given by qwf_wifi_CreateSavedNetwork()
- newProtocol
- A qwf_wifi_SecurityProtocol_e constant specifying the new authentication protocol to use
- newBand
- A qwf_wifi_FrequencyBand_e constant specifying the new frequency band used by the access point
- newPriority
- The network selection priority for the profile within an ESS with the same SSID. A lower value means a higher priority, with 1 being the highest and 0 meaning the network selection will be based only on the strongest signal of the available access points and not the priority.
- pNewBssid
- An immutable string containing the new BSSID (MAC address) to connect to when an access point has multiple hardware addresses within an ESS with the same SSID. A NULL value means that the profile will connect to the access point that has the strongest signal.
- pNewSsid
- A pointer to a qwf_wifi_Ssid_t structure containing the new SSID. This can be NULL if you're not changing the SSID.
Library:
qwf_interfaceDescription:
This function updates a Saved Network profile. The updated profile settings are persisted over power cycles.
- 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
If the client wants to use the optional background scanning feature when the profile is connected to an access point, they must also call qwf_wifi_SetBgScanMode() to set the background scan parameters before updating the profile.
All input variables must be set, even for unchanged values, except for pNewSsid, which can be NULL if you're not changing the SSID. Calling qwf_wifi_UpdateSavedNetwork() doesn't affect the enabled
setting of the Saved Network.
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 A pointer argument is NULL, or the QWF Wi-Fi Manager context can't be retrieved
