Sets an imp’s saved WiFi network access data
The name of the network you want the imp to connect to
The network password or an empty string (
This method updates the WiFi network settings information stored in an imp’s non-volatile memory. The new settings will be used for all subsequent connections attempted by the device, including those taking place after a cold boot. You only need to supply the network’s password; the encryption type (WEP, WPA2, etc.) is determined automatically upon connection and is cached to make future connection attempts faster. For an open network (ie. one with no encryption), pass an empty string (
"") for the password.
Settings applied using imp.setwificonfiguration() can be overwritten by a later BlinkUp™, and care should be taken reconfiguring devices in the field because there is no way to remotely recover a device with bad WiFi settings.
The currently-configured SSID can be read using imp.getssid(). For security reasons, the currently-configured password cannot be read.
This example shows one way to disconnect from the current network (set via BlinkUp), change an imp’s WiFi credentials and reconnect to the new, hard-coded network.