Hi,
I’m operating my Spark.Core in semi-auto mode.
on the first run I do clear and set my wifi credentials … spark.core does connect to my AP and everything works fine.
but on the next runs after a power off / power each call I make (during setup) to WiFi.hasCredentials() will return false, so my code keeps setting credentials every time … which I would like to avoid (credentials did not change and I want to speed up the connection time)
of course everything works … my app works … but I really would like to avoid setting credentials all the time (also to avoid burning the c3300 flash)
shouldn’t hasCredentials() return TRUE after the first time … even after a power reset (off/on) ?
NOTE: the while loop will execute only once each time at setup, aftert he first call to setCredentials all the calls to hasCredentials will return TRUE. What is not clear to me is why (at boot) the hasCredentials call does not return TRUE since the previous time I did store my credentials already…
thanks for your help
Please paste code in the forum with this format:
``` <-- insert this
//paste code here
``` <-- insert this
yup … and it does erase also your wifi password afaik … full reset.
sorry I was not clear: I do that only ONE time (out of the box), then upload my fw which will save credentials on the first run. Any run after that (reset button, or power cycle) should not need to set credentials anymore
but the problem is not resetting my device … the problem is the fact that hasCredentials does NOT return true after the first run. power cycle your device (or press rst) and any call to hasCredentials will return false, even if (in the previous run) I did setCredentials and I did connect to my wifi AP (and the app did work indeed)
I just want to avoid setting credentials all the time…
added an EEPROM flag to signal stored credentials and runs like a champ! much faster setup/connection time.
one OT question: is there a plan to add an api to set the WiFi output power so that for 24/7 devices we can mitigate the heat? even with an heatsink … pulling all that current … the wifi shield is quite warm … and if your AP is not too far you might not need to run full power.