Public Access
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
4.0 KiB
4.0 KiB
M1 — Wi-Fi Service, Wi-Fi Tools, IRC
Goal: the device joins your Wi-Fi by itself, syncs its clock, keeps an IRC session alive in the background, and gives passive Wi-Fi diagnostics with full-frame captures.
Decisions (design round 2026-10-02)
| # | Decision |
|---|---|
| Q40 | Up to 8 Saved Networks, joined strongest-first. Added from a scan or as a hidden network. Open networks are allowed; enterprise (802.1X) is not. |
| Q41 / Q48 | The Wi-Fi Service stays Connected whenever enabled and a Saved Network is in range. Settings has a Wi-Fi On/Off switch. Monitoring happens only while Wi-Fi Tools is open; the device reconnects on exit. |
| Q42 | Captures record full frames, from a fixed Wi-Fi channel or hopping, to /captures/wifi/YYYYMMDD-HHMMSS.pcap. Band-wide views hop across channels 1–13. |
| Q43 | The signal tracker clicks faster as the signal gets stronger. On by default, mutable. |
| Q44 | IRC shows one Buffer at a time; Tab cycles Buffers. Commands: /join /part /msg /me /nick /topic /names /quit /raw. Logs go to /irc/<network>/<buffer>/YYYY-MM-DD.log. |
| Q45 | TLS verifies server certificates against the bundled certificate authorities. Per server, a self-signed certificate can be pinned on first use. |
| Q46 | If RAM is short: switch the frame buffer to 8-bit colour. Keep the AtomS3 Wi-Fi co-processor in mind. |
| Q47 | Passwords are stored in NVS without flash encryption (revisit before any public release). |
| IRC | The IRC Service stays connected in the background once the App has started it, until /quit or disconnect. It does not start at boot. |
| Q49 | Opening a Monitoring view while IRC is connected asks first. IRC then pauses, and reconnects and rejoins afterwards; its Buffers show the gap. |
| Q50 | Reconnects after drops wait 5 s, 10 s, 30 s … up to 5 min. |
| Q51 | Mentions and private messages raise Notifications. Other traffic only counts as unread (Status Bar shows the total). |
| M0 | The Storage Clean-up screen lands here, once IRC Logs and Captures exist. |
Done when
- Wi-Fi joins the strongest Saved Network at boot. The Status Bar shows Wi-Fi state, and the clock is set over NTP.
- Settings → Wi-Fi: On/Off, scan and add a network (with password), add a hidden network, forget a network.
- The IRC App configures one server (host, port, TLS, nick, SASL or NickServ, auto-join IRC channels). It connects and keeps running after you leave the App. Mentions notify.
- IRC reconnects after Wi-Fi loss or a server drop, and rejoins its IRC channels. Logs are written to the SD card (and stop past 90% usage).
- Wi-Fi Tools: access-point list, channel occupancy, signal tracker, packet counters, probe requests (logged), and pcap capture that opens in Wireshark.
- Settings → Storage → Clean-up deletes IRC Logs, probe Logs and Wi-Fi Captures older than a chosen age, with a preview of the space freed.
- Free heap stays above about 40 KB with Wi-Fi, TLS-connected IRC and the UI running.
Work breakdown (proposed order)
-
Memory baseline: measure the heap with Wi-Fi Connected plus one TLS connection. Switch the frame buffer to 8-bit if the margin is too thin.
-
Wi-Fi Service:
- Saved Networks in NVS.
- Choosing the network (host-tested).
- The Off / Connecting / Connected / Monitoring state machine (host-tested).
- NTP → Clock.
- Status Bar indicator.
- Settings → Wi-Fi pages.
-
Log writing: a Log writer that respects the Storage rules, daily files, and the Storage Clean-up screen (selection logic host-tested).
-
IRC Service (host-tested core):
- message parser and serializer;
- registration, SASL PLAIN and NickServ;
- PING/PONG;
- Buffers with unread counts and Mention detection;
- reconnect backoff, and pause/resume around Monitoring.
Then the TLS transport with the certificate bundle.
-
IRC App: Buffer view, input line, command parser (host-tested), server settings page.
-
Wi-Fi Tools App: the six views; a pcap writer (host-tested); channel hopper; clicker for the signal tracker.