Skip to main content

imp.setwificonfiguration(SSID, key)

Sets an imp’s saved WiFi network access data




Name Type Description
SSID String The name of the network you want the imp to connect to
key String The network pre-shared key or an empty string ("") if there is no encryption




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 For security reasons, the currently-configured password cannot be read.

Example Code

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.