controller: selectable hotspot protocol (WPA2/WPA3) with device capability probing

Probe the selected WiFi device with iw to determine which hotspot
protocols it can host: WPA2 requires AP mode; WPA3 requires SAE in AP
mode (SAE_OFFLOAD_AP, or a mac80211 driver with the CMAC cipher for
software SAE).  The Raspberry Pi's brcmfmac supports neither, so Pis
correctly offer WPA2 only (verified against real Pi 4/Pi 5 iw output).

The protocol is saved as hotspot.protocol in controller.yaml.
enable_hotspot() now always sets the Hotspot connection's key-mgmt
explicitly (sae + required PMF for WPA3) so a reused profile cannot
keep a stale protocol, and reverts to WPA2 if the driver rejects SAE.

New GET /api/hotspot/protocols endpoint; protocol dropdowns added to
both the ControllerPage React UI and the fallback controller UI.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Roland 2026-07-28 19:52:39 -06:00 • committed by lrnselfreliance
parent 2355095391
commit 8687816b84
10 changed files with 545 additions and 16 deletions

View file

@ -79,6 +79,11 @@ export async function getHotspotDevices() {
return controllerFetch('/hotspot/devices');
}
export async function getHotspotProtocols(device) {
const query = device ? `?device=${encodeURIComponent(device)}` : '';
return controllerFetch(`/hotspot/protocols${query}`);
}
export async function getHotspotSettings() {
return controllerFetch('/hotspot/settings');
}