ESP32 Support

Lws provides a "factory" application

https://github.com/warmcat/lws-esp32-factory

and a test application which implements the generic lws server test apps

https://github.com/warmcat/lws-esp32-test-server-demos

The behaviours of the generic factory are are quite rich, and cover uploading SSL certs through factory and user configuration, AP selection and passphrase entry, and managing a switch to allow the user to force entry to user setup mode at boot subsequently.

The factory app comes with partitioning for a 1MB factory partition containing that app and data, and a single 2.9MB OTA partition containing the main app.

The factory app is able to do OTA updates for both the factory and OTA partition slots; updating the factory slot first writes the new image to the OTA slot and copies it into place at the next boot, after which the user can reload the OTA slot.

StateImageAP SSIDPortURLMode
Factory Reset or UninitializedFactoryAP: ESP_01234580http://192.168.4.1factory.html - to set certificates and serial
User configurationFactoryAP: config-model-serial443https://192.168.4.1index.html - user set up his AP information
OperationOTAStation only443https://model-serial.localOTA application