[FIXED] Disconnecting from one AP and connecting to another
Posted: Thu Sep 08, 2016 12:24 pm
[FIXED read the whole thread to see how....]
So I am current connected to AP X and I want to disconnect X and connect to AP Y, so I use
to make sure I am disconnected from X.
Why does this cause a WDT I am delay()ing....
Any other better methods?
As a side note.... sometimes it does not WDT and it gets to the famous
type loop, where I bailout if not connected in 20 seconds, however sometimes the "." is printed very fast across the terminal almost like delay() is broken.....
Thoughts? Is it all related?
RichardS
So I am current connected to AP X and I want to disconnect X and connect to AP Y, so I use
Code: Select all
WiFi.disconnect();
while (WiFi.status() == WL_CONNECTED) delay(1000);
to make sure I am disconnected from X.
Why does this cause a WDT I am delay()ing....
Any other better methods?
As a side note.... sometimes it does not WDT and it gets to the famous
Code: Select all
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial..print(".");
if (++cnt == 40) {
break;
}
}
type loop, where I bailout if not connected in 20 seconds, however sometimes the "." is printed very fast across the terminal almost like delay() is broken.....
Thoughts? Is it all related?
RichardS