I want to understand the behavior of WiFi in the following scenario.
I have configured P1 with two valid WiFi network configurations stored, say network1 and network2. At the time of storing WiFi configurations, network1 and network2 are good i.e. P1 can connect to internet on either network.
After a while the network behaviour changed as follows,
On network1, P1 can connect to WiFi but can’t connect to internet.
On network2, P1 can connect to WiFi and internet.
Whenever a device can’t connect to internet, I see the following log messages on the particle console
unable to resolve IP for device.spark.io
Cloud socket connection failed: -1
Internet Test Failed!
Resetting WLAN due to 2 failed connect attempts
Handling cloud error: 2
Resetting WLAN due to SPARK_WLAN_RESET
I believe this calls WiFi.off() and WiFi.on(). The P1 can store 5 WiFi configurations. Since I have 2 WiFi configurations, the P1 will attempts to connect Network1 and then if it fails it should try Network2.
Is this retrying mechanism true if P1 is able to connect to WiFi on Network1 but not to the internet? When WLAN is reset due to failed internet test, does Particle again try network1 or does it try connecting to the next saved network credentials?
Based on observations on some particle devices, they end up in a state where they are connected to WiFi but not to the particle cloud(flashing cyan)