Skip to content

v3.02

Choose a tag to compare

@github-actions github-actions released this 05 Nov 20:17
· 13 commits to main since this release

v3.02 (2026-11-05)

New Features

  • Self-update from GitHub Releases -- every board (main Piglet, T-Dongle C5, PigletNode) now checks github.com/Hamspiced/piglet's releases at boot (STA-connected boot only) and shows the result in a new Firmware Update Web UI card. A single Install Update click downloads the board's own firmware image over HTTPS and flashes it via the ESP32's native OTA mechanism, then reboots automatically. In the same pass, the other two boards' images are staged to /Firmware/ on the SD card for the mesh-push feature below. PigletNode has no Web UI/SD card and does not get self-update; it remains a push-only OTA target. Ported from the design in olosnoks' warhog project.
  • Core-pushed mesh node OTA updates -- a Piglet acting as mesh Core can push a firmware image to any connected node (PigletNode, T-Dongle C5, or a headless/XIAO Piglet) over the existing ESP-Now link, no USB required. The Core reads /Firmware/<Board>.ota.bin images from its own SD card at boot, and the Web UI's new Mesh Nodes panel (Core mode only) lists connected nodes with an Update button and live transfer progress. The node verifies a SHA-256 of the whole image before switching boot partition, so an interrupted or corrupted transfer leaves it running its old firmware. A 1-byte board-type code, added to the existing Piglet-to-Piglet identification marker, prevents pushing the wrong board's image to a node -- every Piglet variant shares the same ESP32-C5 silicon, so the image's own chip ID alone can't tell PigletNode/Piglet/TDongleC5_Piglet apart. Ported from olosnoks' warhog project's Core-to-node OTA engine.
  • /Firmware/ SD card convention -- the Core-push feature's staging folder, holding one .ota.bin file per board type. The self-update feature keeps it current automatically; it can also be populated manually by copying a release's assets onto the SD card, for offline/no-home-network setups. Each file is deleted before a new one is written, so an interrupted write can't leave a corrupt hybrid file behind.
  • On-device "Update Nodes through Core?" prompt -- a Piglet or T-Dongle C5 Piglet node reports its firmware version to its Core on every discovery handshake and heartbeat. When a connected XIAO-based node (Piglet or TDongleC5_Piglet) is running different firmware than the Core, the Core's own screen shows a confirm prompt with a 30-second countdown; a single button press on that page confirms the push (instead of advancing to the next page), and letting it time out skips that node for the rest of the session. Multiple mismatched nodes queue and are pushed one at a time. Push progress (node MAC, percent complete) is also shown on-screen.
  • Auto-update for headless PigletNode nodes -- a new Auto-Update Headless PigletNode Nodes Web UI toggle (autoUpdateHeadlessNodes, default off) lets a Core silently push a staged PigletNode.ota.bin to any connected headless PigletNode running different firmware, with no on-device confirmation (PigletNode has no screen). Retried at most once per node per session. XIAO-based nodes always use the on-screen confirm prompt instead, regardless of this setting. Recommended for use with an SD card rated at least 16GB for sustained-write reliability.
  • "Store Piglet Node Firmware" Web UI button -- downloads the latest PigletNode.ota.bin release asset to /Firmware/ on demand, independent of whether the Core's own firmware is already current. Previously, a Core already on the latest release never resolved any release asset URLs (self-update checks for a newer version only), so there was no way to stage node firmware without first being out of date yourself. The Core also now reloads its staged images into PSRAM immediately after a successful stage, so a freshly downloaded image is usable without a reboot.
  • Manual per-node channel-range overrides -- a new Channel Overrides panel in the Web UI's Mesh Nodes card lets an operator pin a specific node (matched by MAC) to a fixed channel range instead of the automatic even split across connected nodes -- useful for a node with a directional antenna aimed at a specific band. Overrides are persisted to /mesh_channel_overrides.cfg on the Core's SD card and survive a reboot.

Bug Fixes

  • Web UI left open could eventually crash the device (abort() in a newlib lock allocation) -- every JSON-emitting Web UI endpoint (/status.json, /update/status, /mesh/nodes.json, /mesh/channelOverrides) built its response into an empty String and let serializeJson() grow it via repeated reallocation. With a browser tab left open, /status.json alone is polled every 1.5 seconds indefinitely, so this fragmented the internal heap a little more on every single poll until a small FreeRTOS mutex allocation (used by a lazily-initialized newlib lock) could no longer find a large enough contiguous block, crashing the device -- reproducible simply by leaving the Web UI open, regardless of which page or action triggered it. Each JSON response String now pre-reserves its exact needed size via measureJson() before serialization, eliminating the incremental reallocation. Applied to both the main Piglet firmware and the T-Dongle C5 standalone firmware.

Known Issues

  • ESP32 Arduino core 3.3.11 and 3.3.12 break Arduino IDE auto-reset on the XIAO ESP32-C5 -- uploads silently fail to connect unless you manually hold BOOT, tap RESET, then release BOOT. This is a regression in the native-USB handling of those core versions, not something in Piglet's own code. Use core 3.3.10 (the version this project's releases are built with) via Arduino IDE's Boards Manager to avoid it.

Configuration

  • New config option: autoUpdateHeadlessNodes -- auto-push staged firmware to out-of-date headless PigletNode nodes with no on-device confirmation (default: false).

Breaking Changes

  • Partition scheme changed from huge_app to default_8MB -- OTA updates (both self-update and Core-pushed mesh updates) require two app partitions, which the old single-app huge_app scheme doesn't have. Every existing board needs one more full USB/web-flasher reflash with the new partition scheme before it can receive any OTA update; this can't be done over the air, since the partition table itself is what's changing. A board still on the old scheme cleanly reports "NODE HAS NO OTA SLOT" if a Core tries to push to it, rather than failing silently. The new scheme (3MB APP / 1.5MB SPIFFS per OTA slot) has more headroom than the old 3.00MB single-app slot, so this is a safe, no-functionality-lost change.
  • Release/web-flasher builds now compile with PartitionScheme=default_8MB; release-firmware.yml also publishes each board's plain app image under a stable name (Piglet.ota.bin, TDongleC5_Piglet.ota.bin, PigletNode.ota.bin) as an additional release asset, which the self-update and Core-push features fetch by name.

Security Notes

  • Mesh-push OTA only accepts updates from a node's already-paired Core MAC address -- a source-address check, not authentication; a spoofed MAC in ESP-Now range could in principle push firmware. The SHA-256 check is integrity-only (corruption/truncation), not a signature (authenticity). This matches the existing trust model of Piglet's ESP-Now mesh, which has no built-in authentication either. Self-update downloads use the same WiFiClientSecure::setInsecure() TLS posture as every other upload in this codebase (no certificate pinning).

Firmware Versions

  • Main Piglet (XIAO S3/C5/C6/C3): v3.02
  • T-Dongle C5: v3.02
  • PigletNode: v3.02

Full Changelog: v3.01...v3.02