Switching Wifi network frequently runtime

Hi all,

I’ve been digging in the forums and the Github project to find whether it is possible (nowadays) to manually select in runtime which WiFi SSID (or which stored wifi network on the Photon by getCredentials) the device should connect to.

My case is that I’m trying to have a Photon interface with a solar energy inverter that exposes a WLAN hotspot to which you can connect and request data (TCPClient). This inverter does not connect to a local network, but only supports a hotspot. I’d like to connect a Photon to that hotspot, and then alternate with the local network (with internet) to transmit that data out. This alternation would happen once per minute or even quicker.
Because of this frequency, the path of setting and clearing credentials in runtime often is not preferred since I learned that credentials are stored in Flash and therefore prone to wear:

I’ve read multiple threads regarding requests but they date from 2017. With various proposals like introducing a WiFi.select() method. Whereby an argument could be passed of SSID/password or alternatively even a getCredentials[1] if I store them properly beforehand using setCredentials. But thusfar, I don’t see any updates to Particle References. I also cannot find it tracked as open here: https://github.com/particle-iot/device-os/issues?page=1&q=is%3Aissue+is%3Aopen+wifi

Is something of this sort supported?

I would not prefer to go down the path of using 2 Photons, one permanently connected to the solar energy hotspot and another permanently connected to the internet-enabled network. And then having a serial interface between the two…

@Brounzer The simple answer is no. Once you store more than 1 credential in the WiFi chip you can’t select which WAP to connect to if there are more than one within range. The Argon has a different network stack than the Photon which uses WICED which itself has numerous known issues. So far Particle have prioritised cellular comms development over WiFi. For example, there is no WPA ENT support on the Argon.