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

Commit

Permalink
v1.0.1 add support to W5x00 Ethernet shields
Browse files Browse the repository at this point in the history
### New in Version v1.0.1

1. Add support to ***W5x00*** Ethernet shields to all STM32 boards having 64+K bytes Flash.
  • Loading branch information
khoih-prog authored Feb 28, 2020
1 parent 07ce1b1 commit 092d5b4
Show file tree
Hide file tree
Showing 19 changed files with 175 additions and 61 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@

[![arduino-library-badge](https://www.ardu-badge.com/badge/EthernetWebServer_STM32.svg?)](https://www.ardu-badge.com/EthernetWebServer_STM32)

### New in Version v1.0.1

1. Add support to ***W5x00*** Ethernet shields to all STM32 boards having 64+K bytes Flash.

This library currently supports
1. STM32 boards with built-in Ethernet such as :
- ***Nucleo-144 (F429ZI, F767ZI)***
- ***Discovery (STM32F746G-DISCOVERY)***
- ***All STM32 Boards with Built-in Ethernet***, See [How To Use Built-in Ethernet](https://github.com/khoih-prog/EthernetWebServer_STM32/issues/1)
2. ***STM32 boards (with 64+K Flash) running EMC28J60 shields***
3. See [EthernetWebServer Library Issue 1](https://github.com/khoih-prog/EthernetWebServer/issues/1) for reason to create this separate library from [EthernetWebServer library](https://github.com/khoih-prog/EthernetWebServer)
2. ***STM32 boards (with 64+K Flash) running ENC28J60 shields***
3. ***STM32 boards (with 64+K Flash) running W5x00 shields***
4. See [EthernetWebServer Library Issue 1](https://github.com/khoih-prog/EthernetWebServer/issues/1) for reason to create this separate library from [EthernetWebServer library](https://github.com/khoih-prog/EthernetWebServer)

This is simple yet complete WebServer library for `STM32` boards running built-in Ethernet (Nucleo-144, Discovery) or EMC28J60 Ethernet shields. The functions are similar and compatible to ESP8266/ESP32 WebServer libraries to make life much easier to port sketches from ESP8266/ESP32.

Expand Down Expand Up @@ -333,6 +338,9 @@ HTTP EthernetWebServer is @ IP : 192.168.2.100
</g>
</svg>
```
### Version v1.0.1
1. Add support to W5x00 Ethernet shields to all STM32 boards having 64+K bytes Flash.
### Version v1.0.0
Expand Down
11 changes: 8 additions & 3 deletions examples/AdvancedWebServer/AdvancedWebServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Forked and modified from ESP8266 https://github.com/esp8266/Arduino/releases
* Built by Khoi Hoang https://github.com/khoih-prog/ESP8266_AT_WebServer
* Licensed under MIT license
* Version: 1.0.0
* Version: 1.0.1
*
* Copyright (c) 2015, Majenko Technologies
* All rights reserved.
Expand Down Expand Up @@ -44,18 +44,23 @@
*
* Version Modified By Date Comments
* ------- ----------- ---------- -----------
* 1.0.0 K Hoang 13/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc)
* 1.0.0 K Hoang 26/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc) and ENC28J60
* 1.0.1 K Hoang 28/02/2020 Add W5x00 Ethernet shields using Ethernet library
*****************************************************************************************************************************/
/*
* Currently support
* 1) STM32 boards with built-in Ethernet (to use USE_BUILTIN_ETHERNET = true) such as :
* - Nucleo-144 (F429ZI, F767ZI)
* - Discovery (STM32F746G-DISCOVERY)
* - All STM32 Boards with Built-in Ethernet, See How To Use Built-in Ethernet at (https://github.com/khoih-prog/EthernetWebServer_STM32/issues/1)
* 2) STM32 boards (with 64+K Flash) running EMC28J60 shields (to use USE_BUILTIN_ETHERNET = false)
* 3) STM32 boards (with 32+K Flash) running W5x00 Ethernet shields
*
*/

#define USE_BUILTIN_ETHERNET false //true
#define USE_BUILTIN_ETHERNET false //true
// If don't use USE_BUILTIN_ETHERNET, and USE_UIP_ETHERNET => use W5x00 with Ethernet library
#define USE_UIP_ETHERNET false

#include <EthernetWebServer_STM32.h>

Expand Down
11 changes: 8 additions & 3 deletions examples/HelloServer/HelloServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,31 @@
* Forked and modified from ESP8266 https://github.com/esp8266/Arduino/releases
* Built by Khoi Hoang https://github.com/khoih-prog/ESP8266_AT_WebServer
* Licensed under MIT license
* Version: 1.0.0
* Version: 1.0.1
*
* Original author:
* @file Esp8266WebServer.h
* @author Ivan Grokhotkov
*
* Version Modified By Date Comments
* ------- ----------- ---------- -----------
* 1.0.0 K Hoang 13/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc)
* 1.0.0 K Hoang 26/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc) and ENC28J60
* 1.0.1 K Hoang 28/02/2020 Add W5x00 Ethernet shields using Ethernet library
*****************************************************************************************************************************/
/*
* Currently support
* 1) STM32 boards with built-in Ethernet (to use USE_BUILTIN_ETHERNET = true) such as :
* - Nucleo-144 (F429ZI, F767ZI)
* - Discovery (STM32F746G-DISCOVERY)
* - All STM32 Boards with Built-in Ethernet, See How To Use Built-in Ethernet at (https://github.com/khoih-prog/EthernetWebServer_STM32/issues/1)
* 2) STM32 boards (with 64+K Flash) running EMC28J60 shields (to use USE_BUILTIN_ETHERNET = false)
* 3) STM32 boards (with 32+K Flash) running W5x00 Ethernet shields
*
*/

#define USE_BUILTIN_ETHERNET false //true
#define USE_BUILTIN_ETHERNET false //true
// If don't use USE_BUILTIN_ETHERNET, and USE_UIP_ETHERNET => use W5x00 with Ethernet library
#define USE_UIP_ETHERNET false

#include <EthernetWebServer_STM32.h>

Expand Down
11 changes: 8 additions & 3 deletions examples/HelloServer2/HelloServer2.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,31 @@
* Forked and modified from ESP8266 https://github.com/esp8266/Arduino/releases
* Built by Khoi Hoang https://github.com/khoih-prog/ESP8266_AT_WebServer
* Licensed under MIT license
* Version: 1.0.0
* Version: 1.0.1
*
* Original author:
* @file Esp8266WebServer.h
* @author Ivan Grokhotkov
*
* Version Modified By Date Comments
* ------- ----------- ---------- -----------
* 1.0.0 K Hoang 13/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc)
* 1.0.0 K Hoang 26/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc) and ENC28J60
* 1.0.1 K Hoang 28/02/2020 Add W5x00 Ethernet shields using Ethernet library
*****************************************************************************************************************************/
/*
* Currently support
* 1) STM32 boards with built-in Ethernet (to use USE_BUILTIN_ETHERNET = true) such as :
* - Nucleo-144 (F429ZI, F767ZI)
* - Discovery (STM32F746G-DISCOVERY)
* - All STM32 Boards with Built-in Ethernet, See How To Use Built-in Ethernet at (https://github.com/khoih-prog/EthernetWebServer_STM32/issues/1)
* 2) STM32 boards (with 64+K Flash) running EMC28J60 shields (to use USE_BUILTIN_ETHERNET = false)
* 3) STM32 boards (with 32+K Flash) running W5x00 Ethernet shields
*
*/

#define USE_BUILTIN_ETHERNET false //true
#define USE_BUILTIN_ETHERNET false //true
// If don't use USE_BUILTIN_ETHERNET, and USE_UIP_ETHERNET => use W5x00 with Ethernet library
#define USE_UIP_ETHERNET false

#include <EthernetWebServer_STM32.h>

Expand Down
11 changes: 8 additions & 3 deletions examples/HttpBasicAuth/HttpBasicAuth.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,31 @@
* Forked and modified from ESP8266 https://github.com/esp8266/Arduino/releases
* Built by Khoi Hoang https://github.com/khoih-prog/ESP8266_AT_WebServer
* Licensed under MIT license
* Version: 1.0.0
* Version: 1.0.1
*
* Original author:
* @file Esp8266WebServer.h
* @author Ivan Grokhotkov
*
* Version Modified By Date Comments
* ------- ----------- ---------- -----------
* 1.0.0 K Hoang 13/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc)
* 1.0.0 K Hoang 26/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc) and ENC28J60
* 1.0.1 K Hoang 28/02/2020 Add W5x00 Ethernet shields using Ethernet library
*****************************************************************************************************************************/
/*
* Currently support
* 1) STM32 boards with built-in Ethernet (to use USE_BUILTIN_ETHERNET = true) such as :
* - Nucleo-144 (F429ZI, F767ZI)
* - Discovery (STM32F746G-DISCOVERY)
* - All STM32 Boards with Built-in Ethernet, See How To Use Built-in Ethernet at (https://github.com/khoih-prog/EthernetWebServer_STM32/issues/1)
* 2) STM32 boards (with 64+K Flash) running EMC28J60 shields (to use USE_BUILTIN_ETHERNET = false)
* 3) STM32 boards (with 32+K Flash) running W5x00 Ethernet shields
*
*/

#define USE_BUILTIN_ETHERNET false //true
#define USE_BUILTIN_ETHERNET false //true
// If don't use USE_BUILTIN_ETHERNET, and USE_UIP_ETHERNET => use W5x00 with Ethernet library
#define USE_UIP_ETHERNET false

#include <EthernetWebServer_STM32.h>

Expand Down
11 changes: 8 additions & 3 deletions examples/PostServer/PostServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,31 @@
* Forked and modified from ESP8266 https://github.com/esp8266/Arduino/releases
* Built by Khoi Hoang https://github.com/khoih-prog/ESP8266_AT_WebServer
* Licensed under MIT license
* Version: 1.0.0
* Version: 1.0.1
*
* Original author:
* @file Esp8266WebServer.h
* @author Ivan Grokhotkov
*
* Version Modified By Date Comments
* ------- ----------- ---------- -----------
* 1.0.0 K Hoang 13/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc)
* 1.0.0 K Hoang 26/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc) and ENC28J60
* 1.0.1 K Hoang 28/02/2020 Add W5x00 Ethernet shields using Ethernet library
*****************************************************************************************************************************/
/*
* Currently support
* 1) STM32 boards with built-in Ethernet (to use USE_BUILTIN_ETHERNET = true) such as :
* - Nucleo-144 (F429ZI, F767ZI)
* - Discovery (STM32F746G-DISCOVERY)
* - All STM32 Boards with Built-in Ethernet, See How To Use Built-in Ethernet at (https://github.com/khoih-prog/EthernetWebServer_STM32/issues/1)
* 2) STM32 boards (with 64+K Flash) running EMC28J60 shields (to use USE_BUILTIN_ETHERNET = false)
* 3) STM32 boards (with 32+K Flash) running W5x00 Ethernet shields
*
*/

#define USE_BUILTIN_ETHERNET false //true
#define USE_BUILTIN_ETHERNET false //true
// If don't use USE_BUILTIN_ETHERNET, and USE_UIP_ETHERNET => use W5x00 with Ethernet library
#define USE_UIP_ETHERNET false

#include <EthernetWebServer_STM32.h>

Expand Down
11 changes: 8 additions & 3 deletions examples/SimpleAuthentication/SimpleAuthentication.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,31 @@
* Forked and modified from ESP8266 https://github.com/esp8266/Arduino/releases
* Built by Khoi Hoang https://github.com/khoih-prog/ESP8266_AT_WebServer
* Licensed under MIT license
* Version: 1.0.0
* Version: 1.0.1
*
* Original author:
* @file Esp8266WebServer.h
* @author Ivan Grokhotkov
*
* Version Modified By Date Comments
* ------- ----------- ---------- -----------
* 1.0.0 K Hoang 13/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc)
* 1.0.0 K Hoang 26/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc) and ENC28J60
* 1.0.1 K Hoang 28/02/2020 Add W5x00 Ethernet shields using Ethernet library
*****************************************************************************************************************************/
/*
* Currently support
* 1) STM32 boards with built-in Ethernet (to use USE_BUILTIN_ETHERNET = true) such as :
* - Nucleo-144 (F429ZI, F767ZI)
* - Discovery (STM32F746G-DISCOVERY)
* - All STM32 Boards with Built-in Ethernet, See How To Use Built-in Ethernet at (https://github.com/khoih-prog/EthernetWebServer_STM32/issues/1)
* 2) STM32 boards (with 64+K Flash) running EMC28J60 shields (to use USE_BUILTIN_ETHERNET = false)
* 3) STM32 boards (with 32+K Flash) running W5x00 Ethernet shields
*
*/

#define USE_BUILTIN_ETHERNET false //true
#define USE_BUILTIN_ETHERNET false //true
// If don't use USE_BUILTIN_ETHERNET, and USE_UIP_ETHERNET => use W5x00 with Ethernet library
#define USE_UIP_ETHERNET false

#include <EthernetWebServer_STM32.h>

Expand Down
4 changes: 2 additions & 2 deletions library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "EthernetWebServer_STM32",
"keywords": "WebServer, built-in Ethernet, Arduino, STM32, Ethernet shield, Nucleo-144",
"keywords": "WebServer, built-in Ethernet, Arduino, STM32, Ethernet shield, Nucleo-144, ENC28J60, W5x00",
"description": "Simple EthernetWebServer library for STM32 boards running built-in Ethernet or Ethernet shields",
"repository":
{
Expand All @@ -9,5 +9,5 @@
},
"frameworks": "arduino",
"platforms": "ststm32",
"version": "1.0.0"
"version": "1.0.1"
}
4 changes: 2 additions & 2 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name=EthernetWebServer_STM32
version=1.0.0
version=1.0.1
author=Khoi Hoang
license=MIT
maintainer=Khoi Hoang <khoih.prog@gmail.com>
sentence=EthernetWebServer is a library for STM32 boards running WebServer using built-in Ethernet or Ethernet shields
paragraph=The library supports HTTP GET and POST requests, provides argument parsing, handles one client at a time. It supports Arduino boards (STM32F series with 64+Kbytes of Flash) using built-in Ethernet (Nucleo-144: F429ZI, F767ZI, Discovery: STM32F746G-DISCOVERY) or ENC28j60 network shields.
paragraph=The library supports HTTP GET and POST requests, provides argument parsing, handles one client at a time. It supports Arduino boards (STM32F series with 64+Kbytes of Flash) using built-in Ethernet (Nucleo-144: F429ZI, F767ZI, Discovery: STM32F746G-DISCOVERY), ENC28J60 or W5x00 Ethernet shields.
category=Communication
url=https://github.com/khoih-prog/EthernetWebServer_STM32
architectures=stm32
Expand Down
5 changes: 3 additions & 2 deletions src/EthernetWebServer_STM32-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
* Forked and modified from ESP8266 https://github.com/esp8266/Arduino/releases
* Built by Khoi Hoang https://github.com/khoih-prog/ESP8266_AT_WebServer
* Licensed under MIT license
* Version: 1.0.0
* Version: 1.0.1
*
* Original author:
* @file Esp8266WebServer.h
* @author Ivan Grokhotkov
*
* Version Modified By Date Comments
* ------- ----------- ---------- -----------
* 1.0.0 K Hoang 13/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc)
* 1.0.0 K Hoang 26/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc) and ENC28J60
* 1.0.1 K Hoang 28/02/2020 Add W5x00 Ethernet shields using Ethernet library
*****************************************************************************************************************************/

#ifndef EthernetWebServer_STM32_impl_h
Expand Down
12 changes: 9 additions & 3 deletions src/EthernetWebServer_STM32.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
* Forked and modified from ESP8266 https://github.com/esp8266/Arduino/releases
* Built by Khoi Hoang https://github.com/khoih-prog/ESP8266_AT_WebServer
* Licensed under MIT license
* Version: 1.0.0
* Version: 1.0.1
*
* Original author:
* @file Esp8266WebServer.h
* @author Ivan Grokhotkov
*
* Version Modified By Date Comments
* ------- ----------- ---------- -----------
* 1.0.0 K Hoang 13/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc)
* 1.0.0 K Hoang 26/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc) and ENC28J60
* 1.0.1 K Hoang 28/02/2020 Add W5x00 Ethernet shields using Ethernet library
*****************************************************************************************************************************/

#ifndef EthernetWebServer_STM32_h
Expand All @@ -32,9 +33,14 @@
#if USE_BUILTIN_ETHERNET
#include <LwIP.h>
#include <STM32Ethernet.h>
#else
#warning Use built-in STM32 Ethernet
#elif USE_UIP_ETHERNET
#include <UIPEthernet.h>
#include <utility/logging.h>
#warning Use ENC28J60 Ethernet shield
#else
#include <Ethernet.h>
#warning Use W5x00 Ethernet shield
#endif

enum HTTPMethod { HTTP_ANY, HTTP_GET, HTTP_POST, HTTP_PUT, HTTP_PATCH, HTTP_DELETE, HTTP_OPTIONS };
Expand Down
6 changes: 4 additions & 2 deletions src/Parsing_STM32-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@
* Forked and modified from ESP8266 https://github.com/esp8266/Arduino/releases
* Built by Khoi Hoang https://github.com/khoih-prog/ESP8266_AT_WebServer
* Licensed under MIT license
* Version: 1.0.0
* Version: 1.0.1
*
* Original author:
* @file Esp8266WebServer.h
* @author Ivan Grokhotkov
*
* Version Modified By Date Comments
* ------- ----------- ---------- -----------
* 1.0.0 K Hoang 13/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc)
* 1.0.0 K Hoang 26/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc) and ENC28J60
* 1.0.1 K Hoang 28/02/2020 Add W5x00 Ethernet shields using Ethernet library
*****************************************************************************************************************************/

#ifndef Parsing_STM32_impl_h
#define Parsing_STM32_impl_h

Expand Down
5 changes: 3 additions & 2 deletions src/detail/Debug_STM32.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
* Forked and modified from ESP8266 https://github.com/esp8266/Arduino/releases
* Built by Khoi Hoang https://github.com/khoih-prog/ESP8266_AT_WebServer
* Licensed under MIT license
* Version: 1.0.0
* Version: 1.0.1
*
* Original author:
* @file Esp8266WebServer.h
* @author Ivan Grokhotkov
*
* Version Modified By Date Comments
* ------- ----------- ---------- -----------
* 1.0.0 K Hoang 13/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc)
* 1.0.0 K Hoang 26/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc) and ENC28J60
* 1.0.1 K Hoang 28/02/2020 Add W5x00 Ethernet shields using Ethernet library
*****************************************************************************************************************************/

#ifndef EthernetWebServer_STM32_Debug_H
Expand Down
5 changes: 3 additions & 2 deletions src/detail/RequestHandler_STM32.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
* Forked and modified from ESP8266 https://github.com/esp8266/Arduino/releases
* Built by Khoi Hoang https://github.com/khoih-prog/ESP8266_AT_WebServer
* Licensed under MIT license
* Version: 1.0.0
* Version: 1.0.1
*
* Original author:
* @file Esp8266WebServer.h
* @author Ivan Grokhotkov
*
* Version Modified By Date Comments
* ------- ----------- ---------- -----------
* 1.0.0 K Hoang 13/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc)
* 1.0.0 K Hoang 26/02/2020 Initial coding for STM32 with built-in Ethernet (Nucleo-144, DISCOVERY, etc) and ENC28J60
* 1.0.1 K Hoang 28/02/2020 Add W5x00 Ethernet shields using Ethernet library
*****************************************************************************************************************************/

#ifndef RequestHandler_STM32_h
Expand Down
Loading

0 comments on commit 092d5b4

Please sign in to comment.