Try next Wifi when no internet?

I have an Argon in range of two wifi networks. I’d like it to have the board alternate between networks depending on which one happens to have a connection to the internet. Is there a pre-made solution that will do this?

Interesting idea - like a back-up internet connection.

I understood that the Argon WiFi works the same as the Photon in that it just works through the list of credentials and tries to connect and if it cannot connect then this process cycles forever. I am not aware of a pre-made solution. I could see how one might connect to WAP1 determine there was no internet/unable to Particle connect, disconnect from WAP1 and then try WiFi.connect() with WAP2. I am just not certain that would always work.

Thanks @armor, I’m not finding anything either. If I’m reading the right code then it looks like it tries the last network that worked, and otherwise scans for the closest network and connects to that:

I guess I’ll have to write something myself that perhaps does a ping to 8.8.8.8, and a clearCredentials() then setCredentials() for the other network each time.