mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #658] ESP32 - WebServer not reachable in AP STA mode in Win10 #552
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#552
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 @Mirdox on GitHub (Jul 14, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/658
Hardware
WiFimanager Branch/Release: Development
Esp32:
WROOM32
Description
Hello there,
I'm facing really weird issue and I'm not sure what is it related to.
When WiFi is not configured, everything is working as expected.
After the WiFi is configured and the ESP32 goes to AP STA mode, the WebServer (OnDemand Portal) cannot be accessed by some devices.
Computer with Windows 10 cannot access the web server, never, while the same computer with Ubuntu can access the web server.
Computer with Windows 7 can always access the WebServer, Android phone can sometimes access the Webserver.
All devices are for sure connected to ESP access point, but the web service isn't simple there. I've tried also with telnet.
Does anybody have this issue?
Any Ideas?
Thank you
Sketch
Advanced Example Sketch
@tablatronix commented on GitHub (Jul 14, 2018):
Are you sure the configportal is running ?
Do you mean the captive portal doesn't work , what happens if you use ip address?
What does serial say?
@Mirdox commented on GitHub (Jul 14, 2018):
Hello,
The configportal is running, because I'm able to access it from another clients, e.g. Win7 or Linux.
It isn't problem of the captive portal, i'm only using ip address to access the configportal.
The serial says nothing, no debug messages when I'm trying to open configportal from Win10 computer or android phone.
I've also tried to disable FW, so this should not be the issue.
It looks like there is no service listening. I was trying telnet, nmap port scan, browser.
The Win10 and Android is for sure connected to the AP, I've add debug messages for that.
When I disconnect the ESP32 from network, the configportal is accessible.
The on demand config portal is also accessible when I add
wm.disconnect();
before
wm.startConfigPortal("OnDemandAP");
but that's just a workarround.
Thanks for quick response.
@tablatronix commented on GitHub (Jul 14, 2018):
Ok was just making sure you were not connecting to the esp softap that it runs on boot if persistent saved it. Then of course webserver is not available.
@tablatronix commented on GitHub (Jul 14, 2018):
build_flags = -DESP32 -DCORE_DEBUG_LEVEL=5might helpSo what exactly is in the wm logs
@tablatronix commented on GitHub (Jul 14, 2018):
There are some known issue with android security and captive portal, but if accessing via ip it has been known to work. I do not have windows 10 here, but I have used it fairly recently and do not recall any issues. I will try to fire up my vm
@Mirdox commented on GitHub (Jul 15, 2018):
Hello,
I've tried core debug before with no success and I've reproduced it now. Maybe you will notice something.
Maybe this issue is OS related, but the weird thing is, that I'm not able to connect to config portal only in AP STA mode, when STA is disconnected, it works as expected.
Here I've pressed the button
Here I've connected Android phone and opened 192.168.4.1
Here I've connected Windows 10 computer and opened 192.168.4.1, no further logs
What you mean by:
? Maybe I'm missing something.
Thank you
@tablatronix commented on GitHub (Jul 15, 2018):
usually the opposite is true, when in sta ap mode and sta is failing it fails to work.
Are you saying the opposite when connected to your ap and running configportal ( sta+ap ) your connects fail sometimes?
It sounds like a channel issue.
Have you pulled in the most recent commits for esp32?
@tablatronix commented on GitHub (Jul 15, 2018):
The esp clearly shows your sta connecting to it, hmm it does seem like your client will not make the http request, maybe it is a firewall or security issue.
I will keep testing, but it does in fact seem like a client issue, maybe check wireshark?
@Mirdox commented on GitHub (Jul 15, 2018):
Yes, connecting to AP fails sometimes.
I'm using the most up-to-date version.
Wireshark was a good idea, but still no clue what is going on.
When STA is disconnected, the client (Win10) makes some initial handshake with ESP32:
random client port -> esp port 80 - SYN
esp port 80 -> random client port - SYN-ACK
random client port -> esp port 80 - ACK
HTTP GET REQUEST after this handshake
Just like described here http://blog.catchpoint.com/2010/09/17/anatomyhttp/
When STA is connected, the client (Win10) fails to make this initial handshake while trying to connect to ESP32.
Win10 sends the first SYN, but no SYN-ACK is received from ESP.
I believe the ESP32 doesn't send this SYN-ACK in some cases.
I will try to compare it with Win7 later.
Have you experienced this before?
Thank you
@tablatronix commented on GitHub (Jul 15, 2018):
Ooh could it have something to do with the ip address? Different class when on the 2 networks.
@Mirdox commented on GitHub (Jul 17, 2018):
IP address, mask, default gateway seem to be OK.
Also ip routing is identical with computer on which it works without issues.
Thank you for help, don't waste time with it.
@tablatronix commented on GitHub (Jul 17, 2018):
I don't mean there is something wrong I mean the computer is refusing to connect to that ip address for security reasons due the ip class itself.
what ip classes are on your 2 networks ?
Yeah this almost sounds like a esp bug, but to test you would need to use the webserver example and test in sta and ap mode, without wifimanager being involved.
@Mirdox commented on GitHub (Jul 17, 2018):
On station I'm using 192.168.1.x
On AP, I've now tried some more ip configs.
10.0.1.1
192.168.2.1
192.168.4.1
Win10 didn't work, Win7 worked on all of them, Android worked only on 192.168.4.1.
Thanks, I'll try pure webserver.