I've got a classic use-case here, one that I imagine almost everybody using these chips will understand and probably want to solve elegantly somehow. It's the initial configuration problem - how do you get a wifi ssid and password onto a device that you don't necessarily want to equip with both a keyboard and a screen?
I've seen a number of approaches over the years from the discovery via a custom protocol to the more modern QR code on the device to the downright strange (but cool) optical handshaking of the electric imp.
But leveraging the power of the wifi chip to host a little configuration web page seems like the way to go for me, so let me outline my user story. I open the box of my lovely new sensor for my home aquaponics lab, and I insert the batteries. Now the device is primed for configuration, and it broadcasts an Access Point called 'Configure My Sensor-xx-xx' (last bit of MAC address).
If you connect your laptop, phone etc to this access point, you can visit a webpage that displays a little list of access points that have been found in the area recently. You can choose one, type in a password and click 'Connect'. After testing for connectivity, the webpage says 'Success' and then shuts down the AP.
So I need a way to get minimal functionality onto this webpage - passing data back and forth to get the scan results and set the password etc.
Looking at various web server projects, I am impressed and very happy to be participating with people sharing their code - but I'm having trouble knowing which code to try. I guess that many of the fine features people are struggling to implement are redundant in my use-case. Instead, a more pressing concern might be available memory.
Can anyone help me choose which project code to evaluate first? (I'm working in nodemcu lua in case it isn't obvious btw).
Many thanks in advance