From 10f0637c5bba64450727e35a262e358914256efa Mon Sep 17 00:00:00 2001 From: Luigi Gubello Date: Tue, 28 Jan 2020 17:46:49 +0100 Subject: [PATCH] Fix SIM not present bug Removing while(1) to block the error message loop. Editing CHECK_INTERVAL_RETRYING value. --- src/Arduino_GSMConnectionHandler.cpp | 1 - src/Arduino_GSMConnectionHandler.h | 2 +- src/Arduino_LoRaConnectionHandler.h | 2 +- src/Arduino_NBConnectionHandler.cpp | 1 - src/Arduino_NBConnectionHandler.h | 2 +- 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Arduino_GSMConnectionHandler.cpp b/src/Arduino_GSMConnectionHandler.cpp index acadcf0e..d514a38b 100644 --- a/src/Arduino_GSMConnectionHandler.cpp +++ b/src/Arduino_GSMConnectionHandler.cpp @@ -64,7 +64,6 @@ void GSMConnectionHandler::init() { changeConnectionState(NetworkConnectionState::CONNECTING); } else { Debug.print(DBG_ERROR, "SIM not present or wrong PIN"); - while (1); } } diff --git a/src/Arduino_GSMConnectionHandler.h b/src/Arduino_GSMConnectionHandler.h index e8bbf240..ec67e314 100644 --- a/src/Arduino_GSMConnectionHandler.h +++ b/src/Arduino_GSMConnectionHandler.h @@ -64,7 +64,7 @@ class GSMConnectionHandler : public TcpIpConnectionHandler { const int CHECK_INTERVAL_INIT = 100; const int CHECK_INTERVAL_CONNECTING = 500; const int CHECK_INTERVAL_CONNECTED = 10000; - const int CHECK_INTERVAL_RETRYING = 5000; + const int CHECK_INTERVAL_RETRYING = 30000; const int CHECK_INTERVAL_DISCONNECTED = 1000; const int CHECK_INTERVAL_ERROR = 500; diff --git a/src/Arduino_LoRaConnectionHandler.h b/src/Arduino_LoRaConnectionHandler.h index ecb31e89..61a312f8 100644 --- a/src/Arduino_LoRaConnectionHandler.h +++ b/src/Arduino_LoRaConnectionHandler.h @@ -64,7 +64,7 @@ class LoRaConnectionHandler : public LPWANConnectionHandler { const int CHECK_INTERVAL_INIT = 100; const int CHECK_INTERVAL_CONNECTING = 500; const int CHECK_INTERVAL_CONNECTED = 10000; - const int CHECK_INTERVAL_RETRYING = 5000; + const int CHECK_INTERVAL_RETRYING = 30000; const int CHECK_INTERVAL_DISCONNECTING = 500; const int CHECK_INTERVAL_DISCONNECTED = 1000; const int CHECK_INTERVAL_ERROR = 500; diff --git a/src/Arduino_NBConnectionHandler.cpp b/src/Arduino_NBConnectionHandler.cpp index 2c46be46..75da631b 100644 --- a/src/Arduino_NBConnectionHandler.cpp +++ b/src/Arduino_NBConnectionHandler.cpp @@ -71,7 +71,6 @@ void NBConnectionHandler::init() { changeConnectionState(NetworkConnectionState::CONNECTING); } else { Debug.print(DBG_ERROR, "SIM not present or wrong PIN"); - while (1); } } diff --git a/src/Arduino_NBConnectionHandler.h b/src/Arduino_NBConnectionHandler.h index ab3822dc..3864acdb 100644 --- a/src/Arduino_NBConnectionHandler.h +++ b/src/Arduino_NBConnectionHandler.h @@ -65,7 +65,7 @@ class NBConnectionHandler : public TcpIpConnectionHandler { const int CHECK_INTERVAL_INIT = 100; const int CHECK_INTERVAL_CONNECTING = 500; const int CHECK_INTERVAL_CONNECTED = 10000; - const int CHECK_INTERVAL_RETRYING = 5000; + const int CHECK_INTERVAL_RETRYING = 30000; const int CHECK_INTERVAL_DISCONNECTED = 1000; const int CHECK_INTERVAL_ERROR = 500;