I suspect this is a problem that already has a "stock" solution; I need to deploy an ESP8266 device such that it will be able to connect to a secured local WiFi, but I can't know the credentials at the time the software is embedded on the device. Somehow, I'll need to be able to have the end user, with a regular computer (i.e. one that has a keyboard and screen!) "push" this information into the device. For preference, I'd like them to be able to do this over wireless, but a USB/Serial connection would be possible if it has to be done that way.
I guess I could just "bundle" the entire toolchain and source and have them run a script that prompts for this info, builds and uploads the software over USB. But given the ESP's ability to act as an AP, I can't help thinking there's a better way, and that someone has probably already packaged this!
(I suppose a side question worth asking is whether there might be some kind of peer-peer configuration that would be preferable. I want the ESP to have bidirectional, reliable, (i.e. TCP socket-like) communication with the computer host (it doesn't really need Internet access). But I don't really want anything that might compromise the security of that computer, so sticking with the end-user's regular WiFi seems likely the best option.)
What should I investigate? Or what suggestions does anyone have? Or what keyword search would have found me the answer!?
TIA!
The easy way is to use a third party library like WiFiManager: https://github.com/tzapu/WiFiManager
example usage: http://www.instructables.com/id/Avoid-Hard-Coding-WiFi-Credentials-on-Your-ESP8266/