Skip to content

Commit 46b9129

Browse files
committed
ArduinoCloudTCP: print BearSSL error code
1 parent 7d4e9e0 commit 46b9129

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ArduinoIoTCloudTCP.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,11 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_ConnectMqttBroker()
288288
/* Can't connect to the broker. Wait: 2s -> 4s -> 8s -> 16s -> 32s -> 32s ... */
289289
_connection_attempt.retry();
290290

291+
#if defined (BOARD_STM32H7) && defined(BOARD_HAS_ECCX08)
292+
DEBUG_ERROR("ArduinoIoTCloudTCP::%s could not connect to %s:%d Mqtt error: %d TLS error: %d", __FUNCTION__, _brokerAddress.c_str(), _brokerPort, _mqttClient.connectError(), _brokerClient.errorCode());
293+
#else
291294
DEBUG_ERROR("ArduinoIoTCloudTCP::%s could not connect to %s:%d Error: %d", __FUNCTION__, _brokerAddress.c_str(), _brokerPort, _mqttClient.connectError());
295+
#endif
292296
DEBUG_VERBOSE("ArduinoIoTCloudTCP::%s %d next connection attempt in %d ms", __FUNCTION__, _connection_attempt.getRetryCount(), _connection_attempt.getWaitTime());
293297
/* Go back to ConnectPhy and retry to get time from network (invalid time for SSL handshake?)*/
294298
return State::ConnectPhy;

0 commit comments

Comments
 (0)