1919 * INCLUDE
2020 ******************************************************************************/
2121
22- #include < ArduinoIoTCloud_Config .h>
22+ #include < AIoTC_Config .h>
2323
2424#ifdef HAS_TCP
2525#include < ArduinoIoTCloudTCP.h>
@@ -119,9 +119,9 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort)
119119 _brokerPort = brokerPort;
120120
121121 #ifdef BOARD_HAS_ECCX08
122- if (!ECCX08.begin ()) { Debug. print ( DBG_ERROR, " Cryptography processor failure. Make sure you have a compatible board." ); return 0 ; }
123- if (!CryptoUtil::readDeviceId (ECCX08, getDeviceId (), ECCX08Slot::DeviceId)) { Debug. print ( DBG_ERROR, " Cryptography processor read failure." ); return 0 ; }
124- if (!CryptoUtil::reconstructCertificate (_eccx08_cert, getDeviceId (), ECCX08Slot::Key, ECCX08Slot::CompressedCertificate, ECCX08Slot::SerialNumberAndAuthorityKeyIdentifier)) { Debug. print ( DBG_ERROR, " Cryptography certificate reconstruction failure." ); return 0 ; }
122+ if (!ECCX08.begin ()) { DBG_ERROR ( " Cryptography processor failure. Make sure you have a compatible board." ); return 0 ; }
123+ if (!CryptoUtil::readDeviceId (ECCX08, getDeviceId (), ECCX08Slot::DeviceId)) { DBG_ERROR ( " Cryptography processor read failure." ); return 0 ; }
124+ if (!CryptoUtil::reconstructCertificate (_eccx08_cert, getDeviceId (), ECCX08Slot::Key, ECCX08Slot::CompressedCertificate, ECCX08Slot::SerialNumberAndAuthorityKeyIdentifier)) { DBG_ERROR ( " Cryptography certificate reconstruction failure." ); return 0 ; }
125125 _sslClient.setClient (_connection->getClient ());
126126 _sslClient.setEccSlot (static_cast <int >(ECCX08Slot::Key), _eccx08_cert.bytes (), _eccx08_cert.length ());
127127 #elif defined(BOARD_ESP)
@@ -219,10 +219,10 @@ int ArduinoIoTCloudTCP::connected()
219219
220220void ArduinoIoTCloudTCP::printDebugInfo ()
221221{
222- Debug. print ( DBG_INFO, " ***** Arduino IoT Cloud - configuration info *****" );
223- Debug. print ( DBG_INFO, " Device ID: %s" , getDeviceId ().c_str ());
224- Debug. print ( DBG_INFO, " Thing ID: %s" , getThingId ().c_str ());
225- Debug. print ( DBG_INFO, " MQTT Broker: %s:%d" , _brokerAddress.c_str (), _brokerPort);
222+ DBG_INFO ( " ***** Arduino IoT Cloud - configuration info *****" );
223+ DBG_INFO ( " Device ID: %s" , getDeviceId ().c_str ());
224+ DBG_INFO ( " Thing ID: %s" , getThingId ().c_str ());
225+ DBG_INFO ( " MQTT Broker: %s:%d" , _brokerAddress.c_str (), _brokerPort);
226226}
227227
228228#if OTA_ENABLED
@@ -342,7 +342,7 @@ ArduinoIoTConnectionStatus ArduinoIoTCloudTCP::checkCloudConnection()
342342 case ArduinoIoTConnectionStatus::DISCONNECTED: next_iot_status = ArduinoIoTConnectionStatus::RECONNECTING; break ;
343343 case ArduinoIoTConnectionStatus::CONNECTING:
344344 {
345- Debug. print ( DBG_INFO, " Arduino IoT Cloud connecting ..." );
345+ DBG_INFO ( " Arduino IoT Cloud connecting ..." );
346346 int const ret = connect ();
347347 if (ret == CONNECT_SUCCESS)
348348 {
@@ -352,14 +352,14 @@ ArduinoIoTConnectionStatus ArduinoIoTCloudTCP::checkCloudConnection()
352352 }
353353 else if (ret == CONNECT_FAILURE_SUBSCRIBE)
354354 {
355- Debug. print ( DBG_ERROR, " ERROR - Please verify your THING ID" );
355+ DBG_ERROR ( " ERROR - Please verify your THING ID" );
356356 }
357357 }
358358 break ;
359359
360360 case ArduinoIoTConnectionStatus::RECONNECTING:
361361 {
362- Debug. print ( DBG_INFO, " Arduino IoT Cloud reconnecting ..." );
362+ DBG_INFO ( " Arduino IoT Cloud reconnecting ..." );
363363 if (reconnect () == CONNECT_SUCCESS)
364364 {
365365 next_iot_status = ArduinoIoTConnectionStatus::CONNECTED;
0 commit comments