khoih-prog / ESPAsync_WiFiManager

This is an ESP32 (including ESP32-S2 and ESP32-C3) / ESP8266 WiFi Connection Manager, using ESPAsyncWebServer, with fallback web configuration portal. Use this library for configuring ESP32, ESP8266 modules' WiFi, etc. Credentials at runtime. You can also specify static DNS servers, personalized HostName, fixed or random AP WiFi channel. With examples supporting ArduinoJson 6.0.0+ as well as 5.13.5- . Using AsyncDNSServer instead of DNSServer now.
MIT License
291 stars 73 forks source link

/close does not close the config portal #16

Closed marcelstoer closed 3 years ago

marcelstoer commented 3 years ago

I'm using Async_ConfigOnSwitch (1.1.2) unchanged on ESP32.

When I click "Exit Portal" (i.e. request /close) the WiFi Manager remains in config mode until timeout is reached. This is unexpected to me. I expected the config portal to close and for the WiFi Manager to go back to station mode.

In order to exit the config portal I have to hit "Configuration" and then "Save" without entering any values.

Does this work as designed?

khoih-prog commented 3 years ago

@marcelstoer

Can you un-comment this Line 1715 from

//stopConfigPortal = true; //signal ready to shutdown config portal     //KH crash if use this ???

to

stopConfigPortal = true; //signal ready to shutdown config portal       //KH crash if use this ???

to see if that is what you expect.

Possibly I forgot to un-comment after tested last time.

marcelstoer commented 3 years ago

Indeed, that's the behavior I would expect. Thanks! In fact, on iOS the config portal window/dialog closes so quickly now that you don't even get to see the /close response "page". Not that I would care about it anyway 😄 Important is that the portal is shut down and that works nicely now.

khoih-prog commented 3 years ago

That's good. Will update in next release.

marcelstoer commented 3 years ago

Can I ask you to keep issues open until the respective fix has landed on master? That would allow us to be notified by GitHub when we can update our dependencies.

khoih-prog commented 3 years ago

Master updated.

khoih-prog commented 3 years ago

See ESP_WiFiManager v1.2.0 and Contributions-and-Thanks

Releases v1.2.0

  1. Restore cpp code besides Impl.h code to use in case of multiple definition linker error. See Change Implementation to seperate *.h and *.cpp file instead of *.h and *-Impl.h and Support building in PlatformIO PR. Also have a look at HOWTO Fix Multiple Definitions Linker Error
  2. Fix bug /close does not close the config portal.