feat: Wi-Fi access point with a setting, password and boot button
The controller runs an AP (SSID = hostname, 192.168.5.1) next to ESP-NOW, on by default. Network settings gain an on/off switch (ap_enabled) and an optional WPA2 password (ap_password, 8-63 chars; empty is open). A button on D7 (GPIO44) held at boot forces the AP on. Wi-Fi now starts before Ethernet, and a missing W5500 no longer aborts the boot: the web server and mDNS start anyway so the AP stays usable. Network tuning found while testing over the AP: HTTP backlog 10 and 12 open sockets (the default 5 dropped the 6th SYN, a 1 s stall on every page load), larger TCP and Wi-Fi buffers, and IPv6 link-local addresses so mDNS answers AAAA queries (browsers waited about a second for them). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9989dd3062
commit
f85021d40d
11 files changed
+197
-22
No files matched your search
@@ -61,6 +61,8 @@ Keys with meaning on the controller (others are stored as they are):
|
||||
|
||||
| Key | Checked | Meaning |
|
||||
|-----|---------|---------|
|
||||
| `ap_enabled` | | Wi-Fi access point (open, SSID = hostname, `192.168.5.1`); default `true`; applies after a restart. Holding the D7 button at boot forces it on |
|
||||
| `ap_password` | | AP password, 8-63 characters (WPA2); empty (default) is an open network; applies after a restart |
|
||||
| `hostname` | | mDNS name (`<hostname>.local`, default `led-controller`); applies after a restart |
|
||||
| `static_ips` | | List of `{ip, netmask?, gw, dns?}` tried in order when the Ethernet link comes up; the first whose gateway answers ARP is used, else DHCP, else `192.168.4.1/24` for a direct PC cable. Applies after a restart |
|
||||
| `global_brightness` | integer 0–255 | Global factor of each driver's brightness (see Groups). Stored only: the UI pushes each driver its combined value |
|
||||
|
||||
+1
-1
@@ -106,7 +106,7 @@ The preset editor:
|
||||
|
||||
## Settings
|
||||
|
||||
**Settings** (Edit mode) holds the controller's name, the ESP-NOW channel (for reference: the controller's channel is set at build time), its mDNS **hostname** and the **static IPs** it tries on the Ethernet link (DHCP when none answers). With no DHCP server, as on a cable straight to a PC, the controller is at `192.168.4.1`; give the PC a static IP such as `192.168.4.2`. Network changes apply after a restart. **Driver** in Settings sends a driver its name, LED count, colour order, startup mode, maximum brightness and direction over ESP-NOW, with no cable. **Update code** there sends a driver, or all of them, the led-driver code built into the controller. `led-cli` on a computer edits a driver's whole `settings.json` over USB.
|
||||
**Settings** (Edit mode) holds the controller's name, the ESP-NOW channel (for reference: the controller's channel is set at build time), a **Wi-Fi access point** switch (on by default; network named after the hostname, with an optional WPA2 password, controller at `192.168.5.1`; holding the button on D7 at boot forces it on), its mDNS **hostname** and the **static IPs** it tries on the Ethernet link (DHCP when none answers). With no DHCP server, as on a cable straight to a PC, the controller is at `192.168.4.1`; give the PC a static IP such as `192.168.4.2`. Network changes apply after a restart. **Driver** in Settings sends a driver its name, LED count, colour order, startup mode, maximum brightness and direction over ESP-NOW, with no cable. **Update code** there sends a driver, or all of them, the led-driver code built into the controller. `led-cli` on a computer edits a driver's whole `settings.json` over USB.
|
||||
|
||||

|
||||
|
||||
|
||||
Reference in new issue
Block a user