From 9e9e6a960736c1472b817b3e1dbee2720ea1885e Mon Sep 17 00:00:00 2001 From: ubi Date: Sat, 22 May 2021 12:53:39 +0200 Subject: [PATCH 1/5] implemented Dynamic WiFi credentials --- src/Arduino_ConnectionHandler.h | 5 +- src/Arduino_WiFiConnectionHandlerDynamic.cpp | 167 +++++++++++++++++++ src/Arduino_WiFiConnectionHandlerDynamic.h | 64 +++++++ 3 files changed, 234 insertions(+), 2 deletions(-) create mode 100644 src/Arduino_WiFiConnectionHandlerDynamic.cpp create mode 100644 src/Arduino_WiFiConnectionHandlerDynamic.h diff --git a/src/Arduino_ConnectionHandler.h b/src/Arduino_ConnectionHandler.h index 6496b931..136f59cb 100644 --- a/src/Arduino_ConnectionHandler.h +++ b/src/Arduino_ConnectionHandler.h @@ -217,12 +217,12 @@ class ConnectionHandler { virtual NetworkConnectionState update_handleConnected () = 0; virtual NetworkConnectionState update_handleDisconnecting() = 0; virtual NetworkConnectionState update_handleDisconnected () = 0; - + NetworkConnectionState _current_net_connection_state; private: unsigned long _lastConnectionTickTime; - NetworkConnectionState _current_net_connection_state; + OnNetworkEventCallback _on_connect_event_callback = NULL, _on_disconnect_event_callback = NULL, _on_error_event_callback = NULL; @@ -230,6 +230,7 @@ class ConnectionHandler { #if defined(BOARD_HAS_WIFI) #include "Arduino_WiFiConnectionHandler.h" + #include "Arduino_WiFiConnectionHandlerDynamic.h" #elif defined(BOARD_HAS_GSM) #include "Arduino_GSMConnectionHandler.h" #elif defined(BOARD_HAS_NB) diff --git a/src/Arduino_WiFiConnectionHandlerDynamic.cpp b/src/Arduino_WiFiConnectionHandlerDynamic.cpp new file mode 100644 index 00000000..6644bdb1 --- /dev/null +++ b/src/Arduino_WiFiConnectionHandlerDynamic.cpp @@ -0,0 +1,167 @@ +/* + This file is part of ArduinoIoTCloud. + + Copyright 2019 ARDUINO SA (http://www.arduino.cc/) + + This software is released under the GNU General Public License version 3, + which covers the main part of arduino-cli. + The terms of this license can be found at: + https://www.gnu.org/licenses/gpl-3.0.en.html + + You can be released from the requirements of the above licenses by purchasing + a commercial license. Buying such a license is mandatory if you want to modify or + otherwise use the software for commercial activities involving the Arduino + software without disclosing the source code of your own applications. To purchase + a commercial license, send an email to license@arduino.cc. +*/ + +/****************************************************************************** + INCLUDE + ******************************************************************************/ + +#include "Arduino_WiFiConnectionHandlerDynamic.h" + +#ifdef BOARD_HAS_WIFI /* Only compile if the board has WiFi */ + +/****************************************************************************** + CTOR/DTOR + ******************************************************************************/ + +WiFiConnectionHandlerDynamic::WiFiConnectionHandlerDynamic(bool const keep_alive) +: ConnectionHandler{keep_alive} +{ + _current_net_connection_state = NetworkConnectionState::CLOSED; +} +void WiFiConnectionHandlerDynamic::setWiFiCredentials(String ssid, String pass){ + _ssid = ssid; + _pass = pass; + _current_net_connection_state = NetworkConnectionState::INIT; +} +/****************************************************************************** + PUBLIC MEMBER FUNCTIONS + ******************************************************************************/ + +unsigned long WiFiConnectionHandlerDynamic::getTime() +{ +#if !defined(BOARD_ESP8266) && !defined(ESP32) + return WiFi.getTime(); +#else + return 0; +#endif +} + +/****************************************************************************** + PROTECTED MEMBER FUNCTIONS + ******************************************************************************/ + +NetworkConnectionState WiFiConnectionHandlerDynamic::update_handleInit() +{ +#if !defined(BOARD_ESP8266) && !defined(ESP32) +#if !defined(__AVR__) + Debug.print(DBG_INFO, F("WiFi.status(): %d"), WiFi.status()); +#endif + if (WiFi.status() == NETWORK_HARDWARE_ERROR) + { +#if !defined(__AVR__) + Debug.print(DBG_ERROR, F("WiFi Hardware failure.\nMake sure you are using a WiFi enabled board/shield.")); + Debug.print(DBG_ERROR, F("Then reset and retry.")); +#endif + return NetworkConnectionState::ERROR; + } +#if !defined(__AVR__) + Debug.print(DBG_ERROR, F("Current WiFi Firmware: %s"), WiFi.firmwareVersion()); +#endif + +#if defined(WIFI_FIRMWARE_VERSION_REQUIRED) + if (WiFi.firmwareVersion() < WIFI_FIRMWARE_VERSION_REQUIRED) + { +#if !defined(__AVR__) + Debug.print(DBG_ERROR, F("Latest WiFi Firmware: %s"), WIFI_FIRMWARE_VERSION_REQUIRED); + Debug.print(DBG_ERROR, F("Please update to the latest version for best performance.")); +#endif + delay(5000); + } +#endif + +#else + Debug.print(DBG_ERROR, F("WiFi status ESP: %d"), WiFi.status()); + WiFi.disconnect(); + delay(300); + WiFi.begin(_ssid.c_str(), _pass.c_str()); + delay(1000); +#endif /* #if !defined(BOARD_ESP8266) && !defined(ESP32) */ + + return NetworkConnectionState::CONNECTING; +} + +NetworkConnectionState WiFiConnectionHandlerDynamic::update_handleConnecting() +{ +#if !defined(BOARD_ESP8266) && !defined(ESP32) + if (WiFi.status() != WL_CONNECTED) + { + WiFi.begin(_ssid.c_str(), _pass.c_str()); + } +#endif /* ifndef BOARD_ESP8266 */ + + if (WiFi.status() != NETWORK_CONNECTED) + { +#if !defined(__AVR__) + Debug.print(DBG_ERROR, F("Connection to \"%s\" failed"), _ssid.c_str()); + Debug.print(DBG_INFO, F("Retrying in \"%d\" milliseconds"), CHECK_INTERVAL_TABLE[static_cast(NetworkConnectionState::CONNECTING)]); +#endif + return NetworkConnectionState::CONNECTING; + } + else + { +#if !defined(__AVR__) + Debug.print(DBG_INFO, F("Connected to \"%s\""), _ssid.c_str()); +#endif +#if defined(BOARD_ESP8266) || defined(ESP32) + configTime(0, 0, "time.arduino.cc", "pool.ntp.org", "time.nist.gov"); +#endif + return NetworkConnectionState::CONNECTED; + } +} + +NetworkConnectionState WiFiConnectionHandlerDynamic::update_handleConnected() +{ + if (WiFi.status() != WL_CONNECTED) + { +#if !defined(__AVR__) + Debug.print(DBG_VERBOSE, F("WiFi.status(): %d"), WiFi.status()); + Debug.print(DBG_ERROR, F("Connection to \"%s\" lost."), _ssid); +#endif + if (_keep_alive) + { +#if !defined(__AVR__) + Debug.print(DBG_ERROR, F("Attempting reconnection")); +#endif + } + + return NetworkConnectionState::DISCONNECTED; + } + return NetworkConnectionState::CONNECTED; +} + +NetworkConnectionState WiFiConnectionHandlerDynamic::update_handleDisconnecting() +{ + WiFi.disconnect(); + return NetworkConnectionState::DISCONNECTED; +} + +NetworkConnectionState WiFiConnectionHandlerDynamic::update_handleDisconnected() +{ +#if !defined(BOARD_ESP8266) && !defined(ESP32) + WiFi.end(); +#endif /* ifndef BOARD_ESP8266 */ + if (_keep_alive) + { + return NetworkConnectionState::INIT; + } + else + { + return NetworkConnectionState::CLOSED; + } +} + +#endif /* #ifdef BOARD_HAS_WIFI */ diff --git a/src/Arduino_WiFiConnectionHandlerDynamic.h b/src/Arduino_WiFiConnectionHandlerDynamic.h new file mode 100644 index 00000000..a30d8391 --- /dev/null +++ b/src/Arduino_WiFiConnectionHandlerDynamic.h @@ -0,0 +1,64 @@ +/* + This file is part of ArduinoIoTCloud. + + Copyright 2019 ARDUINO SA (http://www.arduino.cc/) + + This software is released under the GNU General Public License version 3, + which covers the main part of arduino-cli. + The terms of this license can be found at: + https://www.gnu.org/licenses/gpl-3.0.en.html + + You can be released from the requirements of the above licenses by purchasing + a commercial license. Buying such a license is mandatory if you want to modify or + otherwise use the software for commercial activities involving the Arduino + software without disclosing the source code of your own applications. To purchase + a commercial license, send an email to license@arduino.cc. +*/ + +#ifndef ARDUINO_WIFI_CONNECTION_HANDLER_DYNAMIC_H_ +#define ARDUINO_WIFI_CONNECTION_HANDLER_DYNAMIC_H_ + +/****************************************************************************** + INCLUDE + ******************************************************************************/ + +#include "Arduino_ConnectionHandler.h" + +#ifdef BOARD_HAS_WIFI /* Only compile if the board has WiFi */ + +/****************************************************************************** + CLASS DECLARATION + ******************************************************************************/ + +class WiFiConnectionHandlerDynamic : public ConnectionHandler +{ + public: + + WiFiConnectionHandlerDynamic(bool const keep_alive = true); + + void setWiFiCredentials(String ssid, String pass); + virtual unsigned long getTime() override; + virtual Client & getClient() override{ return _wifi_client; } + virtual UDP & getUDP() override { return _wifi_udp; } + + + protected: + + virtual NetworkConnectionState update_handleInit () override; + virtual NetworkConnectionState update_handleConnecting () override; + virtual NetworkConnectionState update_handleConnected () override; + virtual NetworkConnectionState update_handleDisconnecting() override; + virtual NetworkConnectionState update_handleDisconnected () override; + + private: + + String _ssid; + String _pass; + + WiFiUDP _wifi_udp; + WiFiClient _wifi_client; +}; + +#endif /* #ifdef BOARD_HAS_WIFI */ + +#endif /* ARDUINO_WIFI_CONNECTION_HANDLER_DYNAMIC_H_ */ From f0b7a49f7ea15d3cc48f2c1a8522619bcf39fc8f Mon Sep 17 00:00:00 2001 From: ubi Date: Sat, 22 May 2021 22:30:15 +0200 Subject: [PATCH 2/5] amend missing .c_str() conversion for _ssid - compilation failed on ESP --- src/Arduino_WiFiConnectionHandlerDynamic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Arduino_WiFiConnectionHandlerDynamic.cpp b/src/Arduino_WiFiConnectionHandlerDynamic.cpp index 6644bdb1..fc827219 100644 --- a/src/Arduino_WiFiConnectionHandlerDynamic.cpp +++ b/src/Arduino_WiFiConnectionHandlerDynamic.cpp @@ -129,7 +129,7 @@ NetworkConnectionState WiFiConnectionHandlerDynamic::update_handleConnected() { #if !defined(__AVR__) Debug.print(DBG_VERBOSE, F("WiFi.status(): %d"), WiFi.status()); - Debug.print(DBG_ERROR, F("Connection to \"%s\" lost."), _ssid); + Debug.print(DBG_ERROR, F("Connection to \"%s\" lost."), _ssid.c_str()); #endif if (_keep_alive) { From 02ad79aafcfe738a8f532aad991e895c30d661fc Mon Sep 17 00:00:00 2001 From: ubi Date: Sat, 22 May 2021 22:45:49 +0200 Subject: [PATCH 3/5] tests failing for esp32:esp32:esp32 on GH but succesful locally. moved _lastConnectionTickTime to protected to try --- src/Arduino_ConnectionHandler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Arduino_ConnectionHandler.h b/src/Arduino_ConnectionHandler.h index 136f59cb..8099e79e 100644 --- a/src/Arduino_ConnectionHandler.h +++ b/src/Arduino_ConnectionHandler.h @@ -217,11 +217,12 @@ class ConnectionHandler { virtual NetworkConnectionState update_handleConnected () = 0; virtual NetworkConnectionState update_handleDisconnecting() = 0; virtual NetworkConnectionState update_handleDisconnected () = 0; + unsigned long _lastConnectionTickTime; NetworkConnectionState _current_net_connection_state; private: - unsigned long _lastConnectionTickTime; + OnNetworkEventCallback _on_connect_event_callback = NULL, _on_disconnect_event_callback = NULL, From e1b82f14d8cf357eed926b2c69981aca4b3c2e12 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Wed, 26 May 2021 13:37:01 +0200 Subject: [PATCH 4/5] Simplify dynamic wifi connection handler by leveraging common code. --- src/Arduino_WiFiConnectionHandler.cpp | 10 +- src/Arduino_WiFiConnectionHandler.h | 6 +- src/Arduino_WiFiConnectionHandlerDynamic.cpp | 133 +------------------ src/Arduino_WiFiConnectionHandlerDynamic.h | 23 +--- 4 files changed, 16 insertions(+), 156 deletions(-) diff --git a/src/Arduino_WiFiConnectionHandler.cpp b/src/Arduino_WiFiConnectionHandler.cpp index e1a1f12d..4c1c8a64 100644 --- a/src/Arduino_WiFiConnectionHandler.cpp +++ b/src/Arduino_WiFiConnectionHandler.cpp @@ -85,7 +85,7 @@ NetworkConnectionState WiFiConnectionHandler::update_handleInit() Debug.print(DBG_ERROR, F("WiFi status ESP: %d"), WiFi.status()); WiFi.disconnect(); delay(300); - WiFi.begin(_ssid, _pass); + WiFi.begin(_ssid.c_str(), _pass.c_str()); delay(1000); #endif /* #if !defined(BOARD_ESP8266) && !defined(ESP32) */ @@ -97,14 +97,14 @@ NetworkConnectionState WiFiConnectionHandler::update_handleConnecting() #if !defined(BOARD_ESP8266) && !defined(ESP32) if (WiFi.status() != WL_CONNECTED) { - WiFi.begin(_ssid, _pass); + WiFi.begin(_ssid.c_str(), _pass.c_str()); } #endif /* ifndef BOARD_ESP8266 */ if (WiFi.status() != NETWORK_CONNECTED) { #if !defined(__AVR__) - Debug.print(DBG_ERROR, F("Connection to \"%s\" failed"), _ssid); + Debug.print(DBG_ERROR, F("Connection to \"%s\" failed"), _ssid.c_str()); Debug.print(DBG_INFO, F("Retrying in \"%d\" milliseconds"), CHECK_INTERVAL_TABLE[static_cast(NetworkConnectionState::CONNECTING)]); #endif return NetworkConnectionState::CONNECTING; @@ -112,7 +112,7 @@ NetworkConnectionState WiFiConnectionHandler::update_handleConnecting() else { #if !defined(__AVR__) - Debug.print(DBG_INFO, F("Connected to \"%s\""), _ssid); + Debug.print(DBG_INFO, F("Connected to \"%s\""), _ssid.c_str()); #endif #if defined(BOARD_ESP8266) || defined(ESP32) configTime(0, 0, "time.arduino.cc", "pool.ntp.org", "time.nist.gov"); @@ -127,7 +127,7 @@ NetworkConnectionState WiFiConnectionHandler::update_handleConnected() { #if !defined(__AVR__) Debug.print(DBG_VERBOSE, F("WiFi.status(): %d"), WiFi.status()); - Debug.print(DBG_ERROR, F("Connection to \"%s\" lost."), _ssid); + Debug.print(DBG_ERROR, F("Connection to \"%s\" lost."), _ssid.c_str()); #endif if (_keep_alive) { diff --git a/src/Arduino_WiFiConnectionHandler.h b/src/Arduino_WiFiConnectionHandler.h index 56670793..986376a9 100644 --- a/src/Arduino_WiFiConnectionHandler.h +++ b/src/Arduino_WiFiConnectionHandler.h @@ -50,10 +50,10 @@ class WiFiConnectionHandler : public ConnectionHandler virtual NetworkConnectionState update_handleDisconnecting() override; virtual NetworkConnectionState update_handleDisconnected () override; - private: + String _ssid; + String _pass; - char const * _ssid; - char const * _pass; + private: WiFiUDP _wifi_udp; WiFiClient _wifi_client; diff --git a/src/Arduino_WiFiConnectionHandlerDynamic.cpp b/src/Arduino_WiFiConnectionHandlerDynamic.cpp index fc827219..27716b23 100644 --- a/src/Arduino_WiFiConnectionHandlerDynamic.cpp +++ b/src/Arduino_WiFiConnectionHandlerDynamic.cpp @@ -27,141 +27,20 @@ CTOR/DTOR ******************************************************************************/ -WiFiConnectionHandlerDynamic::WiFiConnectionHandlerDynamic(bool const keep_alive) -: ConnectionHandler{keep_alive} +WiFiConnectionHandlerDynamic::WiFiConnectionHandlerDynamic(bool const keep_alive) : WiFiConnectionHandler{nullptr, nullptr, keep_alive} { - _current_net_connection_state = NetworkConnectionState::CLOSED; -} -void WiFiConnectionHandlerDynamic::setWiFiCredentials(String ssid, String pass){ - _ssid = ssid; - _pass = pass; - _current_net_connection_state = NetworkConnectionState::INIT; -} -/****************************************************************************** - PUBLIC MEMBER FUNCTIONS - ******************************************************************************/ -unsigned long WiFiConnectionHandlerDynamic::getTime() -{ -#if !defined(BOARD_ESP8266) && !defined(ESP32) - return WiFi.getTime(); -#else - return 0; -#endif } /****************************************************************************** - PROTECTED MEMBER FUNCTIONS + PUBLIC MEMBER FUNCTIONS ******************************************************************************/ -NetworkConnectionState WiFiConnectionHandlerDynamic::update_handleInit() +void WiFiConnectionHandlerDynamic::setWiFiCredentials(String ssid, String pass { -#if !defined(BOARD_ESP8266) && !defined(ESP32) -#if !defined(__AVR__) - Debug.print(DBG_INFO, F("WiFi.status(): %d"), WiFi.status()); -#endif - if (WiFi.status() == NETWORK_HARDWARE_ERROR) - { -#if !defined(__AVR__) - Debug.print(DBG_ERROR, F("WiFi Hardware failure.\nMake sure you are using a WiFi enabled board/shield.")); - Debug.print(DBG_ERROR, F("Then reset and retry.")); -#endif - return NetworkConnectionState::ERROR; - } -#if !defined(__AVR__) - Debug.print(DBG_ERROR, F("Current WiFi Firmware: %s"), WiFi.firmwareVersion()); -#endif - -#if defined(WIFI_FIRMWARE_VERSION_REQUIRED) - if (WiFi.firmwareVersion() < WIFI_FIRMWARE_VERSION_REQUIRED) - { -#if !defined(__AVR__) - Debug.print(DBG_ERROR, F("Latest WiFi Firmware: %s"), WIFI_FIRMWARE_VERSION_REQUIRED); - Debug.print(DBG_ERROR, F("Please update to the latest version for best performance.")); -#endif - delay(5000); - } -#endif - -#else - Debug.print(DBG_ERROR, F("WiFi status ESP: %d"), WiFi.status()); - WiFi.disconnect(); - delay(300); - WiFi.begin(_ssid.c_str(), _pass.c_str()); - delay(1000); -#endif /* #if !defined(BOARD_ESP8266) && !defined(ESP32) */ - - return NetworkConnectionState::CONNECTING; -} - -NetworkConnectionState WiFiConnectionHandlerDynamic::update_handleConnecting() -{ -#if !defined(BOARD_ESP8266) && !defined(ESP32) - if (WiFi.status() != WL_CONNECTED) - { - WiFi.begin(_ssid.c_str(), _pass.c_str()); - } -#endif /* ifndef BOARD_ESP8266 */ - - if (WiFi.status() != NETWORK_CONNECTED) - { -#if !defined(__AVR__) - Debug.print(DBG_ERROR, F("Connection to \"%s\" failed"), _ssid.c_str()); - Debug.print(DBG_INFO, F("Retrying in \"%d\" milliseconds"), CHECK_INTERVAL_TABLE[static_cast(NetworkConnectionState::CONNECTING)]); -#endif - return NetworkConnectionState::CONNECTING; - } - else - { -#if !defined(__AVR__) - Debug.print(DBG_INFO, F("Connected to \"%s\""), _ssid.c_str()); -#endif -#if defined(BOARD_ESP8266) || defined(ESP32) - configTime(0, 0, "time.arduino.cc", "pool.ntp.org", "time.nist.gov"); -#endif - return NetworkConnectionState::CONNECTED; - } -} - -NetworkConnectionState WiFiConnectionHandlerDynamic::update_handleConnected() -{ - if (WiFi.status() != WL_CONNECTED) - { -#if !defined(__AVR__) - Debug.print(DBG_VERBOSE, F("WiFi.status(): %d"), WiFi.status()); - Debug.print(DBG_ERROR, F("Connection to \"%s\" lost."), _ssid.c_str()); -#endif - if (_keep_alive) - { -#if !defined(__AVR__) - Debug.print(DBG_ERROR, F("Attempting reconnection")); -#endif - } - - return NetworkConnectionState::DISCONNECTED; - } - return NetworkConnectionState::CONNECTED; -} - -NetworkConnectionState WiFiConnectionHandlerDynamic::update_handleDisconnecting() -{ - WiFi.disconnect(); - return NetworkConnectionState::DISCONNECTED; -} - -NetworkConnectionState WiFiConnectionHandlerDynamic::update_handleDisconnected() -{ -#if !defined(BOARD_ESP8266) && !defined(ESP32) - WiFi.end(); -#endif /* ifndef BOARD_ESP8266 */ - if (_keep_alive) - { - return NetworkConnectionState::INIT; - } - else - { - return NetworkConnectionState::CLOSED; - } + _ssid = ssid; + _pass = pass; + _current_net_connection_state = NetworkConnectionState::INIT; } #endif /* #ifdef BOARD_HAS_WIFI */ diff --git a/src/Arduino_WiFiConnectionHandlerDynamic.h b/src/Arduino_WiFiConnectionHandlerDynamic.h index a30d8391..a778f144 100644 --- a/src/Arduino_WiFiConnectionHandlerDynamic.h +++ b/src/Arduino_WiFiConnectionHandlerDynamic.h @@ -22,7 +22,7 @@ INCLUDE ******************************************************************************/ -#include "Arduino_ConnectionHandler.h" +#include "Arduino_WiFiConnectionHandler.h" #ifdef BOARD_HAS_WIFI /* Only compile if the board has WiFi */ @@ -30,33 +30,14 @@ CLASS DECLARATION ******************************************************************************/ -class WiFiConnectionHandlerDynamic : public ConnectionHandler +class WiFiConnectionHandlerDynamic : public WiFiConnectionHandler { public: WiFiConnectionHandlerDynamic(bool const keep_alive = true); void setWiFiCredentials(String ssid, String pass); - virtual unsigned long getTime() override; - virtual Client & getClient() override{ return _wifi_client; } - virtual UDP & getUDP() override { return _wifi_udp; } - - protected: - - virtual NetworkConnectionState update_handleInit () override; - virtual NetworkConnectionState update_handleConnecting () override; - virtual NetworkConnectionState update_handleConnected () override; - virtual NetworkConnectionState update_handleDisconnecting() override; - virtual NetworkConnectionState update_handleDisconnected () override; - - private: - - String _ssid; - String _pass; - - WiFiUDP _wifi_udp; - WiFiClient _wifi_client; }; #endif /* #ifdef BOARD_HAS_WIFI */ From 69a3a3b7f4b0020ab7995f29773e0f307fef0465 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Wed, 26 May 2021 13:40:52 +0200 Subject: [PATCH 5/5] Adding missing parenthesis. --- src/Arduino_WiFiConnectionHandlerDynamic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Arduino_WiFiConnectionHandlerDynamic.cpp b/src/Arduino_WiFiConnectionHandlerDynamic.cpp index 27716b23..a9e96098 100644 --- a/src/Arduino_WiFiConnectionHandlerDynamic.cpp +++ b/src/Arduino_WiFiConnectionHandlerDynamic.cpp @@ -36,7 +36,7 @@ WiFiConnectionHandlerDynamic::WiFiConnectionHandlerDynamic(bool const keep_alive PUBLIC MEMBER FUNCTIONS ******************************************************************************/ -void WiFiConnectionHandlerDynamic::setWiFiCredentials(String ssid, String pass +void WiFiConnectionHandlerDynamic::setWiFiCredentials(String ssid, String pass) { _ssid = ssid; _pass = pass;