Closed hmueller01 closed 1 year ago
@hmueller01 I see the bug. I should have a PR later today or tomorrow.
For an MCVE the "CaptivePortal" example shows the issue, after adding Serial.begin
. (Serial.begin
makes the stack trace visible.)
#include <ESP8266WiFi.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
const byte DNS_PORT = 53;
IPAddress apIP(172, 217, 28, 1);
DNSServer dnsServer;
ESP8266WebServer webServer(80);
String responseHTML = ""
"<!DOCTYPE html><html lang='en'><head>"
"<meta name='viewport' content='width=device-width'>"
"<title>CaptivePortal</title></head><body>"
"<h1>Hello World!</h1><p>This is a captive portal example."
" All requests will be redirected here.</p></body></html>";
void setup() {
Serial.begin(115200);
delay(200);
Serial.printf("\r\n\r\nDNSServer CaptivePortal example\r\n");
WiFi.mode(WIFI_AP);
WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0));
WiFi.softAP("DNSServer CaptivePortal example");
// if DNSServer is started with "*" for domain name, it will reply with
// provided IP to all DNS request
dnsServer.start(DNS_PORT, "*", apIP);
// replay to all requests with same HTML
webServer.onNotFound([]() {
webServer.send(200, "text/html", responseHTML);
});
webServer.begin();
}
void loop() {
dnsServer.processNextRequest();
webServer.handleClient();
}
I will check your PR. But it might take a few days. Thanks for the quick solution!
Ok, checked your PR. It fixes all my problems (had panics at lots of locations in my code). Thanks a lot!!! What a simple thing that costs me hours of debugging my code (as I thought I did something wrong or running out of memory). Please bring this to develop asap as it might fix problems for other users too.
Basic Infos
Platform
Settings in IDE
Problem Description
After connecting to the AP the module panics
Decoded stack dump see below.
The same code works well with Arduino Release 3.1.2.
MCVE Sketch
There is a lot of code I wrote, so it is not really possible to show it here. But showing the lines noted in the stack dump might help.
/Users/hmueller/src/PlatformIO/Projects/rhts-platformio/src/rhts-arduino.cpp:142 is a global definition of https://github.com/hmueller01/ESP_WiFiManager_Lite
0x4020dc73: ESP_WiFiManager_Lite::run() at /Users/hmueller/src/PlatformIO/Projects/rhts-platformio/lib/ESP_WiFiManager_Lite.hmueller01/src/ESP_WiFiManager_Lite.h:921
ARDUINO_BOARD expands to "PLATFORMIO_SHELLY1"
So it looks like the new git platform doesn't like this. Or am I wrong? If you need more code details please let me know.
Debug Messages