mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 17:15:53 +03:00
[GH-ISSUE #1689] ESP32 fails to reset correctly after connecting to WIFI Network #1437
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#1437
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 @serifpersia on GitHub (Dec 19, 2023).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1689
Basic Infos
Latest release of WiFiManager from Arduino Library Manager
Hardware
Hardware: ESP32-12K(S2)
Core Version: 2.4.0
Description
Whenever I connect from captive portal to my local network, the esp32 doesn't reset correctly, and I get issue with not being able to connect to the webserver hosted on the esp32, the browser says device refuses to connect. When I press reset button on ESP32 I can access webserver hosted on esp32 ip or mdns, does this have to do with spiffs I assume.
Another minor thing I don't understand is ESP32 doesn't reset when users type wrong password for their ssid, you manually have to erase wifi config, typing correct password doesn't do anything. If you could clarify how that works.
Thanks!
Settings in IDE
Module: NodeMCU
Additional libraries:
#include <ESPAsyncWebServer.h>
#include <SPIFFS.h>
Sketch
Here is an image showing the browser, I checked with non spiffs site webserver and it still the same so its not spiffs. After I press reset button or reconnect power to esp32 only then I can connect to the ip of esp32 and access the page.

@serifpersia commented on GitHub (Dec 22, 2023):
I fixed this issue I had. I called the callback function on save config to restart esp32 board. I don't know why it doesn't do it automatically but this is the fix to be able to access the server without pressing reset button or reconnecting power to the board.
@tablatronix commented on GitHub (Dec 22, 2023):
What does your logs say?
Try increasing the retries for connect, this sounds like an ap issue.
Also there is esp bug that you cannot start a new webserver check your webserver error codes, the port stays in use and cannot be released
@serifpersia commented on GitHub (Dec 22, 2023):
I found the fix I'm not going to go in depth on this I just wanted to have my webserver accessible immediately after connecting to local network via wifi manager. The image above does it for me. When a password is typed and save is pressed this runs and it resets the esp32 and it I can go into the ip without issue. One thing I hate is not having ability to know esp32's ip after connecting. Improv web serial sdk seems like a good option to setup wifi but for now I like using wifimanager library for wifi setup. And yes all esp32 devices i support s2 s3 and esp32 dev boards all have same symptom but luckily I found this quick fix for now. I will look into logs(enable verbose output on the core I assume?) Is this the esp bug you mentioned?
@tablatronix commented on GitHub (Dec 22, 2023):
Yeah rebooting just frees the port I think, I bet if you use a different port it works, ie 8080
@serifpersia commented on GitHub (Dec 22, 2023):
Oh I see, well I will try different port for my webserver and see how it goes, since wifimanager webserver also uses port 80 and this bug is not releasing the port if I understood it correctly.