19
19
* INCLUDE
20
20
******************************************************************************/
21
21
22
- #include < ArduinoIoTCloud_Config .h>
22
+ #include < AIoTC_Config .h>
23
23
24
24
#ifdef HAS_TCP
25
25
#include < ArduinoIoTCloudTCP.h>
@@ -119,9 +119,9 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort)
119
119
_brokerPort = brokerPort;
120
120
121
121
#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 ; }
125
125
_sslClient.setClient (_connection->getClient ());
126
126
_sslClient.setEccSlot (static_cast <int >(ECCX08Slot::Key), _eccx08_cert.bytes (), _eccx08_cert.length ());
127
127
#elif defined(BOARD_ESP)
@@ -219,10 +219,10 @@ int ArduinoIoTCloudTCP::connected()
219
219
220
220
void ArduinoIoTCloudTCP::printDebugInfo ()
221
221
{
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);
226
226
}
227
227
228
228
#if OTA_ENABLED
@@ -342,7 +342,7 @@ ArduinoIoTConnectionStatus ArduinoIoTCloudTCP::checkCloudConnection()
342
342
case ArduinoIoTConnectionStatus::DISCONNECTED: next_iot_status = ArduinoIoTConnectionStatus::RECONNECTING; break ;
343
343
case ArduinoIoTConnectionStatus::CONNECTING:
344
344
{
345
- Debug. print ( DBG_INFO, " Arduino IoT Cloud connecting ..." );
345
+ DBG_INFO ( " Arduino IoT Cloud connecting ..." );
346
346
int const ret = connect ();
347
347
if (ret == CONNECT_SUCCESS)
348
348
{
@@ -352,14 +352,14 @@ ArduinoIoTConnectionStatus ArduinoIoTCloudTCP::checkCloudConnection()
352
352
}
353
353
else if (ret == CONNECT_FAILURE_SUBSCRIBE)
354
354
{
355
- Debug. print ( DBG_ERROR, " ERROR - Please verify your THING ID" );
355
+ DBG_ERROR ( " ERROR - Please verify your THING ID" );
356
356
}
357
357
}
358
358
break ;
359
359
360
360
case ArduinoIoTConnectionStatus::RECONNECTING:
361
361
{
362
- Debug. print ( DBG_INFO, " Arduino IoT Cloud reconnecting ..." );
362
+ DBG_INFO ( " Arduino IoT Cloud reconnecting ..." );
363
363
if (reconnect () == CONNECT_SUCCESS)
364
364
{
365
365
next_iot_status = ArduinoIoTConnectionStatus::CONNECTED;
0 commit comments