Skip to content

Commit 98efd08

Browse files
committed
- cleanup WiFi and GSM ConnectionManager
- changed library version to 0.5.1 (new feature: GSM)
1 parent 096022a commit 98efd08

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ArduinoIoTCloud
2-
version=0.4.1
2+
version=0.5.1
33
author=Arduino
44
maintainer=Arduino <[email protected]>
55
sentence=This library allows to connect to the Arduino IoT Cloud service.

src/GSMConnectionManager.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void GSMConnectionManager::changeConnectionState(NetworkConnectionState _newStat
113113
newInterval = CHECK_INTERVAL_DISCONNECTED;
114114
break;
115115
case CONNECTION_STATE_ERROR:
116-
debugMessage("GPRS attach failed\nMake sure the antenna is connected", 0);
116+
debugMessage("GPRS attach failed\nMake sure the antenna is connected and reset your board.", 0);
117117
break;
118118
}
119119
connectionTickTimeInterval = newInterval;
@@ -137,6 +137,7 @@ void GSMConnectionManager::check() {
137137
sprintf(msgBuffer, "GPRS.attachGPRS(): %d", networkStatus);
138138
debugMessage(msgBuffer, 3);
139139
if (networkStatus == GSM3_NetworkStatus_t::ERROR) {
140+
// NO FURTHER ACTION WILL FOLLOW THIS
140141
changeConnectionState(CONNECTION_STATE_ERROR);
141142
return;
142143
}

src/WiFiConnectionManager.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ void WiFiConnectionManager::changeConnectionState(NetworkConnectionState _newSta
9393
debugMessage("Attempting reconnection", 0);
9494
newInterval = CHECK_INTERVAL_DISCONNECTED;
9595
break;
96+
case CONNECTION_STATE_ERROR:
97+
debugMessage("WiFi Hardware failure.\nMake sure you are using a WiFi enabled board/shield.", 0);
98+
debugMessage("Then reset and retry.", 0);
99+
break;
96100
}
97101
connectionTickTimeInterval = newInterval;
98102
lastConnectionTickTime = millis();
@@ -111,8 +115,7 @@ void WiFiConnectionManager::check() {
111115
sprintf(msgBuffer, "WiFi.status(): %d", networkStatus);
112116
debugMessage(msgBuffer, 2);
113117
if (networkStatus == NETWORK_HARDWARE_ERROR) {
114-
debugMessage("WiFi Hardware not available\nMake sure you are using a WiFi enabled board/shield", 0);
115-
// don't continue:
118+
// NO FURTHER ACTION WILL FOLLOW THIS
116119
changeConnectionState(CONNECTION_STATE_ERROR);
117120
lastConnectionTickTime = now;
118121
return;

0 commit comments

Comments
 (0)