- A short introduction, explaining to the audience what the article will be about.
- What is handled by the ESP IDF HTTP server?
- Setting up TLS sessions/doing the exchange
- TCP session management, keep-alives, listening on a socket
- Doing the initial parsing/copying when an HTTP request is incoming
- Invoking a callback in my code for me to do the rest
- Providing helpers for me to construct and send a response
- Make a labeled block diagram?
- What did I have to build
- Everything on top of that single callback
- First, just sending a fixed payload defined in a static string
- Then, integrating LittleFS to pull from a file system based on paths
requested by site visitors
- Include MIME type handling
- Creating a shell script which generates littlefs images from a folder in my repo, and copies it into the flash storage of the site
- Putting a simple static site of HTML/CSS into that folder and watching it get served from the device. That’s a website!
- Making it public
- Registering a domain name on Namecheap
- Pinning my device IP on my shitty Google Nest WiFi router, through the Home app and port forwarding 443
- Associating my IPV4 address of my router with my domain name
- Connecting via HTTP over the public internet!
- Making it HTTPS
- Using LetsEncrypt to generate some keys and certs
- Installing those keys/certs into flash memory using ESP IDF, and setting up their mbedtls to use them
- Enabling the HTTPS server in ESP IDF
- Problems: will have to manually rotate the LetsEncrypt stuff, but oh well!
- At that point, I had a technically functioning website.
- Very slow - running on an ESP32 with WiFi, no crypto accelerators
- (benchmark) x seconds to connect for the first time
- Limited by the 240kb of memory on my esp32
- Limited by the xkb of flash storage on the esp32
- Screenshot of the website
- Picture of the ESP32 sitting on a table
- Next steps
- Create an actual website to host on it
- Upgrade the firmware to get some better performance