Skip to content

Commit 4376a5b

Browse files
authored
Merge pull request #196 from arduino-libraries/fix-nina-version-check
Only set hidden property OTA_CAP to true if the nina firmware version is >= 1.4.1
2 parents 36bde89 + 1734221 commit 4376a5b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/ArduinoIoTCloudTCP.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,6 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort)
137137
_dataTopicIn = getTopic_datain();
138138

139139
#if OTA_ENABLED
140-
#if OTA_STORAGE_SNU
141-
_ota_cap = true;
142-
#endif
143140
addPropertyReal(_ota_cap, "OTA_CAP", Permission::Read);
144141
addPropertyReal(_ota_error, "OTA_ERROR", Permission::Read);
145142
addPropertyReal(_ota_img_sha256, "OTA_SHA256", Permission::Read);
@@ -150,8 +147,11 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort)
150147
#if OTA_STORAGE_SNU
151148
String const nina_fw_version = WiFi.firmwareVersion();
152149
if (nina_fw_version < "1.4.1") {
153-
DBG_ERROR(F("ArduinoIoTCloudTCP::%s error nina firmware needs to be >= 1.4.1, current %s"), __FUNCTION__, nina_fw_version.c_str());
154-
return 0;
150+
_ota_cap = false;
151+
DBG_WARNING(F("ArduinoIoTCloudTCP::%s In order to be ready for cloud OTA, NINA firmware needs to be >= 1.4.1, current %s"), __FUNCTION__, nina_fw_version.c_str());
152+
}
153+
else {
154+
_ota_cap = true;
155155
}
156156
#endif /* OTA_STORAGE_SNU */
157157

0 commit comments

Comments
 (0)