Open Toto5931 opened 2 years ago
You can try to force 802.11g mode:
WiFi.setPhyMode(WIFI_PHY_MODE_11G);
With Asus router it worked.
Thanks a lot ! I solved the problem I do not understand why v3.0.2 takes always 7s to connect to the wifi whereas v2.7.4 takes either 7s, either 3s. So much faster in average...
@Toto5931 Can you have a look and try https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/generic-class.html#persistent and report whether it changes connection delay ?
Thank you @d-a-v !
Hi there Toto, are you able to share exactly which solution solved your problem? I'm having a similar problem where my ESP8266 will be able to connect to WiFi for 20 minutes or so and then will require a restart of the router to connect again.
@nathanielarking Just adding WiFi.setPhyMode(WIFI_PHY_MODE_11G); as proposed by @1d4rk solved my problem
I have the same problem, downgrading the connection from N to G does not solve the problem
@sblantipodi It didn't solve mine either, and I ended up fixing it by throwing a whole bunch of resets: I cleared the flash and wifi settings on the ESP, reverted to a previous version of my code, and defaulted the router settings, so I'm not exactly sure what works. Try re starting your code with the most basic WiFi settings possible (use the basic ESP example for connecting to WiFi) then change things from their until you get the functionality you did before.
I had this issue and it was related to #7965 and #8299.
I was able to fix it for myself by deleting the esp8266 boards from the boards manager, deleting their folders from the Arduino15 folder, installing the latest git version which includes this commit which fixed DHCP for me (will probably be included in 3.1.0?), and additionally when using Generic ESP8266 Module, using Tools->Espressif FW->"nonos-sdk2.2.1+61 (190313)" as suggested in the comments of #7965 which does not have the same issues with 802.11n.
I had this exact same issue and doing as 1d4rk suggested:
WiFi.setPhyMode(WIFI_PHY_MODE_11G);
worked like a charm and now it works smoothly, I'm definitely curious as to why but either way I just wanted to show my gratidue to my new hero of the day, thanks a lot!
You can try to force 802.11g mode:
WiFi.setPhyMode(WIFI_PHY_MODE_11G);
With Asus router it worked.
I wish I had found this comment about a half a day earlier. Solved the issue for me. My newer Asus router is set to “smart connect“ instead of separate 2.4 and 5 bands. This may have been the issue but I didn’t troubleshoot further once I was able to move forward on my project.
I tested the new Arduino ESP8266 v3.1.1 Library (based on nonos_SDK v3.0.5) and it is working without any issue for now. The connection is working good in 802.11n mode + WMM enabled (so no need to force 802.11g mode). The problem was due to the older ESP8266 Arduino core, starting from 2.6.0, that disabled WMM/WME support in 802.11n mode and it was added in the last release (because it is based on Espressif nonos_SDK 3.0.5 library).
Basic Infos
Platform
Settings in IDE
Problem Description
The WIFI connection is very unstable. It often works just after router restart but few times later the connection fails. The debug message tells me that I am connected but the status stays at 0 and never goes to WL_CONNECTED I have tried with many ESP8266 wemos d1 mini hardware it is always the same problem The connection works fine with an ESP32. Thanks for your help
Debug Messages