Skip to content
This repository was archived by the owner on Jan 29, 2023. It is now read-only.

Commit 406df84

Browse files
authored
v1.3.0 to add support to LAN8720
### Releases v1.3.0 1. Add support to **LAN8720** Ethernet for many **STM32F4** (F407xx, NUCLEO_F429ZI) and **STM32F7** (DISCO_F746NG, NUCLEO_F746ZG, NUCLEO_F756ZG) boards. 2. Add LAN8720 examples 3. Add Packages' Patches for STM32 to use LAN8720 with STM32Ethernet and LwIP libraries
1 parent 86c54ca commit 406df84

File tree

60 files changed

+4435
-173
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+4435
-173
lines changed

examples/AsyncFSBrowser_STM32/AsyncFSBrowser_STM32.ino

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/****************************************************************************************************************************
2-
AsyncFSBrowser_STM32.h - Dead simple AsyncWebServer for STM32 built-in LAN8742A Ethernet
2+
AsyncFSBrowser_STM32.h - Dead simple AsyncWebServer for STM32 LAN8720 or built-in LAN8742A Ethernet
33
4-
For STM32 with built-in LAN8742A Ethernet (Nucleo-144, DISCOVERY, etc)
4+
For STM32 with LAN8720 (STM32F4/F7) or built-in LAN8742A Ethernet (Nucleo-144, DISCOVERY, etc)
55
6-
AsyncWebServer_STM32 is a library for the STM32 run built-in Ethernet WebServer
6+
AsyncWebServer_STM32 is a library for the STM32 with LAN8720 or built-in LAN8742A Ethernet WebServer
77
88
Based on and modified from ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer)
99
Built by Khoi Hoang https://github.com/khoih-prog/AsyncWebServer_STM32
1010
Licensed under MIT license
1111
12-
Version: 1.2.6
12+
Version: 1.3.0
1313
1414
Version Modified By Date Comments
1515
------- ----------- ---------- -----------
@@ -18,14 +18,18 @@
1818
1.2.4 K Hoang 05/09/2020 Add back MD5/SHA1 authentication feature.
1919
1.2.5 K Hoang 28/12/2020 Suppress all possible compiler warnings. Add examples.
2020
1.2.6 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
21+
1.3.0 K Hoang 14/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
2122
*****************************************************************************************************************************/
2223
/*
2324
Currently support
2425
1) STM32 boards with built-in Ethernet (to use USE_BUILTIN_ETHERNET = true) such as :
2526
- Nucleo-144 (F429ZI, F767ZI)
2627
- Discovery (STM32F746G-DISCOVERY)
27-
- STM32 boards (STM32F/L/H/G/WB/MP1) with 32K+ Flash, with Built-in Ethernet,
28+
- STM32 boards (STM32F/L/H/G/WB/MP1) with 32K+ Flash, with Built-in Ethernet,
2829
- See How To Use Built-in Ethernet at (https://github.com/khoih-prog/EthernetWebServer_STM32/issues/1)
30+
2) STM32F/L/H/G/WB/MP1 boards (with 64+K Flash) running ENC28J60 shields (to use USE_BUILTIN_ETHERNET = false)
31+
3) STM32F/L/H/G/WB/MP1 boards (with 64+K Flash) running W5x00 shields
32+
4) STM32F4 and STM32F7 boards (with 64+K Flash) running LAN8720 shields
2933
*/
3034

3135
#if !( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \
@@ -130,6 +134,7 @@ void onWsEvent(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventT
130134
if (type == WS_EVT_CONNECT)
131135
{
132136
Serial.printf("ws[%s][%u] connect\n", server->url(), client->id());
137+
133138
client->printf("Hello Client %lu :)", client->id());
134139
client->ping();
135140
}
@@ -240,7 +245,9 @@ void setup()
240245
{
241246
Serial.begin(115200);
242247
while (!Serial);
243-
248+
249+
delay(200);
250+
244251
Serial.printf("\nStarting AsyncFSBrowser_STM32 on %s with %s\n", BOARD_NAME, SHIELD_TYPE);
245252
Serial.println(ASYNC_WEBSERVER_STM32_VERSION);
246253

examples/AsyncMultiWebServer_STM32/AsyncMultiWebServer_STM32.ino

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/****************************************************************************************************************************
2-
AsyncMultiWebServer_STM32.h - Dead simple AsyncWebServer for STM32 built-in LAN8742A Ethernet
2+
AsyncMultiWebServer_STM32.h - Dead simple AsyncWebServer for STM32 LAN8720 or built-in LAN8742A Ethernet
33
4-
For STM32 with built-in LAN8742A Ethernet (Nucleo-144, DISCOVERY, etc)
4+
For STM32 with LAN8720 (STM32F4/F7) or built-in LAN8742A Ethernet (Nucleo-144, DISCOVERY, etc)
55
6-
AsyncWebServer_STM32 is a library for the STM32 run built-in Ethernet WebServer
6+
AsyncWebServer_STM32 is a library for the STM32 with LAN8720 or built-in LAN8742A Ethernet WebServer
77
88
Based on and modified from ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer)
99
Built by Khoi Hoang https://github.com/khoih-prog/AsyncWebServer_STM32
1010
Licensed under MIT license
1111
12-
Version: 1.2.6
12+
Version: 1.3.0
1313
1414
Version Modified By Date Comments
1515
------- ----------- ---------- -----------
@@ -18,14 +18,18 @@
1818
1.2.4 K Hoang 05/09/2020 Add back MD5/SHA1 authentication feature.
1919
1.2.5 K Hoang 28/12/2020 Suppress all possible compiler warnings. Add examples.
2020
1.2.6 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
21+
1.3.0 K Hoang 14/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
2122
*****************************************************************************************************************************/
2223
/*
2324
Currently support
2425
1) STM32 boards with built-in Ethernet (to use USE_BUILTIN_ETHERNET = true) such as :
2526
- Nucleo-144 (F429ZI, F767ZI)
2627
- Discovery (STM32F746G-DISCOVERY)
27-
- STM32 boards (STM32F/L/H/G/WB/MP1) with 32K+ Flash, with Built-in Ethernet,
28+
- STM32 boards (STM32F/L/H/G/WB/MP1) with 32K+ Flash, with Built-in Ethernet,
2829
- See How To Use Built-in Ethernet at (https://github.com/khoih-prog/EthernetWebServer_STM32/issues/1)
30+
2) STM32F/L/H/G/WB/MP1 boards (with 64+K Flash) running ENC28J60 shields (to use USE_BUILTIN_ETHERNET = false)
31+
3) STM32F/L/H/G/WB/MP1 boards (with 64+K Flash) running W5x00 shields
32+
4) STM32F4 and STM32F7 boards (with 64+K Flash) running LAN8720 shields
2933
*/
3034

3135
#if !( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \
@@ -165,7 +169,7 @@ body { background-color: #cccccc; font-family: Arial, Helvetica, Sans-Serif; Col
165169
<h3>on %s</h3>\
166170
<h3>Uptime: %d d %02d:%02d:%02d</h3>\
167171
</body>\
168-
</html>", BOARD_NAME, BOARD_NAME, "Built-in LAN8742A", day, hr, min % 60, sec % 60);
172+
</html>", BOARD_NAME, BOARD_NAME, SHIELD_TYPE, day, hr, min % 60, sec % 60);
169173

170174
return temp;
171175
}
@@ -214,7 +218,8 @@ void setup()
214218

215219
delay(200);
216220

217-
Serial.printf("\nStarting AsyncMultiWebServer_STM32 on %s with %s\n", BOARD_NAME, SHIELD_TYPE);
221+
Serial.print("\nStart AsyncMultiWebServer_STM32 on "); Serial.print(BOARD_NAME);
222+
Serial.print(" with "); Serial.println(SHIELD_TYPE);
218223
Serial.println(ASYNC_WEBSERVER_STM32_VERSION);
219224

220225
// start the ethernet connection and the server

examples/Async_AdvancedWebServer/Async_AdvancedWebServer.ino

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/****************************************************************************************************************************
2-
Async_AdvancedWebServer.ino - Dead simple AsyncWebServer for STM32 built-in LAN8742A Ethernet
2+
Async_AdvancedWebServer.ino - Dead simple AsyncWebServer for STM32 LAN8720 or built-in LAN8742A Ethernet
33
4-
For STM32 with built-in LAN8742A Ethernet (Nucleo-144, DISCOVERY, etc)
4+
For STM32 with LAN8720 (STM32F4/F7) or built-in LAN8742A Ethernet (Nucleo-144, DISCOVERY, etc)
55
6-
AsyncWebServer_STM32 is a library for the STM32 run built-in Ethernet WebServer
6+
AsyncWebServer_STM32 is a library for the STM32 with LAN8720 or built-in LAN8742A Ethernet WebServer
77
88
Based on and modified from ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer)
99
Built by Khoi Hoang https://github.com/khoih-prog/AsyncWebServer_STM32
@@ -37,7 +37,7 @@
3737
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3838
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3939
40-
Version: 1.2.6
40+
Version: 1.3.0
4141
4242
Version Modified By Date Comments
4343
------- ----------- ---------- -----------
@@ -46,14 +46,18 @@
4646
1.2.4 K Hoang 05/09/2020 Add back MD5/SHA1 authentication feature.
4747
1.2.5 K Hoang 28/12/2020 Suppress all possible compiler warnings. Add examples.
4848
1.2.6 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
49+
1.3.0 K Hoang 14/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
4950
*****************************************************************************************************************************/
5051
/*
5152
Currently support
5253
1) STM32 boards with built-in Ethernet (to use USE_BUILTIN_ETHERNET = true) such as :
5354
- Nucleo-144 (F429ZI, F767ZI)
5455
- Discovery (STM32F746G-DISCOVERY)
55-
- STM32 boards (STM32F/L/H/G/WB/MP1) with 32K+ Flash, with Built-in Ethernet,
56+
- STM32 boards (STM32F/L/H/G/WB/MP1) with 32K+ Flash, with Built-in Ethernet,
5657
- See How To Use Built-in Ethernet at (https://github.com/khoih-prog/EthernetWebServer_STM32/issues/1)
58+
2) STM32F/L/H/G/WB/MP1 boards (with 64+K Flash) running ENC28J60 shields (to use USE_BUILTIN_ETHERNET = false)
59+
3) STM32F/L/H/G/WB/MP1 boards (with 64+K Flash) running W5x00 shields
60+
4) STM32F4 and STM32F7 boards (with 64+K Flash) running LAN8720 shields
5761
*/
5862

5963
#if !( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \
@@ -243,8 +247,12 @@ void setup(void)
243247
digitalWrite(led, 0);
244248

245249
Serial.begin(115200);
250+
while (!Serial);
246251

247-
Serial.printf("\nStarting Async_AdvancedWebServer_STM32 on %s with %s\n", BOARD_NAME, SHIELD_TYPE);
252+
delay(200);
253+
254+
Serial.print("\nStart Async_AdvancedWebServer_STM32 on "); Serial.print(BOARD_NAME);
255+
Serial.print(" with "); Serial.println(SHIELD_TYPE);
248256
Serial.println(ASYNC_WEBSERVER_STM32_VERSION);
249257

250258
// start the ethernet connection and the server

examples/Async_HelloServer/Async_HelloServer.ino

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/****************************************************************************************************************************
2-
Async_HelloServer.h - Dead simple AsyncWebServer for STM32 built-in LAN8742A Ethernet
2+
Async_HelloServer.h - Dead simple AsyncWebServer for STM32 LAN8720 or built-in LAN8742A Ethernet
33
4-
For STM32 with built-in LAN8742A Ethernet (Nucleo-144, DISCOVERY, etc)
4+
For STM32 with LAN8720 (STM32F4/F7) or built-in LAN8742A Ethernet (Nucleo-144, DISCOVERY, etc)
55
6-
AsyncWebServer_STM32 is a library for the STM32 run built-in Ethernet WebServer
6+
AsyncWebServer_STM32 is a library for the STM32 with LAN8720 or built-in LAN8742A Ethernet WebServer
77
88
Based on and modified from ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer)
99
Built by Khoi Hoang https://github.com/khoih-prog/AsyncWebServer_STM32
1010
Licensed under MIT license
1111
12-
Version: 1.2.6
12+
Version: 1.3.0
1313
1414
Version Modified By Date Comments
1515
------- ----------- ---------- -----------
@@ -18,14 +18,18 @@
1818
1.2.4 K Hoang 05/09/2020 Add back MD5/SHA1 authentication feature.
1919
1.2.5 K Hoang 28/12/2020 Suppress all possible compiler warnings. Add examples.
2020
1.2.6 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
21+
1.3.0 K Hoang 14/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
2122
*****************************************************************************************************************************/
2223
/*
2324
Currently support
2425
1) STM32 boards with built-in Ethernet (to use USE_BUILTIN_ETHERNET = true) such as :
2526
- Nucleo-144 (F429ZI, F767ZI)
2627
- Discovery (STM32F746G-DISCOVERY)
27-
- STM32 boards (STM32F/L/H/G/WB/MP1) with 32K+ Flash, with Built-in Ethernet,
28+
- STM32 boards (STM32F/L/H/G/WB/MP1) with 32K+ Flash, with Built-in Ethernet,
2829
- See How To Use Built-in Ethernet at (https://github.com/khoih-prog/EthernetWebServer_STM32/issues/1)
30+
2) STM32F/L/H/G/WB/MP1 boards (with 64+K Flash) running ENC28J60 shields (to use USE_BUILTIN_ETHERNET = false)
31+
3) STM32F/L/H/G/WB/MP1 boards (with 64+K Flash) running W5x00 shields
32+
4) STM32F4 and STM32F7 boards (with 64+K Flash) running LAN8720 shields
2933
*/
3034

3135
#if !( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \
@@ -160,8 +164,12 @@ void setup(void)
160164
digitalWrite(led, 0);
161165

162166
Serial.begin(115200);
167+
while (!Serial);
163168

164-
Serial.printf("\nStarting Async_HelloServer on %s with %s\n", BOARD_NAME, SHIELD_TYPE);
169+
delay(200);
170+
171+
Serial.print("\nStart Async_HelloServer on "); Serial.print(BOARD_NAME);
172+
Serial.print(" with "); Serial.println(SHIELD_TYPE);
165173
Serial.println(ASYNC_WEBSERVER_STM32_VERSION);
166174

167175
// start the ethernet connection and the server

examples/Async_HelloServer2/Async_HelloServer2.ino

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/****************************************************************************************************************************
2-
Async_HelloServer.ino - Dead simple AsyncWebServer for STM32 built-in LAN8742A Ethernet
2+
Async_HelloServer.ino - Dead simple AsyncWebServer for STM32 LAN8720 or built-in LAN8742A Ethernet
33
4-
For STM32 with built-in LAN8742A Ethernet (Nucleo-144, DISCOVERY, etc)
4+
For STM32 with LAN8720 (STM32F4/F7) or built-in LAN8742A Ethernet (Nucleo-144, DISCOVERY, etc)
55
6-
AsyncWebServer_STM32 is a library for the STM32 run built-in Ethernet WebServer
6+
AsyncWebServer_STM32 is a library for the STM32 with LAN8720 or built-in LAN8742A Ethernet WebServer
77
88
Based on and modified from ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer)
99
Built by Khoi Hoang https://github.com/khoih-prog/AsyncWebServer_STM32
1010
Licensed under MIT license
11-
12-
Version: 1.2.6
11+
12+
Version: 1.3.0
1313
1414
Version Modified By Date Comments
1515
------- ----------- ---------- -----------
@@ -18,14 +18,18 @@
1818
1.2.4 K Hoang 05/09/2020 Add back MD5/SHA1 authentication feature.
1919
1.2.5 K Hoang 28/12/2020 Suppress all possible compiler warnings. Add examples.
2020
1.2.6 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
21+
1.3.0 K Hoang 14/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
2122
*****************************************************************************************************************************/
2223
/*
2324
Currently support
2425
1) STM32 boards with built-in Ethernet (to use USE_BUILTIN_ETHERNET = true) such as :
2526
- Nucleo-144 (F429ZI, F767ZI)
2627
- Discovery (STM32F746G-DISCOVERY)
27-
- STM32 boards (STM32F/L/H/G/WB/MP1) with 32K+ Flash, with Built-in Ethernet,
28+
- STM32 boards (STM32F/L/H/G/WB/MP1) with 32K+ Flash, with Built-in Ethernet,
2829
- See How To Use Built-in Ethernet at (https://github.com/khoih-prog/EthernetWebServer_STM32/issues/1)
30+
2) STM32F/L/H/G/WB/MP1 boards (with 64+K Flash) running ENC28J60 shields (to use USE_BUILTIN_ETHERNET = false)
31+
3) STM32F/L/H/G/WB/MP1 boards (with 64+K Flash) running W5x00 shields
32+
4) STM32F4 and STM32F7 boards (with 64+K Flash) running LAN8720 shields
2933
*/
3034

3135
#if !( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \
@@ -160,8 +164,12 @@ void setup(void)
160164
digitalWrite(led, 0);
161165

162166
Serial.begin(115200);
167+
while (!Serial);
168+
169+
delay(200);
163170

164-
Serial.printf("\nStarting Async_HelloServer2 on %s with %s\n", BOARD_NAME, SHIELD_TYPE);
171+
Serial.print("\nStart Async_HelloServer2 on "); Serial.print(BOARD_NAME);
172+
Serial.print(" with "); Serial.println(SHIELD_TYPE);
165173
Serial.println(ASYNC_WEBSERVER_STM32_VERSION);
166174

167175
// start the ethernet connection and the server

examples/Async_HttpBasicAuth/Async_HttpBasicAuth.ino

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/****************************************************************************************************************************
2-
Async_HttpBasicAuth.ino - Dead simple AsyncWebServer for STM32 built-in LAN8742A Ethernet
2+
Async_HttpBasicAuth.ino - Dead simple AsyncWebServer for STM32 LAN8720 or built-in LAN8742A Ethernet
33
4-
For STM32 with built-in LAN8742A Ethernet (Nucleo-144, DISCOVERY, etc)
4+
For STM32 with LAN8720 (STM32F4/F7) or built-in LAN8742A Ethernet (Nucleo-144, DISCOVERY, etc)
55
6-
AsyncWebServer_STM32 is a library for the STM32 run built-in Ethernet WebServer
6+
AsyncWebServer_STM32 is a library for the STM32 with LAN8720 or built-in LAN8742A Ethernet WebServer
77
88
Based on and modified from ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer)
99
Built by Khoi Hoang https://github.com/khoih-prog/AsyncWebServer_STM32
1010
Licensed under MIT license
11-
12-
Version: 1.2.6
11+
12+
Version: 1.3.0
1313
1414
Version Modified By Date Comments
1515
------- ----------- ---------- -----------
@@ -18,14 +18,18 @@
1818
1.2.4 K Hoang 05/09/2020 Add back MD5/SHA1 authentication feature.
1919
1.2.5 K Hoang 28/12/2020 Suppress all possible compiler warnings. Add examples.
2020
1.2.6 K Hoang 22/03/2021 Fix dependency on STM32AsyncTCP Library
21+
1.3.0 K Hoang 14/04/2021 Add support to LAN8720 using STM32F4 or STM32F7
2122
*****************************************************************************************************************************/
2223
/*
2324
Currently support
2425
1) STM32 boards with built-in Ethernet (to use USE_BUILTIN_ETHERNET = true) such as :
2526
- Nucleo-144 (F429ZI, F767ZI)
2627
- Discovery (STM32F746G-DISCOVERY)
27-
- STM32 boards (STM32F/L/H/G/WB/MP1) with 32K+ Flash, with Built-in Ethernet,
28+
- STM32 boards (STM32F/L/H/G/WB/MP1) with 32K+ Flash, with Built-in Ethernet,
2829
- See How To Use Built-in Ethernet at (https://github.com/khoih-prog/EthernetWebServer_STM32/issues/1)
30+
2) STM32F/L/H/G/WB/MP1 boards (with 64+K Flash) running ENC28J60 shields (to use USE_BUILTIN_ETHERNET = false)
31+
3) STM32F/L/H/G/WB/MP1 boards (with 64+K Flash) running W5x00 shields
32+
4) STM32F4 and STM32F7 boards (with 64+K Flash) running LAN8720 shields
2933
*/
3034

3135
#if !( defined(STM32F0) || defined(STM32F1) || defined(STM32F2) || defined(STM32F3) ||defined(STM32F4) || defined(STM32F7) || \
@@ -131,8 +135,12 @@ const char* www_password = "ethernet";
131135
void setup()
132136
{
133137
Serial.begin(115200);
138+
while (!Serial);
139+
140+
delay(200);
134141

135-
Serial.printf("\nStarting Async_HTTPBasicAuth on %s with %s\n", BOARD_NAME, SHIELD_TYPE);
142+
Serial.print("\nStart Async_HTTPBasicAuth on "); Serial.print(BOARD_NAME);
143+
Serial.print(" with "); Serial.println(SHIELD_TYPE);
136144
Serial.println(ASYNC_WEBSERVER_STM32_VERSION);
137145

138146
// start the ethernet connection and the server

0 commit comments

Comments
 (0)