-
Notifications
You must be signed in to change notification settings - Fork 13.3k
WIFI_AP_STA can cause AP too slow and not working if it can't connect to STA #1624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I notice the anomaly randomly |
two short notes: for the AP problem have you tried to use a other WiFi channel for the AP? |
here it is (the second half) |
@Links2004 May be algorithm could be changed on SDK side, IE as SSID/PSK are stored in flash, and may be channel also, perhaps SDK could :
|
you can do the scan your self then your have full control over it.
its more or less the way my WiFi Multi code work, it scans for wifi on every |
Markus, |
i have same problem with AP instability when STA tries to connect to nonexistent network sdk based webserver https://github.com/pvvx/esp8266web/ have "reconnect" delay and seems this parameter solves this problem |
otherwise we have trouble connecting to ap when it tries to reconnect to non existing network esp8266/Arduino#1624
Channel hopping is known, behavior is expected and due to STA and SoftAP sharing a single radio. |
Does WiFi.scanNetworks also cause channel hopping and associated clients disconnect? |
Following this case #1615 I'm opening this dedicated one to avoid mixing issue.
To isolate and see the issue, I've done a sketch that switch Wifi autoConnect parameter back and forth (I'm using NodeMCU board with flash button, pushing button toggle autoConnect on and off). But as changing autoConnect in loop does nothing (SDK says) so on each change we need to reboot the board, that what's the sketch do.
What is clear is that if autoConnect is on and and Wifi STA SSID/PSK does not connect (wrong SSID/PSK or main router AP down), the problem occurs in AP mode (may be take too much time trying to auto connect to wrong router)
And, as soon as autoConnect is disabled, AP is working fine, so I suspect autoConnect trying to connect cause issue in AP code.
But there is a 2nd point, all I've just written is true only if you call ESP.eraseConfig() at the beginning of setup(). If you don't do that, AP is slow and broken whatever autoConnect is on or off. This means that SDK is may be storing something else somewhere used in conjunction with autoConnect/SSID/PSK.
Note also that
ESP.eraseConfig()
preserve autoConnect flag ;-)Now the real problem is that when I'm at home, my NodeMCU Wifi connect to my main router and AP is up for 5 minutes for smartconfig in case we want to do so. Now I want to take my nodeMCU to another place for a customer demo. Of course It can't connect to main Wifi because I'm not at home, but the issue if that I see AP but once connected it's too slow, I miss about 50% of ping packet and thus I can't do anything, my web page are not coming and I can't config the NodeMCU to connect to customer Wifi.
Here is the sketch used and step to reproduce issue
ESP-TESTAP
ESP-TESTAP
Hoping some SDK's guru will be able to help me to understand this strange behavior
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: