WifiConfig_PersistConfig Function

Header: #include <applibs/wificonfig.h>

Writes the current network configuration to nonvolatile storage so that it persists over a device reboot. This function doesn't reload the current configuration; call WifiConfig_ReloadConfig to reload.

static int WifiConfig_PersistConfig(void);

Errors

Returns -1 if an error is encountered and sets errno to the error value.

  • EACCES: the application manifest doesn't include the WifiConfig capability.

  • EAGAIN: the Wi-Fi device isn't ready.

  • ENETDOWN: the Wi-Fi network interface is unavailable.

  • ENOSPC: there are too many Wi-Fi networks for the configuration to persist; remove one and try again.

Any other errno may also be specified; such errors aren't deterministic and the same behavior might not be retained through system updates.

Return value

Returns 0 for success, or -1 for failure, in which case errno is set to the error value.

Application manifest requirements

The application manifest must include the WifiConfig capability.