From ac34aa5dabd23916a22b8db018731b738d91b274 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Wed, 3 Mar 2021 15:27:39 +0100 Subject: [PATCH 1/2] This change enabled BearSSL offload for Arduino MKR WiFi 1010 and Nano 33 IoT. --- src/AIoTC_Config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AIoTC_Config.h b/src/AIoTC_Config.h index 05e24f03a..e9270adb6 100644 --- a/src/AIoTC_Config.h +++ b/src/AIoTC_Config.h @@ -113,14 +113,14 @@ #endif #if defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKR1000) || \ - defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || \ defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_PORTENTA_H7_M7) || \ defined(ARDUINO_PORTENTA_H7_M4) #define BOARD_HAS_ECCX08 #define HAS_TCP #endif -#if defined(ARDUINO_AVR_UNO_WIFI_REV2) +#if defined(ARDUINO_AVR_UNO_WIFI_REV2) || \ + defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) #define BOARD_HAS_OFFLOADED_ECCX08 #define HAS_TCP #endif From 7d646050b605dce6314d9af85d916d2bf2b10803 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Mon, 15 Mar 2021 14:02:02 +0100 Subject: [PATCH 2/2] Bugfix: Don't call ECCX08::end() as it disable the I2C module. This has the unpleasant side-effect that any future access to the I2C bus is trying to access an uninitialized I2C module and gets stuck in a loop. --- src/ArduinoIoTCloudTCP.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ArduinoIoTCloudTCP.cpp b/src/ArduinoIoTCloudTCP.cpp index 4d6d294e4..7d1c96fc3 100644 --- a/src/ArduinoIoTCloudTCP.cpp +++ b/src/ArduinoIoTCloudTCP.cpp @@ -187,7 +187,6 @@ int ArduinoIoTCloudTCP::begin(String brokerAddress, uint16_t brokerPort) DEBUG_ERROR("CryptoUtil::readDeviceId(...) failed."); return 0; } - ECCX08.end(); #endif #ifdef BOARD_HAS_ECCX08