pi-bootstrap
pi-bootstrap copied to clipboard
Add ad-hoc + Captive Portal workflow for network connectivity
Intended workflow
- On startup, check for network connectivity (use secret with reasonable defaults for host to ping - is there a better way?). If found, exit this setup script. We're good.
- If not found, scan for all SSIDs and store this list.
- Set up an ad-hoc network with the hostname of the device and no password
- Blink the on-board LED using this method in a clear pattern that cannot be confused with flash reading, like a 1 Hz blink.
- Use the Captive Portal method to display a webpage with the previously scanned SSIDs. See OpenNDS
- When the user selects one of them, prompt them to enter any information required to connect to that SSID (password, country)
- Write wpa_supplicant.conf with this information.
- Reboot and go to step 1
Relevant links https://www.raspberrypi.org/documentation/configuration/wireless/access-point-routed.md https://www.raspberrypi.org/forums/viewtopic.php?t=270776 (fix this script to better handle dhcpcd.conf without using line numbers).