feat: access point name and password setting, ap_on in status

- ap_ssid and ap_password on /api/network: empty name uses led-XXXXXX, a password of 8-63 characters
  makes the access point WPA2, empty is open; the password is never sent back (ap_password_set)
- a running access point restarts when its name or password changes
- /api/status reports ap_on; the web page gets the fields

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Sonnet 5.5 committed 2026-11-12 00:46:04 +13:00
1 parent af82cb4c4a
commit 59eb37cad5
7 files changed
+97 -6

No files matched your search

+9 -1
View File
@@ -117,7 +117,8 @@
<div class="subpage" data-sub="network" hidden>
<h2>Access point</h2>
<p>Network <strong id="apName">…</strong> (open). Address <strong>192.168.4.1</strong>.</p>
<p id="apInfo" hidden>Network <strong id="apName">…</strong> (open). Address <strong>192.168.4.1</strong>.</p>
<p id="apOffInfo" class="muted" hidden>Access point is off.</p>
<h2>Wi-Fi client</h2>
<p>Status: <span id="staState">…</span></p>
@@ -161,6 +162,13 @@
</label>
</div>
<label class="check"><input type="checkbox" id="apOn"> Access point on</label>
<label>Access point name <span class="muted">(blank for the default led-XXXXXX)</span>
<input id="apSsid" maxlength="32" autocomplete="off">
</label>
<label>Access point password <span class="muted" id="apPassHint">(blank keeps the current one)</span>
<input id="apPass" type="password" maxlength="63" autocomplete="off">
</label>
<label class="check"><input type="checkbox" id="apOpen"> Open network (no password)</label>
<label class="check"><input type="checkbox" id="ddpOn"> DDP and sync receive on</label>
<p class="muted">Turn it off to use only your Wi-Fi network. Turning it off needs a connected Wi-Fi network. If the network stays down for about a minute, the access point comes back on by itself.</p>
<button type="submit">Save network settings</button>