Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
v1.1.0 for ESP32_S2/C3
Browse files Browse the repository at this point in the history
#### Releases v1.1.0

1. Add support to `ESP32_S2/C3` boards using `LwIP W5500 / ENC28J60 Ethernet`
  • Loading branch information
khoih-prog authored Dec 24, 2022
1 parent 866417c commit 2ac6022
Show file tree
Hide file tree
Showing 18 changed files with 88 additions and 87 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
Binary file added Images/ESP32S2_DEV.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ESP32_C3_DevKitC_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down
14 changes: 6 additions & 8 deletions examples/Async_ConfigOnDoubleReset/Async_ConfigOnDoubleReset.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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()
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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()
Expand Down Expand Up @@ -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
Expand Down
19 changes: 9 additions & 10 deletions examples/Async_ConfigOnSwitch/Async_ConfigOnSwitch.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
19 changes: 9 additions & 10 deletions examples/Async_ConfigOnSwitchFS/Async_ConfigOnSwitchFS.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions examples/Async_ESP32_FSWebServer/Async_ESP32_FSWebServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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()
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions library.json
Original file line number Diff line number Diff line change
@@ -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":
Expand Down Expand Up @@ -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"]
},
{
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=AsyncESP32_SC_Ethernet_Manager
version=1.0.1
version=1.1.0
author=Khoi Hoang
maintainer=Khoi Hoang <[email protected]>
license=MIT
Expand Down
8 changes: 4 additions & 4 deletions platformio/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 =
Expand Down
5 changes: 3 additions & 2 deletions src/AsyncESP32_SC_Ethernet_Manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 2ac6022

Please sign in to comment.