Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By Solexious
#40949 I'm currently trying to get the CaptivePortalAdvanced to work so I can use its config features in my project.

I've currently not modified the example sketch.

When I connect to the created ap with my mac and navigate to the ip the esp has given itself (192.168.4.1) I only get a blank page returned, if I try and go to any random url I get timeouts. On the serial output I see that the esp is trying to redirect my page calls. If I try and visit /wifi I get a blank page again, but also on the serial output I see the esp start and stop scanning for ap's.

I tried throwing on the normal CaptivePortal and it works correctly, even getting mac os to bring up the "looks like you are connecting to a captive portal" window to allow me to gain access.

Kind of weird, any ideas?

Sol
User avatar
By krebbi
#42296 to be more exact:

this doesn't work on 2.1.0

Code: Select allESP8266WebServer webServer(80);
webServer.on("/", []() {handleRoot();});
webServer.onNotFound ( []() {handleNotFound();} );
webServer.begin(); // Web server start


.on doesn't work, but .onNotFound works.

with 2.0.0 both are working.

Could anybody help here, please?
User avatar
By krebbi
#42297 ok, previous post is wrong..

this here isn't working:

Code: Select all
  webServer.sendHeader("Cache-Control", "no-cache, no-store, must-revalidate");
  webServer.sendHeader("Pragma", "no-cache");
  webServer.sendHeader("Expires", "-1");
  webServer.send(200, "text/html", "");
  webServer.sendContent(
    "<html><head></head>"
    "<body>"
    "<div>My HTML Code</div>"
    "</body></html>"
  );
webServer.client().stop();