[GH-ISSUE #816] The IP address has changed to a different address #682

Closed
opened 2026-02-28 01:26:33 +03:00 by kerem · 6 comments
Owner

Originally created by @Muhammed-Hayr-Ali on GitHub (Jan 26, 2019).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/816

PLEASE TRY DEVELOPMENT BRANCH before submitting bugs on release or master, in case they were already fixed.

POST SERIAL OUTPUT !

Issues without basic info will be ignored or closed!

Please fill the info fields, it helps to get you faster support ;)

if you have a stack dump decode it:
https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/stack_dump.rst

for better debug messages:
https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/debugging.rst

----------------------------- Remove above -----------------------------

Basic Infos

Hardware

WiFimanager Branch/Release:

  • [ * ] Master

  • Development

  • [ *] ESP8266

**Hardware:

  • [ * ] ESP01
  • [ * ] ESP12 E/F/S (nodemcu, wemos, feather)

ESP Core Version: 2.4.0, staging

  • 2.3.0
  • 2.4.0
  • staging (master/dev)

Description

Problem description

Settings in IDE

Module: NodeMcu, 12E

Additional libraries:

Sketch

#include <ESP8266WiFi.h>          //https://github.com/esp8266/Arduino

//needed for library
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>         //https://github.com/tzapu/WiFiManager


void setup() {
    // put your setup code here, to run once:
    Serial.begin(115200);

    //WiFiManager
    //Local intialization. Once its business is done, there is no need to keep it around
    WiFiManager wifiManager;
    //reset saved settings
    //wifiManager.resetSettings();
    
    //set custom ip for portal
    //wifiManager.setAPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0));

    //fetches ssid and pass from eeprom and tries to connect
    //if it does not connect it starts an access point with the specified name
    //here  "AutoConnectAP"
    //and goes into a blocking loop awaiting configuration
    wifiManager.autoConnect("AutoConnectAP");
    //or use this for auto generated name ESP + ChipID
    //wifiManager.autoConnect();

    
    //if you get here you have connected to the WiFi
    Serial.println("connected...yeey :)");
}

void loop() {
    // put your main code here, to run repeatedly:
    
}

Debug Messages

The  IP address has changed to a different address

3 blank fields appear
How to restore it to normal


Screenshot
http://www.m5zn.com/newuploads/2019/01/26/jpg//4992dd4c3bc0758.jpg

Originally created by @Muhammed-Hayr-Ali on GitHub (Jan 26, 2019). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/816 ## PLEASE TRY DEVELOPMENT BRANCH before submitting bugs on release or master, in case they were already fixed. ## ## POST SERIAL OUTPUT ! Issues without basic info will be ignored or closed! Please fill the info fields, it helps to get you faster support ;) if you have a stack dump decode it: https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/stack_dump.rst for better debug messages: https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/debugging.rst ----------------------------- Remove above ----------------------------- ### Basic Infos #### Hardware **WiFimanager Branch/Release:** - [ * ] Master - [x] Development - [ *] ESP8266 **Hardware: - [ * ] ESP01 - [ * ] ESP12 E/F/S (nodemcu, wemos, feather) **ESP Core Version: 2.4.0, staging** - [ ] 2.3.0 - [ ] 2.4.0 - [ ] staging (master/dev) ### Description Problem description ### Settings in IDE Module: NodeMcu, 12E Additional libraries: ### Sketch ```cpp #include <ESP8266WiFi.h> //https://github.com/esp8266/Arduino //needed for library #include <DNSServer.h> #include <ESP8266WebServer.h> #include <WiFiManager.h> //https://github.com/tzapu/WiFiManager void setup() { // put your setup code here, to run once: Serial.begin(115200); //WiFiManager //Local intialization. Once its business is done, there is no need to keep it around WiFiManager wifiManager; //reset saved settings //wifiManager.resetSettings(); //set custom ip for portal //wifiManager.setAPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0)); //fetches ssid and pass from eeprom and tries to connect //if it does not connect it starts an access point with the specified name //here "AutoConnectAP" //and goes into a blocking loop awaiting configuration wifiManager.autoConnect("AutoConnectAP"); //or use this for auto generated name ESP + ChipID //wifiManager.autoConnect(); //if you get here you have connected to the WiFi Serial.println("connected...yeey :)"); } void loop() { // put your main code here, to run repeatedly: } ``` ### Debug Messages ``` The IP address has changed to a different address 3 blank fields appear How to restore it to normal ``` Screenshot http://www.m5zn.com/newuploads/2019/01/26/jpg//4992dd4c3bc0758.jpg
kerem 2026-02-28 01:26:33 +03:00
Author
Owner

@tablatronix commented on GitHub (Jan 26, 2019):

This is a new bug with the esp lib, it will have to be researched

<!-- gh-comment-id:457875861 --> @tablatronix commented on GitHub (Jan 26, 2019): This is a new bug with the esp lib, it will have to be researched
Author
Owner

@tablatronix commented on GitHub (Jan 26, 2019):

Can you provide an actual description, what is expected, what do you mean ip changed?

<!-- gh-comment-id:457876468 --> @tablatronix commented on GitHub (Jan 26, 2019): Can you provide an actual description, what is expected, what do you mean ip changed?
Author
Owner

@tablatronix commented on GitHub (Jan 27, 2019):

https://github.com/esp8266/Arduino/issues/5677

<!-- gh-comment-id:457885439 --> @tablatronix commented on GitHub (Jan 27, 2019): https://github.com/esp8266/Arduino/issues/5677
Author
Owner

@tablatronix commented on GitHub (Jan 27, 2019):

I need to add a backward compatible way to check if ip is set, or this bug needs to be fixed in esp lib

<!-- gh-comment-id:457885483 --> @tablatronix commented on GitHub (Jan 27, 2019): I need to add a backward compatible way to check if ip is set, or this bug needs to be fixed in esp lib
Author
Owner

@Muhammed-Hayr-Ali commented on GitHub (Jan 27, 2019):

I deleted this from the library and the problem was solved



/*
  String WiFiManager::getSSID() {
  if (_ssid == "") {
    DEBUG_WM(F("Reading SSID"));
    _ssid = WiFi.SSID();
    DEBUG_WM(F("SSID: "));
    DEBUG_WM(_ssid);
  }
  return _ssid;
  }

  String WiFiManager::getPassword() {
  if (_pass == "") {
    DEBUG_WM(F("Reading Password"));
    _pass = WiFi.psk();
    DEBUG_WM("Password: " + _pass);
    //DEBUG_WM(_pass);
  }
  return _pass;
  }
*/



/*
  if (_sta_static_ip) {

    String item = FPSTR(HTTP_FORM_PARAM);
    item.replace("{i}", "ip");
    item.replace("{n}", "ip");
    item.replace("{p}", "Static IP");
    item.replace("{l}", "15");
    item.replace("{v}", _sta_static_ip.toString());

    page += item;

    item = FPSTR(HTTP_FORM_PARAM);
    item.replace("{i}", "gw");
    item.replace("{n}", "gw");
    item.replace("{p}", "Static Gateway");
    item.replace("{l}", "15");
    item.replace("{v}", _sta_static_gw.toString());

    page += item;

    item = FPSTR(HTTP_FORM_PARAM);
    item.replace("{i}", "sn");
    item.replace("{n}", "sn");
    item.replace("{p}", "Subnet");
    item.replace("{l}", "15");
    item.replace("{v}", _sta_static_sn.toString());

    page += item;

    page += "<br/>";
  }
*/

<!-- gh-comment-id:457953508 --> @Muhammed-Hayr-Ali commented on GitHub (Jan 27, 2019): I deleted this from the library and the problem was solved ``` /* String WiFiManager::getSSID() { if (_ssid == "") { DEBUG_WM(F("Reading SSID")); _ssid = WiFi.SSID(); DEBUG_WM(F("SSID: ")); DEBUG_WM(_ssid); } return _ssid; } String WiFiManager::getPassword() { if (_pass == "") { DEBUG_WM(F("Reading Password")); _pass = WiFi.psk(); DEBUG_WM("Password: " + _pass); //DEBUG_WM(_pass); } return _pass; } */ /* if (_sta_static_ip) { String item = FPSTR(HTTP_FORM_PARAM); item.replace("{i}", "ip"); item.replace("{n}", "ip"); item.replace("{p}", "Static IP"); item.replace("{l}", "15"); item.replace("{v}", _sta_static_ip.toString()); page += item; item = FPSTR(HTTP_FORM_PARAM); item.replace("{i}", "gw"); item.replace("{n}", "gw"); item.replace("{p}", "Static Gateway"); item.replace("{l}", "15"); item.replace("{v}", _sta_static_gw.toString()); page += item; item = FPSTR(HTTP_FORM_PARAM); item.replace("{i}", "sn"); item.replace("{n}", "sn"); item.replace("{p}", "Subnet"); item.replace("{l}", "15"); item.replace("{v}", _sta_static_sn.toString()); page += item; page += "<br/>"; } */ ```
Author
Owner

@d-a-v commented on GitHub (Jan 29, 2019):

Fix is merged, can you please retest with staging core ?

<!-- gh-comment-id:458355203 --> @d-a-v commented on GitHub (Jan 29, 2019): Fix is merged, can you please retest with staging core ?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#682
No description provided.