Ethernet_Manager_STM32 for STM32 Credentials Management. Now supports LAN8720

Working libraries, libraries being ported and related hardware
Post Reply
khoih-prog
Posts: 102
Joined: Thu Feb 27, 2020 7:54 am
Location: Toronto

Ethernet_Manager_STM32 for STM32 Credentials Management. Now supports LAN8720

Post by khoih-prog »

Ethernet_Manager_STM32 Library

How To Install Using Arduino Library Manager


Why do we need this Ethernet_Manager_STM32 Library

- This is the new library, adding to the current WiFiManager sets of libraries. It's designed to help you eliminate hardcoding your Credentials in STM32F/L/H/G/WB/MP1 boards using Ethernet shields (W5100, W5200, W5500, ENC28J60, built-in LAN8742A Ethernet). It's currently not supporting SSL. Will support soon.
- You can update Credentials any time you need to change via Configure Portal. Data are saved in configurable locations in EEPROM.
- DoubleDetectDetector feature to force Config Portal when double reset is detected within predetermined time, default 10s.
- Configurable Config Portal Title to be either BoardName or default undistinguishable names.
- Examples are redesigned to separate Credentials / Defines / Dynamic Params / Code so that you can change Credentials / Dynamic Params quickly for each device. Example MQTT_ThingStream_Ethernet_STM32 will demonstrate how to use the dynamic parameters, entered via Config Portal, to connect to ThingStream MQTT Server at mqtt.thingstream.io.

New recent features:

- DoubleDetectDetector feature to force Config Portal when double reset is detected within predetermined time, default 10s.
- Configurable Config Portal Title to be either BoardName or default undistinguishable names.
- Examples are redesigned to separate Credentials / Defines / Dynamic Params / Code so that you can change Credentials / Dynamic Params quickly for each device


Releases v1.0.0

1. Initial coding to support STM32F/L/H/G/WB/MP1.
2. Provide support to W5x00, ENC28J60 and built-in LAN8742A Ethernet.
3. Supporting Ethernet, EthernetLarge, Ethernet2, Ethernet3, EthernetENC, UIPEthernet and STM32Ethernet Libraries


Currently Supported Boards

1. STM32 boards with built-in Ethernet LAN8742A such as :

- Nucleo-144 (F429ZI, F767ZI)
- Discovery (STM32F746G-DISCOVERY)
- All STM32 boards (STM32F/L/H/G/WB/MP1) with 32K+ Flash, with Built-in Ethernet

2. STM32F/L/H/G/WB/MP1 boards (with 32+K Flash) running W5x00 or ENC28J60 shields)

- Nucleo-144
- Nucleo-64
- Discovery
- Generic STM32F0, STM32F1, STM32F2, STM32F3, STM32F4, STM32F7 (with 64+K Flash): x8 and up
- STM32L0, STM32L1, STM32L4
- STM32G0, STM32G4
- STM32H7
- STM32WB
- STM32MP1
- LoRa boards
- 3-D printer boards
- Generic Flight Controllers
- Midatronics boards

Currently Supported Ethernet shields/modules

1. Built-in LAN8742A Ethernet using STM32Ethernet library v1.2.0+ and LwIP library v2.1.2+
2. W5x00 using Ethernet, EthernetLarge, Ethernet2 or Ethernet3 library
3. ENC28J60 using EthernetENC or UIPEthernet library


Examples:

1. AM2315_Ethernet_STM32
2. DHT11_Ethernet_STM32
3. Ethernet_STM32
4. MQTT_ThingStream_Ethernet_STM32
Last edited by khoih-prog on Mon Apr 12, 2021 12:00 am, edited 2 times in total.
khoih-prog
Posts: 102
Joined: Thu Feb 27, 2020 7:54 am
Location: Toronto

Re: Ethernet_Manager_STM32 for STM32 Credentials Management

Post by khoih-prog »

Debug Termimal Output Samples

1. The following is the sample terminal output when running example Ethernet_STM32 on NUCLEO_F767ZI board with LAN8742A Ethernet & STM32Ethernet Library demonstrating doubleResetDetect feature.

- 1.1. Normal run with TO_LOAD_DEFAULT_CONFIG_DATA = true

Code: Select all

Start Ethernet_STM32 on NUCLEO_F767ZI
Ethernet Shield type : W5x00 using Ethernet Library
Ethernet_Manager_STM32 v1.0.0

EEPROM size = 16384, start = 0
Flag read = 0xd0d04321
No doubleResetDetected
SetFlag write = 0xd0d01234
[ETM] ======= Start Default Config Data =======
[ETM] Header= Eth_NonSSL , BoardName= STM32-Ethernet
[ETM] StaticIP= 
[ETM] Header= STM32 , BoardName= STM32-Ethernet
[ETM] StaticIP= 192.168.2.222
[ETM] CCSum=0x 8ab ,RCSum=0x 8ab
[ETM] Header= STM32 , BoardName= STM32-Ethernet
[ETM] StaticIP= 192.168.2.222
[ETM] Start connectEthernet using Static IP = 192.168.2.222
[ETM] MAC:FE-98-FE-DE-D9-BA

- 1.2. DRD detected

Code: Select all

Start Ethernet_STM32 on NUCLEO_F767ZI
Ethernet Shield type : W5x00 using Ethernet Library
Ethernet_Manager_STM32 v1.0.0

EEPROM size = 16384, start = 0
Flag read = 0xd0d01234
doubleResetDetected
ClearFlag write = 0xd0d04321
[ETM] =====================
[ETM] DRD. Run ConfigPortal
[ETM] =====================
[ETM] ======= Start Default Config Data =======
[ETM] Header= Eth_NonSSL , BoardName= STM32-Ethernet
[ETM] StaticIP= 
[ETM] Header= STM32 , BoardName= STM32-Ethernet
[ETM] StaticIP= 192.168.2.222
[ETM] CCSum=0x 8ab ,RCSum=0x 8ab
[ETM] Header= STM32 , BoardName= STM32-Ethernet
[ETM] StaticIP= 192.168.2.222
[ETM] Start connectEthernet using Static IP = 192.168.2.222
[ETM] MAC:FE-9A-FD-D6-D9-BA

W5100 init, using SS_PIN_DEFAULT = 10, new ss_pin = 10, W5100Class::ss_pin = 10
W5100::init: W5500, SSIZE =4096
[ETM] IP: 192.168.2.222
[ETM] begin:Stay in CfgPortal: DRD
Connected! IP address: 192.168.2.222
Ethernet type is W5500

Your stored Credentials :
MQTT Server = mqtt_server
Port = 1883
MQTT UserName = mqtt_user
MQTT PWD = mqtt_pass
Subs Topics = mqtt_sub
Pubs Topics = mqtt_pub
H[ETM] h:Updating EEPROM. Please wait for reset
[ETM] h:Rst
H

- 1.3. Credentials entered and Saved

Code: Select all

Start Ethernet_STM32 on NUCLEO_F767ZI
Ethernet Shield type : W5x00 using Ethernet Library
Ethernet_Manager_STM32 v1.0.0

EEPROM size = 16384, start = 0
Flag read = 0xd0d04321
No doubleResetDetected
SetFlag write = 0xd0d01234
[ETM] ======= Start Default Config Data =======
[ETM] Header= Eth_NonSSL , BoardName= STM32-Ethernet
[ETM] StaticIP= 
[ETM] Header= STM32 , BoardName= STM32-Ethernet
[ETM] StaticIP= 192.168.2.222
[ETM] CCSum=0x 8ab ,RCSum=0x 8ab
[ETM] Header= STM32 , BoardName= STM32-Ethernet
[ETM] StaticIP= 192.168.2.222
[ETM] Start connectEthernet using Static IP = 192.168.2.222
[ETM] MAC:FE-98-FE-DE-DC-BA

W5100 init, using SS_PIN_DEFAULT = 10, new ss_pin = 10, W5100Class::ss_pin = 10
W5100::init: W5500, SSIZE =4096
[ETM] IP: 192.168.2.222
[ETM] begin:Ethernet Connected.
Connected! IP address: 192.168.2.222
Ethernet type is W5500

Your stored Credentials :
MQTT Server = mqtt_server
Port = 1883
MQTT UserName = mqtt_user
MQTT PWD = mqtt_pass
Subs Topics = mqtt_sub
Pubs Topics = mqtt_pub
Stop doubleResetDetecting
ClearFlag write = 0xd0d04321
HH
khoih-prog
Posts: 102
Joined: Thu Feb 27, 2020 7:54 am
Location: Toronto

Re: Ethernet_Manager_STM32 for STM32 Credentials Management

Post by khoih-prog »

Major Releases v1.2.0

1. Configurable Customs HTML Headers, including Customs Style, Customs Head Elements, CORS Header.
2. Add functions to control Config Portal from software or Virtual Switches.
3. Use more efficient FlashStorage_STM32 library
4. Fix Config Portal Bug.
5. Update examples
6. Bump up to version v1.2.0 to sync with Ethernet_Manager library
khoih-prog
Posts: 102
Joined: Thu Feb 27, 2020 7:54 am
Location: Toronto

Ethernet_Manager_STM32 for STM32 Credentials Management

Post by khoih-prog »

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
Post Reply

Return to “Libraries & Hardware”