-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ESP is not Responsive in AP_STA mode while STA is still connecting with OTA Enabled #5915
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
Using a different device, e.g. your phone, which channel do you see the esp's AP on? Which channel was the router on, the one the esp STA tries to connect to? |
I tried it on 2 different NodeMCUs .. I tracked the Issue to this PR #5894 |
You did not answer my question. Ref #5894, how are you pinging? |
@Lan-Hekary said:
The ESP has only one radio shared between AP and STA interfaces. If the station is looking for your router, it will drag the softap along on its search. If you're pinging the softap at the time, you'll see the ping fail, because the softap dropped out of the channel. Sometime the device that was connected to the softap from which you're pinging will disconnect from it and connect elsewhere. The behavior depends on timing, so you won't always reproduce exactly the same way. |
ESP AP is on Ch1 at first .. |
I am using the Ping command from CMD on windows .. |
Yes .. You're right .. But if the the STA I am looking for does not exist the Channel won't change .. |
Pinging the IP or hostname.local?
I suppose you meant "if the ssid the STA is looking for". If so, that is not true. The STA interface scans the channels looking for the ssid you specified, and connects once it finds it. During that scan it drags the softap along with it. If the ssid exists, it could find it quickly, e.g. if your router is on a low channel. Or the config could be stored on flash and connection could be done shortly after boot even before begin() (I don't see use of persistent(false) in your code) by using prior information, in which case the channel won't change. In contrast, if the (new) ssid doesn't exist, the esp will channel hop across all channels before giving up, and that won't be quick, so you'll likely notice it. |
I am pinging 192.168.4.1 .. So .. Basically I am scanning only every 1 min .. The problem was not there before .. I was able to connect to the AP and ping .. And browse the webserver without porblems .. Only once every 1 min that I miss a packet for of the ping .. And the webserver hangs for a second .. Bit otherwise it was fine .. Now after the commit .. All ping Times Out ... And no communication at all .. I want to investigate the source of the problem in this commit #5894 .. |
I can upload to the ESP using OTA if I am using the IP address 192.168.4.1 .. |
I have a new discovery on the issue .. I suspected that this modification caused the MDNS service to overload somehow .. |
Which core version? You didn't fill out that info in the issue template |
The last commit .. |
I opened wireshark .. The Flooding stops once it connects to a Station .. |
I wonder if it doesn't realize the query is coming from itself? There are different methods for getting the local AP IP address and the local Station IP address. |
CC @LaborEtArs |
Still no Fix .. |
Is there a proposed fix for this ? |
@Lan-Hekary : Will try to reproduce in my config but can you provide me with one/some of your wireshark logs ? Maybe gives me a first thought. |
Still no Fix Guys .. Can you at least revert this commit and reopen the issue of the MDNS to Focus the Effort on how to fix the Original Problem ( OTA Update in AP mode ) |
@Lan-Hekary Well, there is (kind of) a solution, but not committed yet, as not really a good one... |
The final solution would be to create separate mDNS responder instances for each used interface, but currently I haven't got time to implement this.... edit from maintainer: see #5866 (comment) |
I'm a bit of a novice here. Programming a SonOff Basic. |
-### Basic Infos
Platform
Settings in IDE
Problem Description
The ESP in AP_STA mode does not respond to pings or webserver requests while STA is not Connected ( AP not found or Temporary Disconnect from the router )
This happens while the OTA is Enabled only .. It works normally if I turned the OTA off ..
I think it's related to the mDNS Module ..
and I think it's related to this issue as well #5866
the problem appeared after the last repo update I made ..
MCVE Sketch
The text was updated successfully, but these errors were encountered: