diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6ce86ae..4702b5c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ Please ensure to specify the following: * Arduino IDE version (e.g. 1.8.19) or Platform.io version * Board Type (e.g. ESP32S3_DEV, ESP32S2_DEV, ESP32C3_DEV) -* Board Core Version (e.g. ESP32 core v2.0.5) +* Board Core Version (e.g. ESP32 core v2.0.6) * Contextual information (e.g. what you were trying to achieve) * Simplest possible steps to reproduce * Anything that might be relevant in your opinion, such as: @@ -32,7 +32,7 @@ Please be educated, civilized and constructive. Disrespective posts against [Git ``` Arduino IDE version: 1.8.19 ESP32S3_DEV board -ESP32 core v2.0.5 +ESP32 core v2.0.6 OS: Ubuntu 20.04 LTS Linux xy-Inspiron-3593 5.15.0-56-generic #62~20.04.1-Ubuntu SMP Tue Nov 22 21:24:20 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux diff --git a/Images/ESP32S2_DEV.png b/Images/ESP32S2_DEV.png new file mode 100644 index 0000000..b73e4d0 Binary files /dev/null and b/Images/ESP32S2_DEV.png differ diff --git a/Images/ESP32_C3_DevKitC_02.png b/Images/ESP32_C3_DevKitC_02.png new file mode 100644 index 0000000..1189334 Binary files /dev/null and b/Images/ESP32_C3_DevKitC_02.png differ diff --git a/changelog.md b/changelog.md index 8fd9388..a3dcb96 100644 --- a/changelog.md +++ b/changelog.md @@ -16,6 +16,7 @@ ## Table of contents * [Changelog](#changelog) + * [Releases v1.1.0](#releases-v110) * [Releases v1.0.1](#releases-v101) * [Releases v1.0.0](#releases-v100) @@ -26,6 +27,10 @@ ## Changelog +#### Releases v1.1.0 + +1. Add support to `ESP32_S2/C3` boards using `LwIP W5500 / ENC28J60 Ethernet` + #### Releases v1.0.1 1. Fix typo diff --git a/examples/Async_ConfigOnDoubleReset/Async_ConfigOnDoubleReset.ino b/examples/Async_ConfigOnDoubleReset/Async_ConfigOnDoubleReset.ino index 60ae9a2..2686fa7 100644 --- a/examples/Async_ConfigOnDoubleReset/Async_ConfigOnDoubleReset.ino +++ b/examples/Async_ConfigOnDoubleReset/Async_ConfigOnDoubleReset.ino @@ -555,6 +555,7 @@ void initEthernet() void beginEthernet() { LOGWARN(F("Default SPI pinout:")); + LOGWARN1(F("SPI_HOST:"), ETH_SPI_HOST); LOGWARN1(F("MOSI:"), MOSI_GPIO); LOGWARN1(F("MISO:"), MISO_GPIO); LOGWARN1(F("SCK:"), SCK_GPIO); @@ -574,8 +575,8 @@ void beginEthernet() //bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ, // int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac); - //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST ); - ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] ); + //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST ); + ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] ); } void initEthernet() @@ -676,14 +677,11 @@ void setup() AsyncESP32_SC_Ethernet_manager.setCORSHeader("Your Access-Control-Allow-Origin"); #endif - bool configDataLoaded = false; - if (loadConfigData()) { - configDataLoaded = true; - - AsyncESP32_SC_Ethernet_manager.setConfigPortalTimeout( - 120); //If no access point name has been previously entered disable timeout. + //If no access point name has been previously entered disable timeout + AsyncESP32_SC_Ethernet_manager.setConfigPortalTimeout(120); + Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal")); #if USE_ESP_ETH_MANAGER_NTP diff --git a/examples/Async_ConfigOnDoubleReset_TZ/Async_ConfigOnDoubleReset_TZ.ino b/examples/Async_ConfigOnDoubleReset_TZ/Async_ConfigOnDoubleReset_TZ.ino index 090f6ad..b474c7d 100644 --- a/examples/Async_ConfigOnDoubleReset_TZ/Async_ConfigOnDoubleReset_TZ.ino +++ b/examples/Async_ConfigOnDoubleReset_TZ/Async_ConfigOnDoubleReset_TZ.ino @@ -578,6 +578,7 @@ void initEthernet() void beginEthernet() { LOGWARN(F("Default SPI pinout:")); + LOGWARN1(F("SPI_HOST:"), ETH_SPI_HOST); LOGWARN1(F("MOSI:"), MOSI_GPIO); LOGWARN1(F("MISO:"), MISO_GPIO); LOGWARN1(F("SCK:"), SCK_GPIO); @@ -597,8 +598,8 @@ void beginEthernet() //bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ, // int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac); - //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST ); - ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] ); + //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST ); + ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] ); } void initEthernet() @@ -709,14 +710,11 @@ void setup() AsyncESP32_SC_Ethernet_manager.setCORSHeader("Your Access-Control-Allow-Origin"); #endif - bool configDataLoaded = false; - if (loadConfigData()) { - configDataLoaded = true; - - AsyncESP32_SC_Ethernet_manager.setConfigPortalTimeout( - 120); //If no access point name has been previously entered disable timeout. + //If no access point name has been previously entered disable timeout + AsyncESP32_SC_Ethernet_manager.setConfigPortalTimeout(120); + Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal")); #if USE_ESP_ETH_MANAGER_NTP diff --git a/examples/Async_ConfigOnSwitch/Async_ConfigOnSwitch.ino b/examples/Async_ConfigOnSwitch/Async_ConfigOnSwitch.ino index e605a97..0d6114c 100644 --- a/examples/Async_ConfigOnSwitch/Async_ConfigOnSwitch.ino +++ b/examples/Async_ConfigOnSwitch/Async_ConfigOnSwitch.ino @@ -640,6 +640,7 @@ void initEthernet() void beginEthernet() { LOGWARN(F("Default SPI pinout:")); + LOGWARN1(F("SPI_HOST:"), ETH_SPI_HOST); LOGWARN1(F("MOSI:"), MOSI_GPIO); LOGWARN1(F("MISO:"), MISO_GPIO); LOGWARN1(F("SCK:"), SCK_GPIO); @@ -659,8 +660,8 @@ void beginEthernet() //bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ, // int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac); - //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST ); - ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] ); + //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST ); + ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] ); } void initEthernet() @@ -774,14 +775,11 @@ void setup() AsyncESP32_SC_Ethernet_manager.setCORSHeader("Your Access-Control-Allow-Origin"); #endif - bool configDataLoaded = false; - if (loadConfigData()) { - configDataLoaded = true; - - AsyncESP32_SC_Ethernet_manager.setConfigPortalTimeout( - 120); //If no access point name has been previously entered disable timeout. + //If no access point name has been previously entered disable timeout + AsyncESP32_SC_Ethernet_manager.setConfigPortalTimeout(120); + Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal")); #if USE_ESP_ETH_MANAGER_NTP @@ -932,8 +930,9 @@ void loop() if (loadConfigData()) { - AsyncESP32_SC_Ethernet_manager.setConfigPortalTimeout( - 120); //If no access point name has been previously entered disable timeout. + //If no access point name has been previously entered disable timeout + AsyncESP32_SC_Ethernet_manager.setConfigPortalTimeout(120); + Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal")); } else diff --git a/examples/Async_ConfigOnSwitchFS/Async_ConfigOnSwitchFS.ino b/examples/Async_ConfigOnSwitchFS/Async_ConfigOnSwitchFS.ino index 5dcb2e9..65c87ed 100644 --- a/examples/Async_ConfigOnSwitchFS/Async_ConfigOnSwitchFS.ino +++ b/examples/Async_ConfigOnSwitchFS/Async_ConfigOnSwitchFS.ino @@ -800,6 +800,7 @@ void initEthernet() void beginEthernet() { LOGWARN(F("Default SPI pinout:")); + LOGWARN1(F("SPI_HOST:"), ETH_SPI_HOST); LOGWARN1(F("MOSI:"), MOSI_GPIO); LOGWARN1(F("MISO:"), MISO_GPIO); LOGWARN1(F("SCK:"), SCK_GPIO); @@ -819,8 +820,8 @@ void beginEthernet() //bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ, // int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac); - //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST ); - ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] ); + //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST ); + ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] ); } void initEthernet() @@ -942,14 +943,11 @@ void setup() AsyncESP32_SC_Ethernet_manager.setCORSHeader("Your Access-Control-Allow-Origin"); #endif - bool configDataLoaded = false; - if (loadConfigData()) { - configDataLoaded = true; - - AsyncESP32_SC_Ethernet_manager.setConfigPortalTimeout( - 120); //If no access point name has been previously entered disable timeout. + //If no access point name has been previously entered disable timeout + AsyncESP32_SC_Ethernet_manager.setConfigPortalTimeout(120); + Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal")); #if USE_ESP_ETH_MANAGER_NTP @@ -1083,8 +1081,9 @@ void loop() if (loadConfigData()) { - AsyncESP32_SC_Ethernet_manager.setConfigPortalTimeout( - 120); //If no access point name has been previously entered disable timeout. + //If no access point name has been previously entered disable timeout + AsyncESP32_SC_Ethernet_manager.setConfigPortalTimeout(120); + Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal")); } else diff --git a/examples/Async_ConfigPortalParamsOnSwitch/Async_ConfigPortalParamsOnSwitch.ino b/examples/Async_ConfigPortalParamsOnSwitch/Async_ConfigPortalParamsOnSwitch.ino index 3894da3..f3ea9e6 100644 --- a/examples/Async_ConfigPortalParamsOnSwitch/Async_ConfigPortalParamsOnSwitch.ino +++ b/examples/Async_ConfigPortalParamsOnSwitch/Async_ConfigPortalParamsOnSwitch.ino @@ -733,6 +733,7 @@ void initEthernet() void beginEthernet() { LOGWARN(F("Default SPI pinout:")); + LOGWARN1(F("SPI_HOST:"), ETH_SPI_HOST); LOGWARN1(F("MOSI:"), MOSI_GPIO); LOGWARN1(F("MISO:"), MISO_GPIO); LOGWARN1(F("SCK:"), SCK_GPIO); @@ -752,8 +753,8 @@ void beginEthernet() //bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ, // int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac); - //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST ); - ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] ); + //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST ); + ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] ); } void initEthernet() @@ -871,14 +872,11 @@ void setup() AsyncESP32_SC_Ethernet_manager.setCORSHeader("Your Access-Control-Allow-Origin"); #endif - bool configDataLoaded = false; - if (loadConfigData()) { - configDataLoaded = true; - - AsyncESP32_SC_Ethernet_manager.setConfigPortalTimeout( - 120); //If no access point name has been previously entered disable timeout. + //If no access point name has been previously entered disable timeout + AsyncESP32_SC_Ethernet_manager.setConfigPortalTimeout(120); + Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal")); #if USE_ESP_ETH_MANAGER_NTP @@ -1012,8 +1010,9 @@ void loop() if (loadConfigData()) { - AsyncESP32_SC_Ethernet_manager.setConfigPortalTimeout( - 120); //If no access point name has been previously entered disable timeout. + //If no access point name has been previously entered disable timeout + AsyncESP32_SC_Ethernet_manager.setConfigPortalTimeout(120); + Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal")); } else diff --git a/examples/Async_ESP32_FSWebServer/Async_ESP32_FSWebServer.ino b/examples/Async_ESP32_FSWebServer/Async_ESP32_FSWebServer.ino index a1c0b5c..3bb58ea 100644 --- a/examples/Async_ESP32_FSWebServer/Async_ESP32_FSWebServer.ino +++ b/examples/Async_ESP32_FSWebServer/Async_ESP32_FSWebServer.ino @@ -599,6 +599,7 @@ void initEthernet() void beginEthernet() { LOGWARN(F("Default SPI pinout:")); + LOGWARN1(F("SPI_HOST:"), ETH_SPI_HOST); LOGWARN1(F("MOSI:"), MOSI_GPIO); LOGWARN1(F("MISO:"), MISO_GPIO); LOGWARN1(F("SCK:"), SCK_GPIO); @@ -618,8 +619,8 @@ void beginEthernet() //bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ, // int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac); - //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST ); - ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] ); + //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST ); + ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] ); } void initEthernet() diff --git a/examples/Async_ESP32_FSWebServer_DRD/Async_ESP32_FSWebServer_DRD.ino b/examples/Async_ESP32_FSWebServer_DRD/Async_ESP32_FSWebServer_DRD.ino index 37c0f95..e8f6d8b 100644 --- a/examples/Async_ESP32_FSWebServer_DRD/Async_ESP32_FSWebServer_DRD.ino +++ b/examples/Async_ESP32_FSWebServer_DRD/Async_ESP32_FSWebServer_DRD.ino @@ -631,6 +631,7 @@ void initEthernet() void beginEthernet() { LOGWARN(F("Default SPI pinout:")); + LOGWARN1(F("SPI_HOST:"), ETH_SPI_HOST); LOGWARN1(F("MOSI:"), MOSI_GPIO); LOGWARN1(F("MISO:"), MISO_GPIO); LOGWARN1(F("SCK:"), SCK_GPIO); @@ -650,8 +651,8 @@ void beginEthernet() //bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ, // int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac); - //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST ); - ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] ); + //ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST ); + ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] ); } void initEthernet() @@ -779,8 +780,9 @@ void setup() if (configDataLoaded) { - AsyncESP32_SC_Ethernet_manager.setConfigPortalTimeout( - 120); //If no access point name has been previously entered disable timeout. + //If no access point name has been previously entered disable timeout + AsyncESP32_SC_Ethernet_manager.setConfigPortalTimeout(120); + Serial.println(F("Got stored Credentials. Timeout 120s for Config Portal")); #if USE_ESP_ETH_MANAGER_NTP diff --git a/library.json b/library.json index 3863b6b..0fe6866 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "AsyncESP32_SC_Ethernet_Manager", - "version": "1.0.1", + "version": "1.1.0", "keywords": "ethernet, Credentials-Manager, esp32, esp32-s2, esp32-s3, esp32-c3, lwip, w5500, lwip-w5500, enc28j60, lwip-enc28j60, lwip-ethernet, AsyncWebServer, Async-Credentials-Manager, Async, Communication, Credentials, Config-Portal, DoubleReset, littlefs, spiffs, dns-server, iot, eeprom", "description": "ESP32_S2/S3/C3 + LwIP W5500 / ENC28J60 Connection and Credentials Manager using AsyncWebServer, with enhanced GUI and fallback Web ConfigPortal. This Library is used for configuring ESP32_S2/S3/C3 + LwIP W5500 / ENC28J60 Credentials Manager at runtime. You can also specify static DNS servers, personalized HostName, static or DHCP IP. With configurable CORS Header and auto-Timezone features. Using AsyncDNSServer instead of DNSServer now. Now using correct ESP32 chipIP", "authors": @@ -38,13 +38,13 @@ { "owner": "khoih-prog", "name": "WebServer_ESP32_SC_W5500", - "version": ">=1.0.1", + "version": ">=1.2.1", "platforms": ["espressif32"] }, { "owner": "khoih-prog", "name": "WebServer_ESP32_SC_ENC", - "version": ">=1.0.0", + "version": ">=1.2.0", "platforms": ["espressif32"] }, { diff --git a/library.properties b/library.properties index f34f76e..53b7bd3 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=AsyncESP32_SC_Ethernet_Manager -version=1.0.1 +version=1.1.0 author=Khoi Hoang maintainer=Khoi Hoang license=MIT diff --git a/platformio/platformio.ini b/platformio/platformio.ini index a6b91d0..73a4aea 100644 --- a/platformio/platformio.ini +++ b/platformio/platformio.ini @@ -45,8 +45,8 @@ lib_deps = ; https://github.com/khoih-prog/ESPAsyncTCP ; AsyncTCP@>=1.1.1 ; ESP_DoubleResetDetector@>=1.3.2 -; WebServer_ESP32_SC_W5500@>=1.0.1 -; WebServer_ESP32_SC_ENC@>=1.0.0 +; WebServer_ESP32_SC_W5500@>=1.2.1 +; WebServer_ESP32_SC_ENC@>=1.2.0 ; PlatformIO 5.x ; me-no-dev/ESP Async WebServer@>=1.2.3 @@ -55,8 +55,8 @@ lib_deps = https://github.com/khoih-prog/ESPAsyncTCP me-no-dev/AsyncTCP@>=1.1.1 khoih-prog/ESP_DoubleResetDetector@>=1.3.2 - khoih-prog/WebServer_ESP32_SC_W5500@>=1.0.1 - khoih-prog/WebServer_ESP32_SC_ENC@>=1.0.0 + khoih-prog/WebServer_ESP32_SC_W5500@>=1.2.1 + khoih-prog/WebServer_ESP32_SC_ENC@>=1.2.0 ; ============================================================ build_flags = diff --git a/src/AsyncESP32_SC_Ethernet_Manager.h b/src/AsyncESP32_SC_Ethernet_Manager.h index af7516b..6a8bcab 100644 --- a/src/AsyncESP32_SC_Ethernet_Manager.h +++ b/src/AsyncESP32_SC_Ethernet_Manager.h @@ -12,11 +12,12 @@ Built by Khoi Hoang https://github.com/khoih-prog/AsyncESP32_SC_Ethernet_Manager Licensed under MIT license - Version: 1.0.0 + Version: 1.1.0 Version Modified By Date Comments ------- ----------- ---------- ----------- - 1.0.0 K Hoang 14/12/2022 Initial coding for ESP32_S3 + LwIP W5500 / ENC28J60) + 1.0.0 K Hoang 14/12/2022 Initial coding for ESP32_S3 + LwIP W5500 / ENC28J60 + 1.1.0 K Hoang 23/12/2022 Add support to ESP32_S2/C3 + LwIP W5500 / ENC28J60 *****************************************************************************************************************************/ #pragma once diff --git a/src/AsyncESP32_SC_Ethernet_Manager.hpp b/src/AsyncESP32_SC_Ethernet_Manager.hpp index 30be795..18c0544 100644 --- a/src/AsyncESP32_SC_Ethernet_Manager.hpp +++ b/src/AsyncESP32_SC_Ethernet_Manager.hpp @@ -12,11 +12,12 @@ Built by Khoi Hoang https://github.com/khoih-prog/AsyncESP32_SC_Ethernet_Manager Licensed under MIT license - Version: 1.0.0 + Version: 1.1.0 Version Modified By Date Comments ------- ----------- ---------- ----------- - 1.0.0 K Hoang 14/12/2022 Initial coding for ESP32_S3 + LwIP W5500 / ENC28J60) + 1.0.0 K Hoang 14/12/2022 Initial coding for ESP32_S3 + LwIP W5500 / ENC28J60 + 1.1.0 K Hoang 23/12/2022 Add support to ESP32_S2/C3 + LwIP W5500 / ENC28J60 *****************************************************************************************************************************/ #pragma once @@ -35,9 +36,9 @@ #endif #define USING_ESP32_S2 true - - #error ESP32_S2 not supported yet - + +////////////////////////////////////////// + #elif ( ARDUINO_ESP32C3_DEV ) #if (_ESPASYNC_ETH_MGR_LOGLEVEL_ > 3) #if ( defined(ESP_ARDUINO_VERSION_MAJOR) && (ESP_ARDUINO_VERSION_MAJOR >= 2) ) @@ -51,9 +52,9 @@ #endif #define USING_ESP32_C3 true - - #error ESP32_C3 not supported yet - + +////////////////////////////////////////// + #elif ( defined(ARDUINO_ESP32S3_DEV) || defined(ARDUINO_ESP32_S3_BOX) || defined(ARDUINO_TINYS3) || \ defined(ARDUINO_PROS3) || defined(ARDUINO_FEATHERS3) ) @@ -69,13 +70,13 @@ //////////////////////////////////////////////////// -#define ASYNC_ESP32_SC_ETH_MANAGER_VERSION "AsyncESP32_SC_Ethernet_Manager v1.0.0" +#define ASYNC_ESP32_SC_ETH_MANAGER_VERSION "AsyncESP32_SC_Ethernet_Manager v1.1.0" #define ASYNC_ESP32_SC_ETH_MANAGER_VERSION_MAJOR 1 -#define ASYNC_ESP32_SC_ETH_MANAGER_VERSION_MINOR 0 +#define ASYNC_ESP32_SC_ETH_MANAGER_VERSION_MINOR 1 #define ASYNC_ESP32_SC_ETH_MANAGER_VERSION_PATCH 0 -#define ASYNC_ESP32_SC_ETH_MANAGER_VERSION_INT 1000000 +#define ASYNC_ESP32_SC_ETH_MANAGER_VERSION_INT 1001000 //////////////////////////////////////////////////// @@ -83,13 +84,13 @@ //////////////////////////////////////////////////// -#if defined(USING_W5500) +#if (USING_W5500) #if (_ESPASYNC_ETH_MGR_LOGLEVEL_ > 3) #warning USING_W5500 #endif #include -#elif defined(USING_ENC28J60) +#elif (USING_ENC28J60) #if (_ESPASYNC_ETH_MGR_LOGLEVEL_ > 3) #warning USING_ENC28J60 #endif @@ -102,6 +103,8 @@ #include #endif + +//////////////////////////////////////////////////// #include diff --git a/src/AsyncESP32_SC_Ethernet_Manager_Debug.h b/src/AsyncESP32_SC_Ethernet_Manager_Debug.h index 46b9ec1..1727a15 100644 --- a/src/AsyncESP32_SC_Ethernet_Manager_Debug.h +++ b/src/AsyncESP32_SC_Ethernet_Manager_Debug.h @@ -12,11 +12,12 @@ Built by Khoi Hoang https://github.com/khoih-prog/AsyncESP32_SC_Ethernet_Manager Licensed under MIT license - Version: 1.0.0 + Version: 1.1.0 Version Modified By Date Comments ------- ----------- ---------- ----------- - 1.0.0 K Hoang 14/12/2022 Initial coding for ESP32_S3 + LwIP W5500 / ENC28J60) + 1.0.0 K Hoang 14/12/2022 Initial coding for ESP32_S3 + LwIP W5500 / ENC28J60 + 1.1.0 K Hoang 23/12/2022 Add support to ESP32_S2/C3 + LwIP W5500 / ENC28J60 *****************************************************************************************************************************/ #pragma once diff --git a/src/AsyncESP32_SC_Ethernet_Manager_Impl.h b/src/AsyncESP32_SC_Ethernet_Manager_Impl.h index 3591ce7..0638c09 100644 --- a/src/AsyncESP32_SC_Ethernet_Manager_Impl.h +++ b/src/AsyncESP32_SC_Ethernet_Manager_Impl.h @@ -12,11 +12,12 @@ Built by Khoi Hoang https://github.com/khoih-prog/AsyncESP32_SC_Ethernet_Manager Licensed under MIT license - Version: 1.0.0 + Version: 1.1.0 Version Modified By Date Comments ------- ----------- ---------- ----------- - 1.0.0 K Hoang 14/12/2022 Initial coding for ESP32_S3 + LwIP W5500 / ENC28J60) + 1.0.0 K Hoang 14/12/2022 Initial coding for ESP32_S3 + LwIP W5500 / ENC28J60 + 1.1.0 K Hoang 23/12/2022 Add support to ESP32_S2/C3 + LwIP W5500 / ENC28J60 *****************************************************************************************************************************/ #pragma once @@ -373,16 +374,12 @@ bool AsyncESP32_SC_Ethernet_Manager::startConfigPortal() setupConfigPortal(); - bool TimedOut = true; - LOGINFO("startConfigPortal : Enter loop"); while (true) { if (connect) { - TimedOut = false; - if (_shouldBreakAfterConfig) { //flag set to exit after config after trying to connect @@ -401,8 +398,6 @@ bool AsyncESP32_SC_Ethernet_Manager::startConfigPortal() if (stopConfigPortal) { - TimedOut = false; - LOGERROR("stopConfigPortal"); stopConfigPortal = false;