Skip to content

Commit 44f92b0

Browse files
committed
Add WiFi firmware version check
1 parent 0d635ef commit 44f92b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ArduinoIoTCloudTCP.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,12 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_ConnectMqttBroker()
327327
reconnection_retry_delay = min(reconnection_retry_delay, static_cast<unsigned long>(AIOT_CONFIG_MAX_RECONNECTION_RETRY_DELAY_ms));
328328
_next_connection_attempt_tick = millis() + reconnection_retry_delay;
329329

330+
#if defined(ARDUINO_UNOWIFIR4)
331+
if (String(WiFi.firmwareVersion()) < String("0.2.0")) {
332+
DEBUG_ERROR("ArduinoIoTCloudTCP::%s In order to connect to Arduino IoT Cloud, WiFI firmware needs to be >= 0.2.0, current %s", __FUNCTION__, WiFi.firmwareVersion());
333+
}
334+
#endif
335+
330336
DEBUG_ERROR("ArduinoIoTCloudTCP::%s could not connect to %s:%d", __FUNCTION__, _brokerAddress.c_str(), _brokerPort);
331337
DEBUG_ERROR("ArduinoIoTCloudTCP::%s %d connection attempt at tick time %d", __FUNCTION__, _last_connection_attempt_cnt, _next_connection_attempt_tick);
332338
return State::ConnectPhy;

0 commit comments

Comments
 (0)