You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered a problem using the library when the WiFi connection is lost due to a fading of the WiFi signal between the ESP32 module and the router. If the connection is lost, the library is no longer able to restore it again. The conditions for reproducing the problem are as follows:
How to reproduce the problem:
The app Mailbox_Change_Notification connects to internet via a router. Move slowly the EVN-NINA-W102 (ESP32) board far from the router wifi range, until the ESP32 will lost the Wifi connection (do not switch off the router and then switch on it, to simulate the Wifi drop, otherwise the problem doesn’t occurs). Wait some second (1 minutes, see Serial.Dump, wait for that time or more, shorter time couldn't trigger the problem) with ESP32 position out of Wifi range of the router, then slowly enter the ESP 32 EVK in the range of the Wifi router. The result is that the sketch is not able to reconnect to the WiFi
Regards
Paolo
Sketch
#include<Arduino.h>
#include<WiFi.h>
#defineWIFI_SSID"mySSID"
#defineWIFI_PASSWORD"myPASS"
#defineNINA_W101
#defineLED_R23// Pin IO23 J4 LED RED
#defineLED_R_CH1
#if defined(NINA_W101) || defined(NINA_W102)
#defineLED_G33// Pin IO33 J2 LED GREEN per NINA-W101/102
#elif defined(NINA_W106)
#defineLED_G32// Pin IO32 J2 LED GREEN per NINA-W106
#else
#error "NO EVK_BOARD defined"
#endif
#defineLED_G_CH2
#defineLED_B21// PIN IO21 J2 LED BLUE
#defineLED_B_CH3unsignedlong DebugMills = 0;
unsignedlong ReconMills = 0;
voidconnectWiFi()
{
WiFi.disconnect();
Serial.println();
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.print("Connecting to Wi-Fi");
while (WiFi.status() != WL_CONNECTED)
{
Serial.print(".");
delay(300);
digitalWrite(LED_R, LOW);
}
digitalWrite(LED_R, HIGH);
digitalWrite(LED_G, LOW);
Serial.println();
Serial.print("SSID: ");
Serial.println(WIFI_SSID);
Serial.print("Connected with IP: ");
Serial.println(WiFi.localIP());
Serial.println();
}
voidsetup()
{
Serial.begin(115200);
Serial.println();
pinMode(LED_R, OUTPUT);
pinMode(LED_G, OUTPUT);
pinMode(LED_B, OUTPUT);
digitalWrite(LED_R, HIGH);
digitalWrite(LED_G, HIGH);
digitalWrite(LED_B, HIGH);
connectWiFi();
}
voidloop()
{
if (millis() - DebugMills > 10000)
{
DebugMills = millis();
Serial.printf("WIFI Status : %d\n", WiFi.status());
Serial.printf("RSSI: %d\n",WiFi.RSSI());
Serial.print("Connected with IP: ");
Serial.println(WiFi.localIP());
Serial.println();
}
if (WiFi.status() != WL_CONNECTED)
{
digitalWrite(LED_G, HIGH);
digitalWrite(LED_R, LOW);
if (millis() - ReconMills > 20000)
{
ReconMills = millis();
connectWiFi();
}
}
else
{
ReconMills = millis();
digitalWrite(LED_R, HIGH);
digitalWrite(LED_G, LOW);
}
}
The Module is moved closed to the Access point, but it doesn't reconnect.
Is the AutoReconnect procedure set by default ?
pberna67
changed the title
Impossible to recover from a WiFi signal lost due to fadding
Impossible to recover from a WiFi signal lost due to fading
May 2, 2024
Board
NINA-W101, NINA-W106
Device Description
EVK-NINA-W101 from u-blox
Hardware Configuration
ESP32 I'm running the v2.0.15 (Not listed in the Issue form)
https://www.u-blox.com/en/product/evk-nina-w10
Version
v2.0.14
IDE Name
Arduino 1.8.19
Operating System
Windows 11
Flash frequency
80Mhz
PSRAM enabled
no
Upload speed
921600
Description
I've encountered a problem using the library when the WiFi connection is lost due to a fading of the WiFi signal between the ESP32 module and the router. If the connection is lost, the library is no longer able to restore it again. The conditions for reproducing the problem are as follows:
Hw: EVK-NINA-W101/106 based on ESP32
https://www.u-blox.com/en/product/evk-nina-w10
Board lib package: ESP32 2.0.15 installed
Sketch example: See attached,
How to reproduce the problem:
The app Mailbox_Change_Notification connects to internet via a router. Move slowly the EVN-NINA-W102 (ESP32) board far from the router wifi range, until the ESP32 will lost the Wifi connection (do not switch off the router and then switch on it, to simulate the Wifi drop, otherwise the problem doesn’t occurs). Wait some second (1 minutes, see Serial.Dump, wait for that time or more, shorter time couldn't trigger the problem) with ESP32 position out of Wifi range of the router, then slowly enter the ESP 32 EVK in the range of the Wifi router. The result is that the sketch is not able to reconnect to the WiFi
Regards
Paolo
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: