Ethernet_Manager for Credentials Management. Now supporting ESP32-S2

Ethernet_Manager Library

How To Install Using Arduino Library Manager

Why do we need this Ethernet_Manager 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 Teensy, SAM DUE, SAMD21, SAMD51, nRF52, etc. boards using Ethernet shields (W5100, W5200, W5500, ENC28J60, Teensy 4.1 NativeEthernet, etc). It’s currently not supporting SSL. Will support soon.
  • It’s not supporting UNO/Nano/Mega and other AVR boards for not enough memory.
  • You can update Credentials any time you need to change via Configure Portal. Data are saved in configurable locations in EEPROM, DueFlashStorage or FlashStorage
  • Teensy LC, 2.0++ and 2.0 not supported.
  • 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

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.1.0

  1. Add support to ESP32 and ESP8266 using EEPROM, SPIFFS or LittleFS
  2. Add many complex MQTT Examples to demonstrate how to use the dynamic parameters, entered via Config Portal, to connect to ThingStream MQTT Server at mqtt.thingstream.io.

Releases v1.0.0

  1. Initial coding to support SAMD21/SAMD51, nRF52, SAM DUE, Teensy.
  2. Provide support to W5x00, ENC28J60 and Teensy 4.1 NativeEthernet.
  3. Supporting Ethernet, EthernetLarge, Ethernet2, Ethernet3, EthernetENC, UIPEthernet and Teensy NativeEthernet Libraries

Currently Supported Boards

  1. nRF52 boards, such as AdaFruit Feather nRF52832, nRF52840 Express, BlueFruit Sense, Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, NINA_B302_ublox, NINA_B112_ublox, etc.. Currently SSL WebClient is not working.
  2. SAM DUE
  3. SAMD21
  • Arduino SAMD21: ZERO, MKRs, NANO_33_IOT, etc.
  • Adafruit SAMD21 (M0): ItsyBitsy M0, Feather M0, Feather M0 Express, Metro M0 Express, Circuit Playground Express, Trinket M0, PIRkey, Hallowing M0, Crickit M0, etc.
  • SeeedStudio: LoRaWAN, Zero, Femto M0, XIAO M0, Wio GPS Board, etc.
  1. SAMD51
  • Adafruit SAMD51 (M4): Metro M4, Grand Central M4, ItsyBitsy M4, Feather M4 Express, Trellis M4, Metro M4 AirLift Lite, MONSTER M4SK Express, Hallowing M4, etc.
  • Seeeduino: WIO Terminal, Grove UI Wireless
  1. Teensy (4.1, 4.0, 3.6, 3.5, 3,2, 3.1, 3.0, LC)
  2. ESP32
  3. ESP8266.

Examples:

  1. AM2315_Ethernet
  2. DHT11_Ethernet
  3. Ethernet_Generic
  4. Ethernet_nRF52
  5. Ethernet_SAMD
  6. Ethernet_SAM_DUE
  7. Ethernet_Teensy
  8. MQTT_ThingStream_Ethernet_Generic
  9. MQTT_ThingStream_Ethernet_nRF52
  10. MQTT_ThingStream_Ethernet_SAMD
  11. MQTT_ThingStream_Ethernet_SAM_DUE
  12. MQTT_ThingStream_Ethernet_Teensy

Debug Termimal Output Samples

  1. The following is the sample terminal output when running example Ethernet_nRF52 on NRF52840_FEATHER with W5x00 using Ethernet2 Library
  • 1.1. Normal run
Start Ethernet_nRF52 on NRF52840_FEATHER
Ethernet Shield type W5x00 using Ethernet2 Library
Ethernet_Manager v1.1.0
[ETHERNET_WEBSERVER] =========== USE_ETHERNET2 ===========
[ETHERNET_WEBSERVER] Default SPI pinout:
[ETHERNET_WEBSERVER] MOSI: 25
[ETHERNET_WEBSERVER] MISO: 24
[ETHERNET_WEBSERVER] SCK: 26
[ETHERNET_WEBSERVER] SS: 5
[ETHERNET_WEBSERVER] =========================
[ETHERNET_WEBSERVER] Board : NRF52840_FEATHER , setCsPin: 10
[ETHERNET_WEBSERVER] =========================
[ETHERNET_WEBSERVER] Currently Used SPI pinout:
[ETHERNET_WEBSERVER] MOSI: 25
[ETHERNET_WEBSERVER] MISO: 24
[ETHERNET_WEBSERVER] SCK: 26
[ETHERNET_WEBSERVER] SS: 5
[ETHERNET_WEBSERVER] =========================
[ETM] ======= Start Default Config Data =======
[ETM] Header= Eth_NonSSL , BoardName= Air-Control
[ETM] StaticIP= 
[ETM] i= 0 ,id= mqtt
[ETM] data= default-mqtt-server
[ETM] i= 1 ,id= mqpt
[ETM] data= 1883
[ETM] i= 2 ,id= user
[ETM] data= default-mqtt-username
[ETM] i= 3 ,id= mqpw
[ETM] data= default-mqtt-password
[ETM] i= 4 ,id= subs
[ETM] data= default-mqtt-SubTopic
[ETM] i= 5 ,id= pubs
[ETM] data= default-mqtt-PubTopic
[ETM] LoadCfgFile 
[ETM] OK
[ETM] LoadCredFile 
[ETM] ChkCrR: Buffer allocated, Sz= 35
[ETM] ChkCrR:pdata= new-mqtt-server ,len= 34
[ETM] ChkCrR:pdata= 1883 ,len= 6
[ETM] ChkCrR:pdata= new-mqtt-username ,len= 34
[ETM] ChkCrR:pdata= old-mqtt-password ,len= 34
[ETM] ChkCrR:pdata= old-mqtt-SubTopic ,len= 34
[ETM] ChkCrR:pdata= old-mqtt-PubTopic ,len= 34
[ETM] OK
[ETM] CrCCSum=0x 217e ,CrRCSum=0x 217e
[ETM] Buffer freed
[ETM] CCSum=0x 6e7 ,RCSum=0x 6e7
[ETM] LoadCredFile 
[ETM] CrR:pdata= new-mqtt-server ,len= 34
[ETM] CrR:pdata= 1883 ,len= 6
[ETM] CrR:pdata= new-mqtt-username ,len= 34
[ETM] CrR:pdata= old-mqtt-password ,len= 34
[ETM] CrR:pdata= old-mqtt-SubTopic ,len= 34
[ETM] CrR:pdata= old-mqtt-PubTopic ,len= 34
[ETM] OK
[ETM] CrCCSum=0x 217e ,CrRCSum=0x 217e
[ETM] Valid Stored Dynamic Data
[ETM] ======= Start Stored Config Data =======
[ETM] Header= nRF52 , BoardName= nRF52_W5500
[ETM] StaticIP= 192.168.2.222
[ETM] i= 0 ,id= mqtt
[ETM] data= new-mqtt-server
[ETM] i= 1 ,id= mqpt
[ETM] data= 1883
[ETM] i= 2 ,id= user
[ETM] data= new-mqtt-username
[ETM] i= 3 ,id= mqpw
[ETM] data= old-mqtt-password
[ETM] i= 4 ,id= subs
[ETM] data= old-mqtt-SubTopic
[ETM] i= 5 ,id= pubs
[ETM] data= old-mqtt-PubTopic
[ETM] Start connectEthernet using Static IP = 192.168.2.222
[ETM] MAC:FE-9F-FA-D8-DC-BA
[ETM] IP: 192.168.2.222
[ETM] begin:Ethernet Connected.
Connected! IP address: 192.168.2.222
H
Your stored Credentials :
MQTT Server = new-mqtt-server
Port = 1883
MQTT UserName = new-mqtt-username
MQTT PWD = old-mqtt-password
Subs Topics = old-mqtt-SubTopic
Pubs Topics = old-mqtt-PubTopic
  • 1.2 DoubleResetDetected
Start Ethernet_nRF52 on NRF52840_FEATHER
Ethernet Shield type : W5x00 using Ethernet2 Library
Ethernet_Manager v1.1.0
[ETHERNET_WEBSERVER] =========== USE_ETHERNET2 ===========
[ETHERNET_WEBSERVER] Default SPI pinout:
[ETHERNET_WEBSERVER] MOSI: 25
[ETHERNET_WEBSERVER] MISO: 24
[ETHERNET_WEBSERVER] SCK: 26
[ETHERNET_WEBSERVER] SS: 5
[ETHERNET_WEBSERVER] =========================
[ETHERNET_WEBSERVER] Board : NRF52840_FEATHER , setCsPin: 10
[ETHERNET_WEBSERVER] =========================
[ETHERNET_WEBSERVER] Currently Used SPI pinout:
[ETHERNET_WEBSERVER] MOSI: 25
[ETHERNET_WEBSERVER] MISO: 24
[ETHERNET_WEBSERVER] SCK: 26
[ETHERNET_WEBSERVER] SS: 5
[ETHERNET_WEBSERVER] =========================
LittleFS Flag read = 0xd0d01234
Flag read = 0xd0d01234
doubleResetDetected
Saving to DRD file : 0xd0d04321
Saving DRD file OK
LittleFS Flag read = 0xd0d04321
ClearFlag write = 0xd0d04321
[ETM] =====================
[ETM] DRD. Run ConfigPortal
[ETM] =====================
[ETM] ======= Start Default Config Data =======
[ETM] Header= Eth_NonSSL , BoardName= Air-Control
[ETM] StaticIP= 
[ETM] i= 0 ,id= mqtt
[ETM] data= default-mqtt-server
[ETM] i= 1 ,id= mqpt
[ETM] data= 1883
[ETM] i= 2 ,id= user
[ETM] data= default-mqtt-username
[ETM] i= 3 ,id= mqpw
[ETM] data= default-mqtt-password
[ETM] i= 4 ,id= subs
[ETM] data= default-mqtt-SubTopic
[ETM] i= 5 ,id= pubs
[ETM] data= default-mqtt-PubTopic
[ETM] LoadCfgFile 
[ETM] OK
[ETM] LoadCredFile 
[ETM] ChkCrR: Buffer allocated, Sz= 35
[ETM] ChkCrR:pdata= new-mqtt-server ,len= 34
[ETM] ChkCrR:pdata= 1883 ,len= 6
[ETM] ChkCrR:pdata= new-mqtt-username ,len= 34
[ETM] ChkCrR:pdata= old-mqtt-password ,len= 34
[ETM] ChkCrR:pdata= old-mqtt-SubTopic ,len= 34
[ETM] ChkCrR:pdata= old-mqtt-PubTopic ,len= 34
[ETM] OK
[ETM] CrCCSum=0x 217e ,CrRCSum=0x 217e
[ETM] Buffer freed
[ETM] CCSum=0x 6e7 ,RCSum=0x 6e7
[ETM] LoadCredFile 
[ETM] CrR:pdata= new-mqtt-server ,len= 34
[ETM] CrR:pdata= 1883 ,len= 6
[ETM] CrR:pdata= new-mqtt-username ,len= 34
[ETM] CrR:pdata= old-mqtt-password ,len= 34
[ETM] CrR:pdata= old-mqtt-SubTopic ,len= 34
[ETM] CrR:pdata= old-mqtt-PubTopic ,len= 34
[ETM] OK
[ETM] CrCCSum=0x 217e ,CrRCSum=0x 217e
[ETM] Valid Stored Dynamic Data
[ETM] ======= Start Stored Config Data =======
[ETM] Header= nRF52 , BoardName= nRF52_W5500
[ETM] StaticIP= 192.168.2.222
[ETM] i= 0 ,id= mqtt
[ETM] data= new-mqtt-server
[ETM] i= 1 ,id= mqpt
[ETM] data= 1883
[ETM] i= 2 ,id= user
[ETM] data= new-mqtt-username
[ETM] i= 3 ,id= mqpw
[ETM] data= old-mqtt-password
[ETM] i= 4 ,id= subs
[ETM] data= old-mqtt-SubTopic
[ETM] i= 5 ,id= pubs
[ETM] data= old-mqtt-PubTopic
[ETM] Start connectEthernet using Static IP = 192.168.2.222
[ETM] MAC:FE-99-F8-DF-DA-BA
[ETM] IP: 192.168.2.222
[ETM] begin:Stay in CfgPortal: DRD
[ETM] CfgIP= 192.168.2.222
Connected! IP address: 192.168.2.222
H
Your stored Credentials :
MQTT Server = new-mqtt-server
Port = 1883
MQTT UserName = new-mqtt-username
MQTT PWD = old-mqtt-password
Subs Topics = old-mqtt-SubTopic
Pubs Topics = old-mqtt-PubTopic
HHHH

Your stored Credentials :
MQTT Server = new-mqtt-server
Port = 1883
MQTT UserName = new-mqtt-username
MQTT PWD = old-mqtt-password
Subs Topics = old-mqtt-SubTopic
Pubs Topics = old-mqtt-PubTopic
HHHH
  • 1.3. Credentials entered and Saved
[ETM] h:items updated = 0
[ETM] h:key = ip , value = 192.168.2.223
[ETM] h:ip
[ETM] h:items updated = 1
[ETM] h:key = nm , value = nRF52_W5500
[ETM] h:nm
[ETM] h:items updated = 2
[ETM] h:key = mqtt , value = new-mqtt-server
[ETM] h2:myMenuItems[ 0 ]= new-mqtt-server
[ETM] h:items updated = 3
[ETM] h:key = mqpt , value = 1883
[ETM] h2:myMenuItems[ 1 ]= 1883
[ETM] h:items updated = 4
[ETM] h:key = user , value = new-mqtt-username
[ETM] h2:myMenuItems[ 2 ]= new-mqtt-username
[ETM] h:items updated = 5
[ETM] h:key = mqpw , value = old-mqtt-password
[ETM] h2:myMenuItems[ 3 ]= old-mqtt-password
[ETM] h:items updated = 6
[ETM] h:key = subs , value = old-mqtt-SubTopic
[ETM] h2:myMenuItems[ 4 ]= old-mqtt-SubTopic
[ETM] h:items updated = 7
[ETM] h:key = pubs , value = old-mqtt-PubTopic
[ETM] h2:myMenuItems[ 5 ]= old-mqtt-PubTopic
[ETM] h:Updating EEPROM. Please wait for reset
[ETM] SaveCfgFile 
[ETM] WCSum=0x 6e8
[ETM] OK
[ETM] SaveBkUpCfgFile 
[ETM] OK
[ETM] SaveCredFile 
[ETM] CW1:pdata= new-mqtt-server ,len= 34
[ETM] CW1:pdata= 1883 ,len= 6
[ETM] CW1:pdata= new-mqtt-username ,len= 34
[ETM] CW1:pdata= old-mqtt-password ,len= 34
[ETM] CW1:pdata= old-mqtt-SubTopic ,len= 34
[ETM] CW1:pdata= old-mqtt-PubTopic ,len= 34
[ETM] OK
[ETM] CrWCSum= 217e
[ETM] SaveBkUpCredFile 
[ETM] CW2:pdata= new-mqtt-server ,len= 34
[ETM] CW2:pdata= 1883 ,len= 6
[ETM] CW2:pdata= new-mqtt-username ,len= 34
[ETM] CW2:pdata= old-mqtt-password ,len= 34
[ETM] CW2:pdata= old-mqtt-SubTopic ,len= 34
[ETM] CW2:pdata= old-mqtt-PubTopic ,len= 34
[ETM] OK
[ETM] h:Rst

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_SAMD library

  4. Add support to ESP32-S2 (ESP32-S2 Saola and AI-Thinker ESP-12K)

  5. Add Instructions to install ESP32-S2 core

  6. Fix Config Portal Bug.

  7. Update examples

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.