From 3beab0383cef4cf8265721417082088eaf5a54ed Mon Sep 17 00:00:00 2001 From: pshank <31517807+pshank@users.noreply.github.com> Date: Thu, 16 Nov 2017 16:35:01 -0600 Subject: [PATCH 1/4] Update scripts for ESP2866 to use HTTPS --- Exosite.cpp | 6 +++++- Exosite.h | 4 ++-- .../Murano-SmartLightBulb-ThingDevBoard.ino | 8 ++++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Exosite.cpp b/Exosite.cpp index 78bf5e2..ad5d68a 100644 --- a/Exosite.cpp +++ b/Exosite.cpp @@ -94,6 +94,8 @@ boolean Exosite::writeRead(const char* writeString, const char* readString, char client->stop(); #ifdef SL_DRIVER_VERSION client->sslConnect(serverName,443); + #if defined(ESP8266) + client->sslConnect(serverName,443);3 #else /*CC3200*/ client->connect(serverName,80); #endif /*CC3200*/ @@ -962,6 +964,8 @@ boolean Exosite::provision(const char* vendorString, const char* modelString, co strlen(snParameter) + 1; char *writeString = (char*)malloc(sizeof(char) * (writeStringLen)); + + Serial.print(F("HELLO YOU ARE HERE NOW")) // Assemble Parameter String varPtr = writeString; @@ -982,7 +986,7 @@ boolean Exosite::provision(const char* vendorString, const char* modelString, co if (!client->connected()) { Serial.print("No Existing Connection, Opening One..."); client->stop(); - client->connect(serverName,80); + client->connect(serverName,443); } if (client->connected()) { diff --git a/Exosite.h b/Exosite.h index 565687b..c5b55ad 100644 --- a/Exosite.h +++ b/Exosite.h @@ -33,7 +33,7 @@ // Select a Debug Level: //#define EXOSITEDEBUG 1 //#define EXOSITEDEBUG 2 -//#define EXOSITEDEBUG 3 +#define EXOSITEDEBUG 3 // Enable or Disable Direct from ROM Sending // Disabled on ESP because of performance issue and lack of need. @@ -128,4 +128,4 @@ class Exosite unsigned long timestamp(); }; -#endif \ No newline at end of file +#endif diff --git a/examples/Murano-SmartLightBulb-ThingDevBoard/Murano-SmartLightBulb-ThingDevBoard.ino b/examples/Murano-SmartLightBulb-ThingDevBoard/Murano-SmartLightBulb-ThingDevBoard.ino index 30c251b..75db8c2 100644 --- a/examples/Murano-SmartLightBulb-ThingDevBoard/Murano-SmartLightBulb-ThingDevBoard.ino +++ b/examples/Murano-SmartLightBulb-ThingDevBoard/Murano-SmartLightBulb-ThingDevBoard.ino @@ -41,7 +41,7 @@ * WIFI Configuration Variables - Change these variables to your own settings. *=============================================================================*/ const char ssid[] = ""; -const char password[] = ""; +const char password[] = " Date: Thu, 16 Nov 2017 17:12:43 -0600 Subject: [PATCH 2/4] Fixed mistakes from first commit --- Exosite.cpp | 6 ++---- Exosite.h | 4 ++-- .../Murano-SmartLightBulb-ThingDevBoard.ino | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Exosite.cpp b/Exosite.cpp index ad5d68a..a4c9a8d 100644 --- a/Exosite.cpp +++ b/Exosite.cpp @@ -95,7 +95,7 @@ boolean Exosite::writeRead(const char* writeString, const char* readString, char #ifdef SL_DRIVER_VERSION client->sslConnect(serverName,443); #if defined(ESP8266) - client->sslConnect(serverName,443);3 + client->sslConnect(serverName,443); #else /*CC3200*/ client->connect(serverName,80); #endif /*CC3200*/ @@ -541,7 +541,7 @@ boolean Exosite::longPoll(const int timeoutRequest, const char* readString, char Serial.print("No Existing Connection, Opening One..."); client->stop(); #ifdef SL_DRIVER_VERSION - client->sslConnect(serverName,443); + client->connect(serverName,443); #else /*CC3200*/ client->connect(serverName,80); #endif /*CC3200*/ @@ -964,8 +964,6 @@ boolean Exosite::provision(const char* vendorString, const char* modelString, co strlen(snParameter) + 1; char *writeString = (char*)malloc(sizeof(char) * (writeStringLen)); - - Serial.print(F("HELLO YOU ARE HERE NOW")) // Assemble Parameter String varPtr = writeString; diff --git a/Exosite.h b/Exosite.h index c5b55ad..3119075 100644 --- a/Exosite.h +++ b/Exosite.h @@ -28,12 +28,12 @@ #ifndef Exosite_h #define Exosite_h -#define ACTIVATOR_VERSION "2.5.3" +#define ACTIVATOR_VERSION "2.6.1" // Select a Debug Level: //#define EXOSITEDEBUG 1 //#define EXOSITEDEBUG 2 -#define EXOSITEDEBUG 3 +//#define EXOSITEDEBUG 3 // Enable or Disable Direct from ROM Sending // Disabled on ESP because of performance issue and lack of need. diff --git a/examples/Murano-SmartLightBulb-ThingDevBoard/Murano-SmartLightBulb-ThingDevBoard.ino b/examples/Murano-SmartLightBulb-ThingDevBoard/Murano-SmartLightBulb-ThingDevBoard.ino index 75db8c2..6cd8c71 100644 --- a/examples/Murano-SmartLightBulb-ThingDevBoard/Murano-SmartLightBulb-ThingDevBoard.ino +++ b/examples/Murano-SmartLightBulb-ThingDevBoard/Murano-SmartLightBulb-ThingDevBoard.ino @@ -41,7 +41,7 @@ * WIFI Configuration Variables - Change these variables to your own settings. *=============================================================================*/ const char ssid[] = ""; -const char password[] = " Date: Thu, 16 Nov 2017 17:17:07 -0600 Subject: [PATCH 3/4] Fixed Another mistake from previous commits --- Exosite.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Exosite.cpp b/Exosite.cpp index a4c9a8d..39c00db 100644 --- a/Exosite.cpp +++ b/Exosite.cpp @@ -95,7 +95,7 @@ boolean Exosite::writeRead(const char* writeString, const char* readString, char #ifdef SL_DRIVER_VERSION client->sslConnect(serverName,443); #if defined(ESP8266) - client->sslConnect(serverName,443); + client->connect(serverName,443); #else /*CC3200*/ client->connect(serverName,80); #endif /*CC3200*/ @@ -541,7 +541,7 @@ boolean Exosite::longPoll(const int timeoutRequest, const char* readString, char Serial.print("No Existing Connection, Opening One..."); client->stop(); #ifdef SL_DRIVER_VERSION - client->connect(serverName,443); + client->sslCconnect(serverName,443); #else /*CC3200*/ client->connect(serverName,80); #endif /*CC3200*/ From 4683237dd51d55f2012a5c2deb04ceb93ca7bd92 Mon Sep 17 00:00:00 2001 From: pshank <31517807+pshank@users.noreply.github.com> Date: Thu, 16 Nov 2017 17:19:11 -0600 Subject: [PATCH 4/4] Fixed mistakes from previous Commits. Update to use HTTPS --- Exosite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Exosite.cpp b/Exosite.cpp index 39c00db..fc394e2 100644 --- a/Exosite.cpp +++ b/Exosite.cpp @@ -541,7 +541,7 @@ boolean Exosite::longPoll(const int timeoutRequest, const char* readString, char Serial.print("No Existing Connection, Opening One..."); client->stop(); #ifdef SL_DRIVER_VERSION - client->sslCconnect(serverName,443); + client->sslConnect(serverName,443); #else /*CC3200*/ client->connect(serverName,80); #endif /*CC3200*/