With the current version of Raspios, and at least on a Pi 3B, I reckon the micro-AP unofficial feature can be made to work reliably. Wpa-supplicant can drive the AP, no need to depend on hostapd. The AP can operate over zeroconf/link-local, no need for a DHCP server (there isn’t one in busybox IIRC, adding one could be possible). The stock dhcpcd config can be used.
Enabling/disabling the micro-AP can be done at any time, for what I see, as long as the change is done in a temporary network namespace (similar to this.) All in all that should be enough to provide a rescue network that allows users to log in, examine the situation, run raspi-config, fix their configuration and reboot.
The AP is literally a backdoor to the machine, so control is a concern. Automated AP start in case network configuration has failed isn't great for various reasons. Adding a user-defined wireless password to protect the AP creates a usability problem. The only sane way of providing the feature is, I think, through positive, simple and local user input. Give me a dedicated button, and spawning an open AP wouldn't bother me at all.
Which brings me to the point. I've looked at the gpio-shutdown overlay and to me it's just what the doctor ordered: on demand, could be activated from a keyboard key combination or with a GPIO button.
However I suspect the power button to be a specific case. I'd like to know:
- Which magic keyboard key to choose, and how to make the system(d) react to it? I'm looking for something that would work in both Desktop and Lite versions of Raspios.
- Which GPIO pin for the physical button in absence of keyboard?
Thanks in advance.