mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #719] ESP8266 static IP changes on reset. #601
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#601
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 @bkrajendra on GitHub (Sep 3, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/719
----------------------------- Remove above -----------------------------
Basic Infos
Hardware
WiFimanager Branch/Release:
Esp8266/Esp32:
Hardware: ESP-12e, esp01, esp25
ESP Core Version: 2.4.0, staging
Description
Problem description
Settings in IDE
Module: Generic
Additional libraries:
Sketch
I'm trying very simple setup with ESP-12E here. What I observe is that if I restart ESP by using reset pin, it gets random dynamic IP. But if I use software reset via programming or URL it get its static IP. Also mostly after power on it gets its static IP Properly. But I consistently observed that if I use hardware reset pin it gets IP by DHCP as it switches back to my normal IP assigned by WiFi router.
pardon me if i'm creating duplicate issue, but i searched for similar problem but could not find a trace of it in issues.
So what is going on wrong or am i missing something.
Edit:
Just tested and verified again with NodeMCU.
Find below the debug logs first is after after ESP.restart()
And second one is Hardware reset.
@tablatronix commented on GitHub (Sep 3, 2018):
erase flash ?
@tablatronix commented on GitHub (Sep 3, 2018):
#720
@bkrajendra commented on GitHub (Sep 3, 2018):
tried with option Erase Flash:All Flash Content.
But still the problem is there.
Now im updating again everything to latest dev version and will try once more.
@bkrajendra commented on GitHub (Sep 3, 2018):
Updated WiFi Manager to latest dev branch.... no success
Updated ESP SDK to latest from git ... no success....
See the difference in log.
Static Ip configured is 10.1.25.30
With Software reset using ESP.restart():
With Hardware reset:
@tablatronix commented on GitHub (Sep 4, 2018):
This is what I get, looks ok to me.
Let me try different version of esp core
@bkrajendra commented on GitHub (Sep 5, 2018):
have u tried two methods?
One by doing hardware reset and
other by doing ESP.restart()
?
Because I got it every time i do it. its not even random.
Also one other thing is that why it shows default AP during regular working.
It always shows ESP_XXXX Ap after configuration complete and when connect after next restart
all time you will see this AP.
@tablatronix commented on GitHub (Sep 5, 2018):
I used the same sketch and added a start delay and a reset
@tablatronix commented on GitHub (Sep 5, 2018):
ESP stores mode on its own, and that is the default. You should set whatever mode you want in your sketch , WM will not do this for you, or change it. I am thinking that this is somehow starting differently and WM is not able to correct it,
Do you have logging with esp wifi debugging on ?
Try setting mode sta before wm also
@bkrajendra commented on GitHub (Sep 5, 2018):
Im not getting what are you saying. I thought WM handles modes. and That's why we get initially it in AP mode and then in STA mode. The issue latter it should be only in STA mode. But I still see a AP.

See this WM code..
@tablatronix commented on GitHub (Sep 5, 2018):
wm disables persistent when switching modes, leaving the default saved mode unaffected
@tablatronix commented on GitHub (Sep 5, 2018):
make sure you have the latest commits
@bkrajendra commented on GitHub (Jul 18, 2019):
Setting WiFi mode to WiFi.mode(WIFI_STA) in setup() resolves this issue.

This is only mentioned in one of the examples. It should be strictly mentioned somewhere in documentation.
else all ESP are left with open AP without any knowledge.