Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By mikekgr
#72481 Dear Sirs,
I am trying to implement something and I need your help.
My project will be builded around ESP8266 Arduino 2.4.0 RC2 core.

Well, I need to have a little “WiFi management logic” to my code with the following requirements:
During the initial setup, after ( power on or reboot/reset ), I wanted to check 3 things or possible scenarios in 3 “steps”:

1) To be connected to the last know WiFi AP ( using the Espressif internal way ). If this is not possible/failed or we get timeout ( I will have 10 seconds timeout ) let's continue to step (2)

2) Try for a connection to a pre-setted WiFi AP ( hard coded to my code ). If this connection can be done ( there is also here timeout of let’s say 10 seconds ), everything is ok the setup continuous to the other things not related to WiFi… If not, go to last step, step 3

3) Activate wifimanager ( using this library: https://github.com/tzapu/WiFiManager ) and wait user action for WiFi AP connection based on the available WiFi AP you may have. Also here I need to have a timeout of 180 seconds and if nothing been configured after this period, just do ESP8266 restart

What do you think? What is the best possible implementation? Please give me good ideas...

Thanks a lot.

Best Regards,
Mike Kranidis
User avatar
By mikekgr
#72490
rudy wrote:Have a look at wifiMulti. http://arduino-esp8266.readthedocs.io/e ... mples.html
https://github.com/esp8266/Arduino/blob ... iMulti.ino

Then look to adding in an access point when the above fails.


Dear @rudy thanks a lot for your reply and suggestions. I know the WiFiMulti but it does n't fit in my particular case.

Again, thanks and best regards,
Mike Kranidis
User avatar
By mikekgr
#72501
mikekgr wrote:Dear Sirs,
I am trying to implement something and I need your help.
My project will be builded around ESP8266 Arduino 2.4.0 RC2 core.

Well, I need to have a little “WiFi management logic” to my code with the following requirements:
During the initial setup, after ( power on or reboot/reset ), I wanted to check 3 things or possible scenarios in 3 “steps”:

1) To be connected to the last know WiFi AP ( using the Espressif internal way ). If this is not possible/failed or we get timeout ( I will have 10 seconds timeout ) let's continue to step (2)

2) Try for a connection to a pre-setted WiFi AP ( hard coded to my code ). If this connection can be done ( there is also here timeout of let’s say 10 seconds ), everything is ok the setup continuous to the other things not related to WiFi… If not, go to last step, step 3

3) Activate wifimanager ( using this library: https://github.com/tzapu/WiFiManager ) and wait user action for WiFi AP connection based on the available WiFi AP you may have. Also here I need to have a timeout of 180 seconds and if nothing been configured after this period, just do ESP8266 restart

What do you think? What is the best possible implementation? Please give me good ideas...

Thanks a lot.

Best Regards,
Mike Kranidis


Hello there!
No body can help me to fulfil my above mentioned requirements? Is it so much difficult ???