From c90acae2ccab1997c844ea189b3db0b66e82bab7 Mon Sep 17 00:00:00 2001 From: Daniel Letscher Date: Thu, 3 Sep 2015 12:14:02 -0500 Subject: [PATCH] v2.3.6 enhanced ESP8266 support --- Exosite.cpp | 7 +++++++ Exosite.h | 6 +++++- Readme.md | 20 ++++++++++++++++++-- library.properties | 2 +- 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/Exosite.cpp b/Exosite.cpp index efb290b..3d550b0 100644 --- a/Exosite.cpp +++ b/Exosite.cpp @@ -35,7 +35,9 @@ Exosite::Exosite(Client *_client) { client = _client; + #if !defined(ESP8266) fetchNVCIK(); + #endif } Exosite::Exosite(const char *_cik, Client *_client) @@ -50,6 +52,11 @@ Exosite::Exosite(const String _cik, Client *_client) client = _client; } +#if defined(ESP8266) +void Exosite::begin(){ + fetchNVCIK(); +} +#endif /*============================================================================== * writeRead * diff --git a/Exosite.h b/Exosite.h index 218cb8b..eb97460 100644 --- a/Exosite.h +++ b/Exosite.h @@ -30,7 +30,7 @@ #define serverName "m2.exosite.com" -#define ACTIVATOR_VERSION F("2.3.4") +#define ACTIVATOR_VERSION F("2.3.6") // Select a Debug Level: //#define EXOSITEDEBUG 1 @@ -83,6 +83,10 @@ class Exosite Exosite(const char *_cik, Client *_client); Exosite(const String _cik, Client *_client); + #if defined(ESP8266) + void begin(); + #endif + // Current Methods boolean writeRead(const char* writeString,const char* readString, char** returnString); boolean writeRead(const String &writeString, const String &readString, String &returnString); diff --git a/Readme.md b/Readme.md index 35eb6ed..202666e 100644 --- a/Readme.md +++ b/Readme.md @@ -81,11 +81,11 @@ writeRead --------- ```cpp -boolean Exosite::writeRead(char* writeString, char* readString, char** returnString) +boolean Exosite::writeRead(char* writeString, char* readString, char** returnString); ``` ```cpp -boolean Exosite::writeRead(String writeString, String readString, String &returnString) +boolean Exosite::writeRead(String writeString, String readString, String &returnString); ``` `writeString`: This sets the values to write to certain datasources. eg. "alias3=value3&alias4=value4" @@ -106,6 +106,19 @@ boolean Exosite::provision(char* vendorString, char* modelString, char* snString `snString`: The string that identifies the device's serial number. +ESP8266 Only +------------ + +```cpp +void Exosite::begin(); +``` + +To be used after `EEPROM.begin()` to allow for proper device provisioning. + +Use only if using the following constructor: +```cpp +Exosite(Client *_client); +``` Migration from V1 ================= @@ -119,6 +132,9 @@ You will also need to remove `exosite.init();` and add `Ethernet.begin(macData); Release Info ============ +**v2.3.6 - Release 2015-09-03** + - Add method `Exosite::begin()` for ESP8266 boards only to be used after `EEPROM.begin()` to fix provisioning scenarios + **v2.3.5 - Release 2015-08-18** - Removed `Serial.print()` statements in `fetchNVCIK()` to prevent printing to serial port before `Serial.begin()` diff --git a/library.properties b/library.properties index 2c73a21..7ce14d5 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Exosite -version=2.3.5 +version=2.3.6 author=Patrick Barrett maintainer=Patrick Barrett sentence=Easily interface with Exosite's simple data APIs.