Skip to content

Only set hidden property OTA_CAP to true if the nina firmware version is >= 1.4.1 #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/ArduinoIoTCloudTCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,6 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort)
_dataTopicIn = getTopic_datain();

#if OTA_ENABLED
#if OTA_STORAGE_SNU
_ota_cap = true;
#endif
addPropertyReal(_ota_cap, "OTA_CAP", Permission::Read);
addPropertyReal(_ota_error, "OTA_ERROR", Permission::Read);
addPropertyReal(_ota_img_sha256, "OTA_SHA256", Permission::Read);
Expand All @@ -150,8 +147,11 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort)
#if OTA_STORAGE_SNU
String const nina_fw_version = WiFi.firmwareVersion();
if (nina_fw_version < "1.4.1") {
DBG_ERROR(F("ArduinoIoTCloudTCP::%s error nina firmware needs to be >= 1.4.1, current %s"), __FUNCTION__, nina_fw_version.c_str());
return 0;
_ota_cap = false;
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());
}
else {
_ota_cap = true;
}
#endif /* OTA_STORAGE_SNU */

Expand Down