Open Sineos opened 3 years ago
Hello, unstable wifi connection is generally a signal problem, this module is a weak signal caused by an on-board antenna, you can try some ways to enhance the signal, or enhance your router signal, this problem may be improved.
Hello, unstable wifi connection is generally a signal problem, this module is a weak signal caused by an on-board antenna, you can try some ways to enhance the signal, or enhance your router signal, this problem may be improved.
Thanks for your advice and you are totally right. I know these ESP beasts pretty well, since I have around 8 ESPs as various IOT devices in my home. Further I have 3 enterprise level access point distributed, providing a pretty good WIFI coverage.
The point is:
I made following changes and since then never had a single failure to connect and start the webDAV server:
diff --git a/network.cpp b/network.cpp
index 6db1083..2cce0b2 100644
--- a/network.cpp
+++ b/network.cpp
@@ -31,6 +31,7 @@ bool Network::start() {
while(WiFi.status() != WL_CONNECTED) {
//blink();
SERIAL_ECHO(".");
+ delay(100);
timeout++;
if(timeout++ > WIFI_CONNECT_TIMEOUT/100) {
SERIAL_ECHOLN("");
@@ -38,7 +39,7 @@ bool Network::start() {
return false;
}
else
- delay(100);
+ delay(1000);
}
SERIAL_ECHOLN("");
diff --git a/network.h b/network.h
index 1757897..9e17774 100644
--- a/network.h
+++ b/network.h
@@ -4,7 +4,7 @@
#define HOSTNAME "FYSETC"
#define SERVER_PORT 80
-#define WIFI_CONNECT_TIMEOUT 30000UL
+#define WIFI_CONNECT_TIMEOUT 80000UL
class Network {
public:
I would assume the critical change is increasing the delay
from 100 to 1000
I have the issue that I need to reboot sometimes multiple times for the firmware to successfully start the webDAV server. From the terminal output it is always the same:
M53
also saysWifi not connected
M53
will show success and the webDAV is started. Sometimes only (multiple) reboots will helpFor me it looks like that some timeout fire too soon and are not giving the WIFI connection enough time to "settle"