diff --git a/code/espurna/config/general.h b/code/espurna/config/general.h index 3deaed4f..aa344a20 100644 --- a/code/espurna/config/general.h +++ b/code/espurna/config/general.h @@ -152,6 +152,7 @@ PROGMEM const char* const custom_reset_string[] = { // ----------------------------------------------------------------------------- #define WIFI_RECONNECT_INTERVAL 120000 +#define WIFI_CONNECT_TIMEOUT 30000 #define WIFI_MAX_NETWORKS 5 #define ADMIN_PASS "fibonacci" #define FORCE_CHANGE_PASS 1 diff --git a/code/espurna/wifi.ino b/code/espurna/wifi.ino index 564dbfaa..2b9589c6 100644 --- a/code/espurna/wifi.ino +++ b/code/espurna/wifi.ino @@ -51,6 +51,7 @@ void wifiConfigure() { jw.setHostname(getSetting("hostname", HOSTNAME).c_str()); jw.setSoftAP(getSetting("hostname", HOSTNAME).c_str(), getSetting("adminPass", ADMIN_PASS).c_str()); + jw.setConnectTimeout(WIFI_CONNECT_TIMEOUT); jw.setReconnectTimeout(WIFI_RECONNECT_INTERVAL); jw.setAPMode(AP_MODE); jw.cleanNetworks();