mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 17:15:53 +03:00
[GH-ISSUE #110] AP IP Came up as 192.168.244.1 #87
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#87
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 @pieman64 on GitHub (Feb 24, 2016).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/110
I noticed today when using WiFi Manager that the IP address allocated for the AP (in Arduino IDE Serial Monitor) was 192.168.244.1 rather than the regular 192.168.4.1.
As I had Serial Monitor access this wasn't a problem but when I'm 'on the road' I'll not always have it available. @tzapu any reason why the standard IP wasn't allocated as I haven't set a 'static' IP within the sketch?
@tzapu commented on GitHub (Feb 25, 2016):
no idea, have never seen that before...
for those cases the captive portal should redirect you to the proper ip as well, or actually because i reroute dns queries as well, entering any website should redirect to the proper ip...
but maybe it was printing wrong? did you actually connect to 244.1?
@pieman64 commented on GitHub (Feb 25, 2016):
Yes I connected to 244.1 and it was fine but it wouldn't have worked without Serial Monitor telling me the required IP to use. I didn't try 4.1 but are you saying 4.1 would be ok? I think the final confirmation when I saved the parameters took me to 4.1.
@pieman64 commented on GitHub (Feb 27, 2016):
I took my device to a friends house yesterday and I noticed when I clicked the WiFi Access Point it automatically brought up the required web page. I think this was with Firefox and I normally use Chrome and I hadn't seen this happen before. His PC is Windows 8 / 10 and my machine is Windows 8.1. Is this feature specific to certain browsers / operating systems?
@tzapu commented on GitHub (Feb 29, 2016):
i assume that would be the captive portal?
yeah, very os specific, works for me on os x, brings an unbranded webview, on ios, same thing
did not try on anything else
@pieman64 commented on GitHub (Feb 29, 2016):
Not captive portal, just regular WiFiManager. Same thing happened again last night when I went to his house. I asked him which OS he has and he said Windows 8.2 which AFAIK doesn't exist so I guess 8.1.
I tried setting Firefox as my default browser and Win 8.1 but I can't replicate it on my system.
@tzapu commented on GitHub (Feb 29, 2016):
well, the captive portal is simply wifimanger, it s the same page really, no distinctions.
since wifimanger hijacks dns as well, maybe he had some refreshing page or something, and it redirected
@cosmoiler commented on GitHub (Jun 27, 2016):
I see similiar problem of @pieman64: 192.168.244.1 rather than the regular 192.168.4.1
@tzapu commented on GitHub (Jun 27, 2016):
hi guys,
sorry i don t have any more information related to this. i have only seen it happen when my flash got corrupted and i was only able to make it go away after fully erasing flash with esptool.py i think, i remember it being hard and annoying to sort out.
i know in the latest 2.3 or maybe in the github core there s been more improvements so umm_malloc does not corrupt the flash, but i supposed that if it’s corrupted, the checks won t help much.
if this is even related to that that is…
@kentaylor commented on GitHub (Jun 29, 2016):
Flash corruption is a known issue, caused by a bug in the Arduino core code which will soon be fixed.
I've had to erase the flash on a few ESP8266 devices and written an Arduino sketch to do it which is at https://github.com/kentaylor/EraseEsp8266Flash
@duchere commented on GitHub (Aug 10, 2016):
Hi, I am experimenting the issue. The only fix I found is to modify startConfigPortal, by adding
WiFi.mode(WIFI_OFF);
delay(2000);
just before
WiFi.mode(WIFI_AP_STA);
A lower delay might work.
When I do that, I get 100% of the time 192.168.4.1
Otherwise, I get very often 192.168.244.1
Looks like it's related to ESP8266 core
Best,
Jean
@smokeypell commented on GitHub (Aug 10, 2016):
This is set in the ESP8266WiFiAP.cpp starting at line 151
// check IP config struct ip_info ip; if(wifi_get_ip_info(SOFTAP_IF, &ip)) { if(ip.ip.addr == 0x00000000) { // Invalid config DEBUG_WIFI("[AP] IP config Invalid resetting...\n"); //192.168.244.1 , 192.168.244.1 , 255.255.255.0 ret = softAPConfig(0x01F4A8C0, 0x01F4A8C0, 0x00FFFFFF); if(!ret) { DEBUG_WIFI("[AP] softAPConfig failed!\n"); ret = false; } } } else { DEBUG_WIFI("[AP] wifi_get_ip_info failed!\n"); ret = false; }I have no issue getting 192.168.4.1. My question is, how do I change what it generates for a default IP?
I know I can use setAPStaticIPConfig(), but I'd still like to know how it's generating 192.168.4.1.
@tzapu commented on GitHub (Aug 11, 2016):
192.168.4.1 is the Expressif SDK default, that s just what it's set to give out in lack of other settings being made.
192.168.244.1 seems to come out in case of flash data corruption. @kentaylor made a vey nice util to erase the flash completely. you should probably do that and update your esp core to the latest and hopefully you won t have that issue anymore....
thanks for all the info everyone
@duchere commented on GitHub (Aug 11, 2016):
@tzapu : the problem is: once in production, with a user, I can't erase the flash or do anything like this. Any idea about why setting Wifi off and delaying 500 ms before doing WiFi.mode(WIFI_AP_STA) fixes the issue ?
By the way, in addition to fixing the issue, it has tremendously improved the rate of success of connection to the AP, and request handling.
For real, doing this hack, has multiplied the success rate, at least by 5. Weird.
@eyp commented on GitHub (Aug 16, 2016):
It just happened to me now, but after switch it off and on again, it started with the right IP address... but after reset it started again with the wrong IP address :/
@pieman64 commented on GitHub (Aug 16, 2016):
@eyp which ESP do you have. I can't remember now if it was my ESP 07's or WeMos Mini's that came up with 244.1. Was it also the very first time you had flashed the ESP?
@eyp commented on GitHub (Aug 16, 2016):
Mine is ESP-12E
No, I have flashed it lots of times.
@arihantdaga commented on GitHub (Dec 6, 2017):
I faced the same thing today..
Suddenly ..
Any idea why its happening ?
@taufikmas commented on GitHub (Mar 20, 2018):
i have update like this..:
`boolean WiFiManager::startConfigPortal(char const *apName, char const *apPassword) {
WiFi.mode(WIFI_OFF); //fixduino
delay(2000); //fixduino
//setup AP
WiFi.mode(WIFI_AP_STA);
DEBUG_WM("SET AP STA");
_apName = apName;
_apPassword = apPassword;`
and make result stabil in AP IP ADDRESS 192.168.4.1.