networking M1-M2: ethernet on the DOM-WLE-LAN, net-eth control plane, v3 standalone workspace - #319
Draft
Yona-Appletree wants to merge 11 commits into
Draft
networking M1-M2: ethernet on the DOM-WLE-LAN, net-eth control plane, v3 standalone workspace#319Yona-Appletree wants to merge 11 commits into
Yona-Appletree wants to merge 11 commits into
Conversation
…p M1 MDIO scan (PHY id + part-name guess) then embassy-net DHCP + TCP echo on :7777, on esp-hal git-main (classic EMAC merged 2026-05-17, unreleased). Clock-topology fallbacks behind features: osc-en-16 (WT32-style gated osc), apll-out-16/17 (NOTE: APLL mode is documented wifi/ESP-NOW-incompatible), phy-reset-5. Quarantined workspace on the esp toolchain per the per-chip toolchain ADR; force-frame-pointers deliberately absent (Xtensa LLVM ICE in compiler_builtins, noted in .cargo/config.toml). Plan: ~/.photomancer/planning/lp2025/2026-08-03-1438-wifi-discovery/ (M1/G1) Co-Authored-By: Claude Fable 5 <[email protected]>
DOM-WLE-LAN v2.65 findings so far: LAN8720A PHY (photo-confirmed), but it answers SMI on NO pin pair in any topology — EMAC 23/18 under external/ APLL16/APLL17 clocks, full bit-bang pair sweep, enable pins high/low, and a transition census showing GPIO0 (and everything else) static. Leading hypothesis: the PHY rail is unpowered on USB-only power. Co-Authored-By: Claude Fable 5 <[email protected]>
…CP echo verified The board wires NO SMI bus: every pin pair swept clocked and unclocked, nothing answers, but the LAN8720A negotiates link autonomously (strap config). Winning topology: ESP32 generates the 50 MHz RMII clock via APLL on GPIO17 (EMAC_CLK_180; GPIO16 phase does NOT pass packets), FixedLinkPhy assumes 100M/full, MDC/MDIO parked on inert pins. DHCP lease + host TCP echo round-trip verified on the bench (192.168.1.38). Consequence to carry into G1: APLL is documented incompatible with wifi/ESP-NOW on classic — on this board ethernet and radio are mutually exclusive. Co-Authored-By: Claude Fable 5 <[email protected]>
…245 tail) Deletes v3's local StackJsonWriter, timed_write_server_msg, server_message_detail, and bespoke chunked-write loop in favor of the shared ChunkedWriter/server_msg half C6 and S3 already use; adds the chip-agnostic WritePolicy::UART0 (64 B chunks sized in line time at 921600 baud, 250 ms wedge backstop). RX drain between TX chunks is preserved via ChunkedWriter's on_chunk hook plus a trailing drain, matching the original semantics (strictly more draining, never less). v3 io_task 441 → 310 lines and now pure transport, the shape M2's network layer sits beside. All three fw builds green; C6 headroom 974,240 B. Co-Authored-By: Claude Fable 5 <[email protected]>
…to git The unreleased classic-ESP32 EMAC driver (esp-hal git main, merged 2026-05-17) can only be pinned via [patch], and patches are workspace-global — so the pin is quarantined by making fw-esp32v3 its own workspace (Q-M2, networking M2-P2), extending the per-chip toolchain quarantine. The crate's Cargo.toml mirrors the root patch table for its graph and pins esp-hal/esp-rtos/esp-alloc/esp-backtrace/esp-println/ esp-bootloader-esp-idf/esp-rom-sys/esp-storage to spike-tested rev 39abaae0; unpin instructions are in the header comment. Fallout absorbed here: - radio_ram_probe + esp-radio retired (links-slot clash with the git cohort; numbers preserved in the v3 flash-budget ADR; DOM-WLE-LAN's APLL-clocked EMAC excludes the radio regardless) - esp-storage = the git copy in this workspace, not the third_party fork (git esp-bootloader's partition API takes its concrete FlashStorage); the fork's panic-unaligned-buffer guard is noted as re-add-later debt - LpfsPartition::locate takes the concrete FlashStorage (upstream API drift); embedded-storage impls now feature-gated upstream, enabled - justfile: fw_esp32v3_elf points at the crate-local target dir; stale clippy-host exclude dropped; clippy matrix loses the probe entry Validated: release-esp32v3 build green; just fw-esp32v3-size-check = 1,820,016 B / 3 MB (headroom 1,325,712 B — the git cohort costs ~112 KB vs crates.io 1.1.1); just clippy-fw-esp32v3 matrix green; root workspace metadata clean without the member. Co-Authored-By: Claude Fable 5 <[email protected]>
…increment) DOM-WLE-LAN EMAC in the SERVER image: board/esp32v3/eth.rs carries the bench-proven configuration (APLL out GPIO17, fixed-link PHY — no SMI exists on this board, MDC/MDIO parked inert), embassy-net + DHCP glue lands chip-agnostically in fw-esp32-common::net behind a new 'net' feature (NetStatus static, init_stack over embassy_net::driver::Driver — the seam is the driver trait, no invented abstraction), and the IP is logged through the normal logger onto the serial wire. DMA rings sized <4,4> (~12.4 KiB) for the zero-sum dram_seg; MAC = efuse base with the locally-administered bit (no Ethernet slot in this rev's efuse API). Feature OFF (default): image unchanged. Feature ON: +50.5 KiB flash, +15.8 KiB .bss paid out of .stack (41,536 → 25,600 B) — flagged for the P5 heap/stack re-tune before GLSL-compile-under-net is trusted. Validated: builds+clippy green both ways; fw-esp32-common checks green under both toolchains and from the root workspace. Co-Authored-By: Claude Fable 5 <[email protected]>
…ard def smoltcp 0.13 gates echo replies behind the new auto-icmp-echo-reply feature (embassy-net's 'icmp' only enables IcmpSocket — a bench lesson: the device ARP'd fine while dropping pings). Verified on the bench: 4/4 replies at ~0.8 ms while the server renders. dom-z-102.json description now records the dual identity (PCB silkscreen DOM-WLE-LAN v2.65 = vendor model DOM-Z-102), the photo-confirmed LAN8720A with NO SMI bus, the APLL-17-only clock topology, and the ethernet-XOR- radio consequence; machine-readable ethernet resource deferred to M7. Co-Authored-By: Claude Fable 5 <[email protected]>
…sp32v3 The workspace split removed fw-esp32v3 from the root fmt-check's coverage; the clippy recipe now runs cargo fmt --check in the crate first so drift there stays gated in CI. Co-Authored-By: Claude Fable 5 <[email protected]>
…fi-discovery-5e2db2
…rena) Post-merge bench (2026-08-04): with project format 4 accepted, the net-eth image blew the ProCpu stack guard during project auto-load — inside the recursive GLSL parse, on the 25,488 B .stack the feature's ~15.9 KiB of .bss left behind — twice per power-on, landing in safe mode. Exactly the P5 trap the M2 handoff predicted; this is the minimal re-tune pulled forward so the bench could run at all. HEAP_SIZE 88 KiB under net-eth puts .stack at 48,016 B (proven non-net figure ~47 KiB). Bench-verified on the DOM-WLE-LAN: quad-strip project loads, compiles, renders at a sustained 45 fps with the EMAC up and DHCP soliciting; 107,648 B heap free of 155,644. Non-net builds keep the proven 110 KiB. P5 still owns the formal size/heap gates. Co-Authored-By: Claude Fable 5 <[email protected]>
… (M2-P3)
The settings file joins the /.lp root family beside device.json: device-
scoped, survives project pushes, dies with a full wipe back to defaults.
Firmware only reads it (once, at boot); Studio will stamp it over the
serial wire like device.json. Posture is the family one — lenient load,
version bump-and-refuse — with per-field leniency below: a malformed
static address or unusable hostname drops that field with a warning and
the device boots reachable on DHCP with the derived name instead.
- lpa-server::net_settings: v1 shape {mode ethernet|wifi|off, hostname,
wifi creds (carried for the C6 STA provider, M2-P6), static_ipv4},
host-tested (6 tests).
- fw-esp32-common::net: NetOptions (hostname override, static v4) +
from_settings resolver; hostname defaults to lp-<mac6> derived from
the driver MAC and rides DHCP option 12 (dhcpv4-hostname feature);
static configs use Config::ipv4_static and the same status loop.
- fw-esp32v3: filesystem now mounts BEFORE start_network so net.json can
shape the stack; the medium gate is chip-side (mode=wifi on this
APLL-ethernet board logs why and stays off, mode=off is honored).
- justfile: clippy-fw-esp32v3 gains the net-eth arm — the feature was
entirely unlinted, and it stays off in shipped builds until P5 prices
it, which is exactly the condition under which unlinted code rots.
Bench-verified on the DOM-WLE-LAN (no file → defaults):
net: hostname=lp-ecf634 ipv4=dhcp; project loads and renders 46 fps.
Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plan: lp2025/2026-08-03-1438-wifi-discovery
Path: ~/.photomancer/planning/lp2025/2026-08-03-1438-wifi-discovery/plan.md
First tranche of the networking roadmap (~/.photomancer/planning/lp2025/2026-08-03-1438-wifi-discovery/ — lg, M1–M8). This PR lands M1 plus M2 phases P1–P3; it is DRAFT because M2 P4–P6 continue on this branch.
What's here
spikes/net-bringup-classic— classic-ESP32 EMAC bring-up on the Zook Dome board (DOM-WLE-LAN v2.65). Findings: LAN8720A with no SMI bus wired (full bit-banged pin-pair sweep), RMII clock = APLL out on GPIO17 only, fixed-link operation, DHCP + TCP echo verified on silicon. Consequence recorded: ethernet and wifi/ESP-NOW are mutually exclusive on this board (APLL).WritePolicy::UART0; RX-drain semantics preserved; v3 io_task is now pure transport.net-ethfeature): EMAC + embassy-net + DHCP in the real server image, IP logged through the normal logger; ping answered (smoltcpauto-icmp-echo-reply). Feature off = image unchanged. Bench-validated: DHCP lease + ARP + 4/4 pings while the empty server loop ran at 839 fps. Cost: +50.5 KiB flash, +15.8 KiB .bss..stackthe feature's statics left behind.HEAP_SIZEis now 88 KiB under net-eth only, restoring.stackto 48,016 B. Bench-verified: the quad-strip project loads, compiles, and renders at 46 fps with the EMAC up. P5 still owns the formal size/heap gates./.lp/net.json+ hostname): device-scoped network settings at the fs root,/.lpfamily posture (lenient load, version bump-and-refuse, wipe-to-blank = defaults; per-field leniency below that). Shape:mode ethernet|wifi|off,hostname, wifi creds (carried for the C6 STA provider, P6),static_ipv4. Hostname defaults tolp-<mac6>derived from the interface MAC and rides DHCP option 12; static configs useConfig::ipv4_static. Medium gate is chip-side (this board logs why wifi is impossible and stays off). Bench-verified default path:net: hostname=lp-ecf634 ipv4=dhcp. Thenet-ethfeature also joined the clippy matrix — it was entirely unlinted.Validation
just clippy-fw-esp32v3matrix green (now incl. thenet-etharm); feature-off and feature-on builds green🤖 Generated with Claude Code