Erases the network settings and credentials held by a device
A value specifying the clearing action to be performed (default = all, from release 33)
From impOS™ release 33, you may choose to pass one of the following action constants to control the method’s behavior:
|CONFIG_WIFI||Clear any saved WiFi configuration information but retain enrollment data. This will also clear WiFi hints set with imp.net.setwifihints()|
|CONFIG_STATIC_NETWORK||Clear any saved static network settings (see imp.setstaticnetworkconfiguration())|
|CONFIG_PROXY||Clear any saved proxy server settings (see imp.setproxy())|
|CONFIG_ALL||Clear all settings (default)|
If no action constant is passed, all network settings, including WiFi network access credentials and device-enrollment data, will be cleared.
This method does not affect the current connection, only future connections. If a device is connected when this method is called, the device will not immediately and automatically disconnect, even if the stored WiFi network is cleared. It’s possible that the device may stay connected for some time. However, as soon as it enters deep sleep or is power cycled, the connection will be cut. You may also disconnect manually by calling server.disconnect(), but you must subsequently re-connect manually when you require the device to go online.