Skip to content

Commit 86b1170

Browse files
committed
Prevent execution of cloud firmware if a nina firmware < 1.4.2 is present.
1 parent 4865f50 commit 86b1170

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/ArduinoIoTCloudTCP.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,15 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort)
103103
_brokerAddress = brokerAddress;
104104
_brokerPort = brokerPort;
105105

106+
#if defined(__AVR__)
107+
String const nina_fw_version = WiFi.firmwareVersion();
108+
if (nina_fw_version < "1.4.2")
109+
{
110+
DEBUG_ERROR("ArduinoIoTCloudTCP::%s NINA firmware needs to be >= 1.4.2 to support cloud on Uno WiFi Rev. 2, current %s", __FUNCTION__, nina_fw_version.c_str());
111+
for(;;) { }
112+
}
113+
#endif /* AVR */
114+
106115
#if OTA_ENABLED && !defined(__AVR__)
107116
/* Calculate the SHA256 checksum over the firmware stored in the flash of the
108117
* MCU. Note: As we don't know the length per-se we read chunks of the flash

0 commit comments

Comments
 (0)