From d1fcdfd9df12df6b8f1a173096de23ae40f83dce Mon Sep 17 00:00:00 2001 From: Onno-Dirkzwager Date: Tue, 7 May 2019 01:13:12 +0200 Subject: [PATCH 1/5] Update config.h --- src/config.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/config.h b/src/config.h index 44f59189..d3a02fc5 100644 --- a/src/config.h +++ b/src/config.h @@ -119,11 +119,13 @@ #define MAGICEEP "%" - // define for get chip id + #if defined ESP8266 - #define ESP_GETCHIPID ESP.getChipId() - #define ESP_GETFLASHCHIPID ESP.getFlashChipId() + #define ESP_GETCHIPID ESP.getChipId() // define for get chip id + #define ESP_GETFLASHCHIPID ESP.getFlashChipId() // define for get flash chip id + #define ESP_SPIFFSBEGIN SPIFFS.begin() // define for SPIFFS.begin() #elif defined ESP32 #define ESP_GETCHIPID (uint32_t)ESP.getEfuseMac() #define ESP_GETFLASHCHIPID (uint32_t)g_rom_flashchip.device_id + #define ESP_SPIFFSBEGIN SPIFFS.begin(true) #endif From 8eb78a0d99425168299897524dca5c272dcb9f36 Mon Sep 17 00:00:00 2001 From: Onno-Dirkzwager Date: Tue, 7 May 2019 01:15:45 +0200 Subject: [PATCH 2/5] Update IOTAppStory.h --- src/IOTAppStory.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/IOTAppStory.h b/src/IOTAppStory.h index 7192bdca..23e7a24a 100644 --- a/src/IOTAppStory.h +++ b/src/IOTAppStory.h @@ -61,7 +61,7 @@ char deviceName[STRUCT_BNAME_SIZE]; char compDate[STRUCT_COMPDATE_SIZE]; // saved compile date time - #if HTTPS_8266_TYPE == FNGPRINT + #if defined ESP8266 && HTTPS_8266_TYPE == FNGPRINT char sha1[60]; #endif #if CFG_AUTHENTICATE == true @@ -118,7 +118,7 @@ const char HTTP_APP_INFO[] PROGMEM = "{\"l\":\"{l}\", \"v\":\"{v}\", \"n\":\"{n}\", \"m\":\"{m}\", \"t\":\"{t}\"}"; - #if HTTPS_8266_TYPE == FNGPRINT + #if defined ESP8266 && HTTPS_8266_TYPE == FNGPRINT const char HTTP_DEV_INFO[] PROGMEM = "{\"s1\":\"{s1}\", \"s2\":\"{s2}\", \"s3\":\"{s3}\", \"cid\":\"{cid}\", \"fid\":\"{fid}\", \"fss\":\"{fss}\", \"ss\":\"{ss}\", \"fs\":\"{fs}\", \"ab\":\"{ab}\", \"ac\":\"{ac}\", \"mc\":\"{mc}\", \"xf\":\"{xf}\", \"f\":\"{f}\"}"; #else const char HTTP_DEV_INFO[] PROGMEM = "{\"s1\":\"{s1}\", \"s2\":\"{s2}\", \"s3\":\"{s3}\", \"cid\":\"{cid}\", \"fid\":\"{fid}\", \"fss\":\"{fss}\", \"ss\":\"{ss}\", \"fs\":\"{fs}\", \"ab\":\"{ab}\", \"ac\":\"{ac}\", \"mc\":\"{mc}\", \"xf\":\"{xf}\"}"; @@ -146,7 +146,7 @@ {"","",""}, "yourESP", "", - #if HTTPS_8266_TYPE == FNGPRINT + #if defined ESP8266 && HTTPS_8266_TYPE == FNGPRINT HTTPS_FNGPRINT, #endif #if CFG_AUTHENTICATE == true From ac8481ce77b5b3fabba88e3dde0f75ffac11c70d Mon Sep 17 00:00:00 2001 From: Onno-Dirkzwager Date: Tue, 7 May 2019 01:17:09 +0200 Subject: [PATCH 3/5] Update IOTAppStory.cpp --- src/IOTAppStory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/IOTAppStory.cpp b/src/IOTAppStory.cpp index bc6c2b68..e6777894 100644 --- a/src/IOTAppStory.cpp +++ b/src/IOTAppStory.cpp @@ -1392,7 +1392,7 @@ String IOTAppStory::servHdlDevInfo(){ retHtml.replace(F("{cid}"), String(ESP_GETCHIPID)); retHtml.replace(F("{fid}"), String(ESP_GETFLASHCHIPID)); - #if HTTPS_8266_TYPE == FNGPRINT + #if defined ESP8266 && HTTPS_8266_TYPE == FNGPRINT retHtml.replace(F("{f}"), config.sha1); #endif @@ -1647,7 +1647,7 @@ String IOTAppStory::strCertScan(String path){ #endif //Initialize File System - if(!SPIFFS.begin()){ + if(!ESP_SPIFFSBEGIN){ #if DEBUG_LVL >= 3 DEBUG_PRINT(F(" SPIFFS Mount Failed")); #endif From f1aefa37c4d4df9c40b3df0adebb14f1492e92ac Mon Sep 17 00:00:00 2001 From: Onno-Dirkzwager Date: Tue, 7 May 2019 01:17:34 +0200 Subject: [PATCH 4/5] Update configServer.cpp --- src/espressif/configServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/espressif/configServer.cpp b/src/espressif/configServer.cpp index ec9273d3..75e95eab 100644 --- a/src/espressif/configServer.cpp +++ b/src/espressif/configServer.cpp @@ -14,7 +14,7 @@ void configServer::run(){ bool exitConfig = false; #if CFG_STORAGE == ST_SPIFFS || CFG_STORAGE == ST_HYBRID - if(!SPIFFS.begin()){ + if(!ESP_SPIFFSBEGIN){ #if DEBUG_LVL >= 1 DEBUG_PRINT(F(" SPIFFS Mount Failed")); #endif From 685b01d6017b984d94b837fd8da33cbd88922dc3 Mon Sep 17 00:00:00 2001 From: Onno-Dirkzwager Date: Tue, 7 May 2019 01:18:24 +0200 Subject: [PATCH 5/5] Update callServer_WiFiClientSecure.cpp --- src/espressif/esp32/callServer_WiFiClientSecure.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/espressif/esp32/callServer_WiFiClientSecure.cpp b/src/espressif/esp32/callServer_WiFiClientSecure.cpp index 9203343b..a6d9b517 100644 --- a/src/espressif/esp32/callServer_WiFiClientSecure.cpp +++ b/src/espressif/esp32/callServer_WiFiClientSecure.cpp @@ -114,7 +114,7 @@ #endif // Start SPIFFS and load partition - if(!SPIFFS.begin()){ + if(!ESP_SPIFFSBEGIN){ (*_statusMessage) = SER_SPIFFS_PART_NOT_FOUND; return false; }