fablab-bergamo / Fab-O-matic

RFID machine access solution for a Fab Lab, based on ESP32. Uses modern C++ with Arduino framework. Hardware project is included.
https://www.fablabbergamo.it/2024/06/03/fabomatic1/
MIT License
2 stars 3 forks source link

Allow configuration of SSID & Password without flashing the firmware #9

Closed PBrunot closed 8 months ago

PBrunot commented 8 months ago

Once in a box usb port of ESP32 may not be easily accessible. Right now the configuration is in secrets.h as compile-time constants, so recompile+flash is needed.

Ideas to solve the probem:

Requires

To be investigated

valerionew commented 8 months ago

This works amazing, we've tested it before:

https://github.com/tzapu/WiFiManager

PBrunot commented 8 months ago

Thanks, this library looks perfect indeed. I will try it soon.

PBrunot commented 8 months ago

Completed.

When WiFi configuration fails at boot-time, the WiFi AP and portal is activated. ON LCD Screen, the IP address of the portal is shown. The AP name will be "ESP xxxxxx" depending on chip id.

When WiFi fails during runtime, the board will try to reconnect to MQTT broker every 30s with saved settings. There is no automatic portal launch in this case, because it may be a temporary AP failure.

LCD example: image

I tested with a real esp32s2 and a mobile phone. The web portal allows the user to perform following configuration:

Configuration is saved in EEPROM on successfully AP join.

Configuration Portal has a timeout after a few minutes.