From 2e7c72724dd4126ad479d4f1107764df634208cb Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Tue, 11 Jun 2019 17:48:53 +0200 Subject: [PATCH] Fix Arduino compile errors Fix Arduino compile errors --- sonoff/WiFiClientSecureLightBearSSL.cpp | 9 +++++---- sonoff/my_user_config.h | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sonoff/WiFiClientSecureLightBearSSL.cpp b/sonoff/WiFiClientSecureLightBearSSL.cpp index 6f4154fc8..50fb245c6 100644 --- a/sonoff/WiFiClientSecureLightBearSSL.cpp +++ b/sonoff/WiFiClientSecureLightBearSSL.cpp @@ -20,11 +20,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#define LWIP_INTERNAL - #include "my_user_config.h" #ifdef USE_MQTT_TLS +#define DEBUG_TLS + +#define LWIP_INTERNAL + #include #include #include @@ -46,8 +48,7 @@ extern "C" { #include #include "c_types.h" -#define DEBUG_TLS - +#include #ifndef ARDUINO_ESP8266_RELEASE_2_5_2 #undef DEBUG_TLS #endif diff --git a/sonoff/my_user_config.h b/sonoff/my_user_config.h index 6d2da8af0..320c33fdf 100644 --- a/sonoff/my_user_config.h +++ b/sonoff/my_user_config.h @@ -263,6 +263,7 @@ #define HOME_ASSISTANT_DISCOVERY_PREFIX "homeassistant" // Home Assistant discovery prefix // -- MQTT - TLS - AWS IoT ------------------------ +// Using TLS starting with version v6.5.0.16 compilation will only work using platformio. Arduino IDE will fail. //#define USE_MQTT_TLS // Use TLS for MQTT connection (+56.7k code, +6.0k mem and +6.6k additional during connection handshake) //#define USE_MQTT_TLS_CA_CERT // Force full CA validation instead of fingerprints, uses more memory and slower, but simpler to use //#define USE_MQTT_AWS_IOT // Enable MQTT for AWS IoT - requires a private key (+56.7k code, +6.0k mem and +6.6k additional during connection handshake)