r-downing / PersWiFiManager

Persistent WiFiManager Arduino library for ESP8266
http://ryandowning.net/PersWiFiManager/
MIT License
111 stars 34 forks source link

Async PersWiFiManager #24

Open debsahu opened 5 years ago

debsahu commented 5 years ago

If anyone is interested in asynchronous persistent WiFi Manager, check my fork: https://github.com/debsahu/PersWiFiManager

gnalbandian commented 5 years ago

Do you mind explaning the benefits of the asynchronous feature. Thanks!

pfeerick commented 5 years ago

@gnalbandian I think the main reason to use an asynchronous version is when you want to use the ESPAsyncWebServer web server in your main code, rather than being restricted to the ESP8266WebServer. There is then also the question of if you want wifi configuration to be blocking in your code, or for it to be non-blocking... allowing the rest of the code to run regardless. i.e. with some of my applications, this allows the display to still be updated while waiting for the wifi to be configured, so it just has if the wifi is connected/configured before allowing those tasks to run.

arlaor commented 4 years ago

@debsahu, @r-downing Hi

What modifications should I make to your code to not use FS spiffs? what I want to do is that the code of the .htm files is executed from the same file .ino

debsahu commented 4 years ago

@arlaor See the way I wrote the gziped html into PROGMEM.

arlaor commented 4 years ago

Hi @debsahu

I have made the following changes to the PersWiFiManager.cpp file: #define WIFI_HTM_GZ_PROGMEM and

define WIFI_HTM_PROGMEM

and I have left without uploading the files in the data folder.

The internet connection setup page opens and shows the available SSIDs and allows you to connect, but the REBOOT button does not work. Also, when I load the files from the data folder, to work with SPIFFS, it is observed that the page that opens is the same one that opens when SPIFFS is not used, regardless of whether the PROGMEM definitions are disabled. I can see that the browser is not opening the uploaded page in the data folder, because this page includes two extra buttons: WPS SETUP and AP MODE, which are not shown on the page that loads the sketch. That could be happening? Another question, how can I disable the connection attempt via SPIFFS, which takes a long time waiting on ...starting SPIFFS?

dushyantahuja commented 4 years ago

@debsahu Can you rename your fork, so that we can use it directly using PlatformIO / Arduino Library Manager