mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 09:05:56 +03:00
[GH-ISSUE #1543] wifi manager seems to redirect to 0.0.0.0 for the CaptivePortal #1316
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#1316
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 @EtoTen on GitHub (Jan 7, 2023).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1543
Basic Infos
Hardware
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/az-delivery-devkit-v4.html
PLATFORM: Espressif 32 (2022.12.2) > AZ-Delivery ESP-32 Dev Kit C V4
HARDWARE: ESP32 240MHz, 520KB RAM, 4MB Flash
WiFimanager Branch/Release: Master (latest from github not release)
Description
Problem description:
Everything seems to work, except I get redirected to 0.0.0.0 instead of the Captive Portal IP. I think the issue may have started after I upgraded to the 2022.12.2 release of the Espressif platform.
I identified the issue being at WifiManager.cpp, line 2403
As a quick hack, this worked as a work arround:
Settings in IDE
[env:node32s]
platform = espressif32
board = az-delivery-devkit-v4
board_build.mcu = esp32
board_build.f_cpu = 240000000L
framework = arduino
monitor_speed = 115200
upload_protocol = esptool
upload_flags =
--connect-attempts= 200
lib_deps =
paulstoffregen/Time@^1.6.1
jchristensen/Timezone@^1.2.4
plerup/EspSoftwareSerial@^6.15.2
sparkfun/SparkFun u-blox GNSS Arduino Library@^2.2.0
lennarthennigs/Button2@^2.2.2
rpolitex/ArduinoNvs@^2.5
earlephilhower/ESP8266Audio@^1.9.7
fabianoriccardi/Melody Player@^2.4.0
https://github.com/tzapu/WiFiManager.git
Sketch
Debug Messages
@PaddyCube commented on GitHub (Jan 9, 2023):
It's the same on my end. Recently started using Wifi Manager and gets redirected to 0.0.0.0
Your workaround fixed it for me for now.
So after applying this workaround, I'm able to connect to my local network and I get an IP address. But I'm not able to start web Portal. It always redirects to 192.168.4.1 now, even if device got an IP from my DNS. By removing the fix you provided back to origin, it keeps redirecting to 0.0.0.0 again.
I used this way to get Wifi Manager to my project:
my code looks like this
@EtoTen commented on GitHub (Jan 12, 2023):
I messed with it more, and here is the fix that works for both cases:
I will try and create a fork / pull request with the fix.
@EtoTen commented on GitHub (Jan 12, 2023):
Pull request created https://github.com/tzapu/WiFiManager/pull/1547
@tablatronix commented on GitHub (Jan 13, 2023):
I am not seeing an issue...
do you have more info about your env?
Works fine for me, this seems related to your dns issue, and have you tried full erase?
@EtoTen commented on GitHub (Jan 13, 2023):
I don't have a DNS problem, I think you miss-read as I replied to someone else's issue offering a solution for DNS.
I am using this for the platform:
https://github.com/espressif/arduino-esp32/releases/tag/2.0.6
(ESP32 Arduino 2.0.6 based on ESP-IDF 4.4.3)
and am using VS.code / platformIO for IDE
What about your self? What sdk versions are you building off?
Per your advise, I just did a full erase without positive results.
Any other items that I could give you?
@tablatronix commented on GitHub (Jan 13, 2023):
oh my bad
Same env
Are you using anything odd like static ip or wificonfig()
What is your actual client address, is it getting
192.168.4.2Must be something flaky with the wificlient and dns initializing order or something.
Also what is your client device and have you tried another?
Have you enabled esp debuggin, maybe there is something useful there. I think we can change the ip but I would really like to know why this is returning bad ip, it should not.
Also is there any possibility you have a duplicate library, say for webserver or dnsserver
@tablatronix commented on GitHub (Jan 13, 2023):
heres what debug logs should contain
dont forget
Serial.setDebugOutput(true);@EtoTen commented on GitHub (Jan 13, 2023):
Stand-by, let me build a skeleton project that just has the WifiManager code to test with on my end.
@EtoTen commented on GitHub (Jan 13, 2023):
Whole skeleton package I put here: (https://github.com/EtoTen/WifiManager_issue_1543_test
@tablatronix commented on GitHub (Jan 14, 2023):
No esp debug there
@EtoTen commented on GitHub (Jan 15, 2023):
Ahh sorry I was going crazy trying to enable full debuging, then I just copied your build_flags from above, and it worked. Thanks!
I also updated the example I made here: https://github.com/EtoTen/WifiManager_issue_1543_test
Here is an example of when it redirects to 0.0.0.0.:
@tablatronix commented on GitHub (Jan 15, 2023):
[196564][V][WebServer.cpp:296] handleClient(): New client: client.localIP()=0.0.0.0thats is soo bizarre, hmm
@tablatronix commented on GitHub (Jan 15, 2023):
aha
[ 2266][E][WiFiServer.cpp:91] begin(): ---------------- IPv6@tablatronix commented on GitHub (Jan 15, 2023):
This is not in my library, you are using some alternative libraries?
@tablatronix commented on GitHub (Jan 15, 2023):
https://github.com/espressif/arduino-esp32/pull/7520
you are using experimental PRs?
@EtoTen commented on GitHub (Jan 15, 2023):
I don't think I am on using alternative libraries or experimental PRs (not sure what those are actually).
Can you tell based on the sample project I put up?
@EtoTen commented on GitHub (Jan 16, 2023):
Okay I know what happened now. I had this installed: https://github.com/tasmota/platform-espressif32/releases/tag/2022.12.2
"Tasmota Core 2.0.6 with IPv6 support" because I was testing single core mode and, did not realize it was defaulting to it vs the normal framework core. Reverting to the normal framework made redirects work ok. I also confirmed manually disabling ipv6 for the connection fixed it.
I guess if they do merge that patch for ipv6 into the normal espressif core it would also create the same issue, so the issue / patch may still be valid.
@tablatronix commented on GitHub (Jan 16, 2023):
I already added a note to that PR asking about this
@aFunkyBass commented on GitHub (Aug 21, 2023):
Hello @EtoTen I had exactly the same situation: installed Tasmota-32 on my ESP and now reinstalling my app which uses WiFiManager, it redirects on 0.0.0.0
Sorry for my newbie question how did you get it back to the normal behaviour?
P.S. I'm using platformio with Arduino Framework
@tablatronix commented on GitHub (Aug 21, 2023):
There is a workaround, but I have not added it to wm, because it seems like an edge case bug, not sure tho.
I thought this was fixed in esp core
@EtoTen commented on GitHub (Aug 21, 2023):
How I fixed it was to not use "Tasmota Core". Have they since merged those changes to the normal core?
Note: You can also use the "Tasmota Core w/ ipv6" if you apply the fix that I mentioned in my original post, to WifiManager.cpp.
@tablatronix commented on GitHub (Aug 22, 2023):
afaik tasmota is constantly updating from esp core/idf but not sure as it does use a custom fork
@aFunkyBass commented on GitHub (Sep 4, 2023):
I noticed that on PIO Homepage -> Platforms I had 2 Espressif 32 installed, one was probably installed by the Tasmota source.
My solution was to uninstall both of them and reinstall just the official one.
@tablatronix commented on GitHub (Sep 18, 2023):
https://github.com/espressif/arduino-esp32/pull/7520
Adding workaround proposed above, but wrapped it in a ip check.
Ideally I can add an ipv6 check and handle it special that way. but I am not sure the ideal workaround without rereading all that.
@mineshaftgap commented on GitHub (Nov 28, 2023):
I am experiencing this and do not have Tasmota installed, hard coding the "192.168.4.1" as mentioned in https://github.com/tzapu/WiFiManager/issues/1543#issue-1523775677 fixed it.
@tablatronix commented on GitHub (Nov 28, 2023):
This is fixed in master
@mineshaftgap commented on GitHub (Dec 2, 2023):
@tablatronix thanks!
For anyone who is developing with PlatformIO, I explicitly used the master branch in my platformio.ini:
@tablatronix commented on GitHub (Dec 3, 2023):
Ill start pushing releases for pio since they don support pre releases