Closed gonzabrusco closed 2 years ago
I have the feeling that this is caused by some new changes to the WiFi subsystem and scan parameters. Looks like briefly the radio was switched to other channels (so it can scan them) and computer detected that as disconnect. I will ask internally if someone has a clue how to get around this.
@me-no-dev any news about this?
unfortunately nothing back yet. There are some updates that I will push probably tomorrow. Check back in RC3 :) I'll poke my colleagues again monday
I'm sorry to inform that the problem persists in RC3. When the scanning starts my Windows 10 PC gets disconnected from the AP.
Hi @gonzabrusco, thanks for reporting. Could you tell me, on the PC side, is there anything else you did besides connecting to wifi?
No. Just connect and browse to 182.168.4.1.
RC4. This keeps happening. Sorry. When a Windows 10 connect to the AP and the ESP32 starts the scan, the AP gets unstable and the Windows PC gets disconnected.
@gonzabrusco We had found the root cause: while scanning, our devices will be in different channels, causing AP to not send beacon when not in the home channel. We are discussing solutions. A temporary workaround is to
Reduce the time spent on each channel WiFi.scanNetworks(false,false,false,100U);
。
Sorry but this still keeps happening. Even with 100u scan time between channels. With latest master as of today (RC6).
@YouDONG-ESP Could you please give approximation regarding when it will be fixed? I also have the same problem. Tried with 50, still got disconnection. I also use Windows 10, Arduino RC6
@RafigRzayev This problem is pretty complicated to fix. We don't have a perfect solution, the best fix we found is let esp32 goback to home channel after finish scanning each channel, but it will also make scan finish slower. We are doing test to see if it will affect the use.
@YouDONG-ESP Thank you for informing. @gonzabrusco Can you try WiFi.scanNetworks(false, false, true, 100) instead of WiFi.scanNetworks(false, false, false, 100). After switching to passive scanning my connection seems ok at the moment.
I can confirm this is still happening with latest framework version 1.0.6
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.
I can confirm this issue still exists at 2.0.2. @me-no-dev @YouDONG-ESP
@gonzabrusco Reopening and adding to the Roadmap. We will validate it. Thank you.
Hi, I just tried the sketch on ESP32-S2 (WROVER module) using Arduino IDE 1.8.15 I tried it with the following systems and all of them worked: Linux Fedora 34 64bit on ThinkPad E15 Android 9 on LG G6 iPhone 13 Windows 10 on HP EliteBook 855 @gonzabrusco do you still have those issues?
Sorry for the late response. This still happen to me but ONLY with laptops. With cellphones and with a desktop PC with a WiFi pci-e adapter, works fine. But with two different Laptops, this issue exists. Try it a couple of times, repeatedly, from a laptop, and you should see it.
PS: My board is an ESP32 devkit (ESP-WROOM-32)
Hi, I just tried it with WROOM-32D + laptop with Linux and it works ok for me. Tried to disconnect/connect and wait for a while. Cycled a few times. The connection was not lost. How far is your ESP from the computer? Same table/room, or somewhere further? Maybe the signal is weak. Do you have the ESP connected directly to the computer/power source (without USB hubs)? Maybe it is power related problem. To be honest I don't know what could be causing it.
Did you try with Windows 10?
This issue was reproduced by me an another collegue in remote locations with different hardware (different laptops, different devkits but same ESP32 version). Always connected to the USB of the laptop, very close to it.
Hi, I tried it with Win 10 and Win 7 using ESP32 WROVER-B and WROOM-32D and everything was ok. I'm sorry but I am unable to replicate your issue.
Closing this one as we cannot Replicate it, if needed you can reopen it. Thanks!
Too bad this is happening only on my side. I will try another devkits. Maybe it's something about this ESP32. Thanks for taking your time to test this @PilnyTomas
@gonzabrusco Good idea, it can be related to specific HW issue.
Just FYI, to whomever it is concerned: The issue seems to be the same, when the configured SSID is unavailable or out of range. Connecting to the ESP32 via softAP is practically impossible in that case, which IMHO is a common failure MODE, that SHOULD be handled by the WiFi stack, but isn't. The only workaround I know of is to call WiFi.enableSTA(false);
if you detect that scenario and re-enable STA when the softAP gets disabled again.
I have the same problem with a c3 mini 1.
As soon as WiFi.scanNetworks() is executed, the Windows laptop flies out of the AP. It works with Android phones.
I have the WiFi.scanNetworks(false,false,false,100U); and WiFi.scanNetworks(false,false,true,100U);
tries.
But it doesn't help. is there a solution now?
I want to run Tasmote on the ESP32 c3. there WiFi.scanNetworks(); used
lg Hichi
In our side, We are using in ESP32, and run scanWifi and SoftAP to allow other device detect the device.
Sometime the softAP not start without any possible to detect it!
Is there any solution for this problem?
It looks that it hapenning when scanNetwork start before the softAP...
I faced the same issue on Windows 11 with a standard ESP32 Dev Module. Original scanNetwork was taking around 6-8 seconds, and windows will drop the connection and jump back to regular wifi.
For those who still face the issue, WiFi.scanNetworks(false,false,true,100U); helped in my case. Though it was still borderline with 100U. I reduced this to 50, and started showing better results. After playing around for a bit, I settled in at 75U. YMMV.
I have this exact problem with my Android client disconnecting from the SoftAP when doing a WiFi scan. I feel like the AP is stopping because it doesn't appear in the SSID list on my phone briefly during this time...
WiFi.scanNetworks(false,false,true,75U); did help.
I think the core issue may be related to windows 10/11 testing the connection, with android phones the connections is very stable, the issue only seems to happen on windows. I tried to add an dns responder but did not see any improvements (or i didnt made it right, i'm new at wifi / web stuff)
Hardware:
Board: ESP32 Dev Module Core Installation version: 1.0.4 and 1.0.5 RC1/RC2 IDE name: Platform.io Flash Frequency: 40Mhz PSRAM enabled: no Upload Speed: 115200 Computer OS: Windows 10 and Android 9
Description:
softAP gets unstable when performing a wifi scan in latest 1.0.5 RC1 and RC2. In version 1.0.4 this can be done without problems. On 1.0.5 RC1/RC2 the AP goes down while scanning. This happens when I'm connected to the AP with a PC with Windows 10 (I tried two different laptops with Windows 10 and both have the same problem). Curiously, on two Android phones this worked on both versions.
Sketch:
The following is the WiFi AP example with minor modifications for showing scan results. This code compiled against 1.0.4 works perfectly but compiled against 1.0.5 RC1/RC2 does not work. For compiling I use PlatformIO but this issue happens also with Arduino IDE.
Debug Messages:
No error message. The PC gets disconnected and does not receive the rest of the webpage (the scan results).