mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1797] updating ESP32 arduino core to 3.1.0 seems to break wm.startConfigPortal() #1513
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#1513
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @GrantSando on GitHub (Feb 1, 2025).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1797
If I call wm.startConfigPortal(ssid, pass) with arduino-esp32 3.0.7 or earlier it creates the portal.
If I call it with arduino-esp32 3.1.0 or later installed it causes a "Guru Meditation Error: Core 1 panic'ed." and restarts device.
code looks like this,
#include "Arduino.h"
#include <WiFiManager.h>
#include <string.h>
#include <Preferences.h>
Preferences preferences;
WiFiManager wm;
char ssidString[50] = "";
char pwString[50] = "";
const int setupPin = 21;
void setup() {
Serial.begin(9600);
delay(1500);
pinMode(setupPin, INPUT_PULLUP);
getWiFiCredentials();
// InitWiFi();
}
void loop() {
// put your main code here, to run repeatedly:
}
void getWiFiCredentials(){
//load ssid and password from preferences
preferences.begin("credentials", false);
String ssid = preferences.getString("ssid", "");
ssid.toCharArray(ssidString, sizeof(ssidString));
String pw = preferences.getString("password", "");
pw.toCharArray(pwString, sizeof(pwString));
preferences.end();
WiFi.mode(WIFI_STA);
//if ssid and password have not been setup then start portal for user input
if (ssid == "" | digitalRead(setupPin) == 0)
{
if (!wm.startConfigPortal("MY_WIFI", "PASS1234"))
{
Serial.println("failed to connect and hit timeout");
delay(3000);
ESP.restart();
delay(5000);
}
else
{
//get ssid and password from portal
String ssid = wm.getWiFiSSID();
ssid.toCharArray(ssidString, sizeof(ssidString));
String pw = wm.getWiFiPass();
pw.toCharArray(pwString, sizeof(pwString));
}
}
@tablatronix commented on GitHub (Feb 1, 2025):
If you remove getwificredentials?
@GrantSando commented on GitHub (Feb 1, 2025):
Thanks for your reply. I have now simplified the code and uninstalled all additional libraries apart from WiFiManager.h and still get the same result. (starts portal with 3.0.7, crashes chip with 3.1.0). I should add this is Arduino IDE 2.3.4
Are there some other files I should delete before testing?
Code now is,
#include <WiFiManager.h>
WiFiManager wm;
void setup() {
Serial.begin(9600);
delay(1500);
}
void loop() {
// put your main code here, to run repeatedly:
}
@GrantSando commented on GitHub (Feb 1, 2025):
chip is: ESP32-S3-WROOM-1-N8
partition scheme is: 8mb with spiffs (or 4mb with spiffs - same result)
@tablatronix commented on GitHub (Feb 9, 2025):
Works for me, super example
@GrantSando commented on GitHub (Feb 9, 2025):
OK thanks, just tested that and it worked for me also.
I noticed WiFi.mode(WIFI_STA) was removed from the super example. When I remove this from my examples above they also work without issue.
Seems that with core 3.1.0 and higher this line shouldn't be called.
Thanks for your help and the work you've done with this library.
@tablatronix commented on GitHub (Feb 9, 2025):
Ah good point, could be a race condition
But that also is working for me without issue