qwf_wifi_GetSavedNetworks()

Updated: October 26, 2022

Query the current Saved Network profiles

Synopsis:

#include <qwf/qwf_wifi.h>
qwf_wifi_Results_e qwf_wifi_GetSavedNetworks(qwf_Context_t *pCtx,
                                             uint16_t *const pNumEntries,
                                             qwf_wifi_SavedNetwork_t *const pNetworks)

Arguments:

pCtx
A pointer to the QWF service context
pNumEntries
On input, a pointer to memory specifying the number of profile entries requested. On output, this memory stores the number of entries written into pNetworks. This new value represents the number of stored network profiles and may be less than what was requested.
pNetworks
A pointer to memory for storing an array of qwf_wifi_SavedNetwork_t objects, which will contain data for individual profiles

Library:

qwf_interface

Description:

This function queries the Wi-Fi Manager service for the current Saved Network profiles. The function writes an array of qwf_wifi_SavedNetwork_t objects into the space pointed to by pNetworks; these objects store the profile data.

The client must allocate enough array memory to store the number of entries requested by pNumEntries. The function updates this variable so it contains the actual number of array entries written.

The network IDs written into the array are to be used with all other functions in this interface (except when creating a network profile). These IDs remain valid even if other Saved Networks are added or deleted. However, an application should call this function after the device's power is cycled because the network IDs may have changed based on the profile additions and deletions done in the last power cycle.

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