1ESP32 Support 2============= 3 4See \ref esp32 for details on how to build lws as a component in an ESP-IDF project. 5 6Lws provides a "factory" application 7 8https://github.com/warmcat/lws-esp32-factory 9 10and a test application which implements the generic lws server test apps 11 12https://github.com/warmcat/lws-esp32-test-server-demos 13 14The 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. 15 16The 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. 17 18The 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. 19 20State|Image|AP SSID|Port|URL|Mode 21---|---|---|---|---|--- 22Factory Reset or Uninitialized|Factory|AP: ESP_012345|80|http://192.168.4.1|factory.html - to set certificates and serial 23User configuration|Factory|AP: config-model-serial|443|https://192.168.4.1|index.html - user set up his AP information 24Operation|OTA|Station only|443|https://model-serial.local|OTA application 25 26## Basic Auth 27 28The lws-esp32-test-server-demos app also demos basic auth. 29 30On a normal platform this is done by binding a mount to a text file somewhere in the filesystem, which 31contains user:password information one per line. 32 33On ESP32 there is not necessarily any generic VFS in use. So instead, the basic auth lookup is bound to 34a given nvs domain, where the username is the key and the password the value. main/main.c in the test 35demos app shows how to both make the mount use basic auth, and how to set a user:password combination 36using nvs. 37 38