Multiple Wi-Fi networks, default to blinkup


I want to have a “default” backup ssid and pw hard coded in device, but also utilize the blink up data. So you blink up, normal operation, then on Wi-Fi loss goto backup credentials. Then later try to re-connect to initial blink up credentials.

My question is, is this possible? How do I extract the Wi-Fi pw (i know i can get the ssid)? My first guess is that’s it’s not possible for security. My next thought is, if I blink up, then swap to backup (on conn error), then “clear” the backup setwificonfiguration, then it goes back to blink up data?


You can’t extract the WiFi password.

Imps store one set of WiFi credentials so if you add an SSID/PW combo via BlinkUp and your device later drops back to the ‘backup’ SSID/PW, you will have to use BlinkUp again to re-connect to the ‘preferred’ network (unless this network has no password). As such, it’s not really possible to swap to the backup network frequently, eg. every time the connection to the preferred WLAN drops out.

You can only do this if you know both networks’ credentials ahead of time, allowing you to use imp.setwificonfiguration() to configure accordingly.

What if the backup was an unsecured network? Scan and connect, will this overwrite the blink up data? Thanks…

Even then. If you scan, see that your open WLAN is present (say its SSID is “fred”) and then you just call:

imp.setwificonfiguration("fred", "");

then you will overwrite the BlinkUp-set values until you run imp.setwificonfiguration() again or you perform a new BlinkUp.