Skip to content
HamspicedPublic

About

Piglet is an open-source ESP32 wardriving platform that scans and logs Wi-Fi networks with GPS location, saves WiGLE-ready CSVs to SD, and provides a real-time web UI for control, uploads, and status. Designed for XIAO S3, C5, and C6 hardware, it focuses on reliability, transparency, and extensibility for wireless research and mapping.

Resources

Stars

296 stars

Watchers

5 watching

Forks

Repository files navigation

Piglet Wardriver

Piglet is an open-source ESP32-based wardriving platform that scans nearby Wi-Fi networks, records GPS position, saves WiGLE-compatible CSV logs to SD, and provides a real-time web UI for control, uploads, and device status.

Designed for Seeed XIAO ESP32-S3, XIAO ESP32-C5, XIAO ESP32-C6, and XIAO ESP32-C3, Piglet focuses on:

  • Reliable scanning while in motion
  • Clean WiGLE-ready data collection
  • Simple field deployment
  • Fully hackable open firmware

Features

  • 2.4 GHz Wi-Fi scanning
  • 5 GHz scanning on ESP32-C5 hardware
  • GPS position, heading, and speed logging
  • SD card logging in WiGLE CSV format
  • Web UI for:
    • Start / stop scanning
    • Upload logs to WiGLE, WDGoWars, and Wardrift
    • View device status
    • Manage SD files
    • Edit configuration
  • OLED live status display
  • Optional battery monitoring (board dependent)
  • Automatic STA connect with AP fallback
  • Home network auto-return — detects your home SSID while wardriving, automatically connects and uploads pending CSVs, then resumes wardriving once you drive out of range again
  • Optimized for mobile wardriving or warWalking!
  • ESP-Now Mesh Node mode — pair with a coordinator device for multi-node wardriving
  • Mesh auto-start on boot — configure meshModeOnBoot to automatically enter Core or Node mode after uploads complete, bypassing the AP window
  • Screen rotation — mount the display upside-down and set rotateScreen180=true to flip 180°
  • Auto-start wardriving after uploads — set autoStartAfterUpload=true to disconnect from home Wi-Fi immediately after boot uploads complete and begin scanning without delay
  • PigletNode — standalone minimal firmware for XIAO ESP32-C5 that boots directly as a mesh node (no display, GPS, or SD required)
  • Wardrive Go BLE bridge — while on the Mesh Node/Core page, advertise a RocketGod "iosESP" BLE bridge so the Wardrive Go / WarBLE Go phone app can pair and plot APs live on its map
  • Self-update from GitHub Releases — checks for a newer firmware version at boot and, with one click in the Web UI, downloads and flashes it over the air
  • Core-pushed mesh node OTA updates — a Piglet acting as Core can push a new firmware image to any connected node (PigletNode, T-Dongle C5, or headless XIAO) over the existing ESP-Now link, no USB required
  • On-device "Update Nodes through Core?" prompt — a Core's own screen shows a 30-second confirm prompt when a connected XIAO-based node is running mismatched firmware; a single button press confirms the push
  • Auto-update for headless PigletNode nodes — optional toggle lets a Core silently push firmware to out-of-date headless PigletNode nodes with no on-device confirmation
  • Manual per-node channel-range overrides — pin a specific mesh node (by MAC) to a fixed channel range from the Web UI instead of the automatic even split

ESP-Now Mesh Network Node Mode

Piglet includes a built-in Mesh Node mode that lets it act as a wireless wardriving node alongside a compatible coordinator device. In this mode, Piglet scans Wi-Fi networks and forwards results over ESP-Now — no SD card or GPS fix required on Piglet itself. The coordinator handles GPS stamping and data logging.

Compatible Coordinator Devices

How to Use

  1. Power on your coordinator device (Biscuit Pro or JCMK C5 Wardriver)
  2. On Piglet, press the button to cycle pages until you reach Mesh Node (the last page after the pig animation)
  3. Piglet automatically searches for a coordinator on ESP-Now channel 6
  4. Once connected, it receives a channel range assignment and begins forwarding scan data
  5. Press the button again to exit Mesh Node mode and return to normal wardriving

Mesh Node Display

While in Mesh Node mode the OLED shows:

  • Link status (Searching / Core linked)
  • Coordinator MAC address
  • Assigned channel range
  • Total networks discovered
  • Records forwarded to the coordinator

Note: Entering Mesh Node mode suspends normal WiGLE CSV logging. All data is sent live to the coordinator. Exiting the page restores normal scanning automatically.

Auto-Start Mesh Mode on Boot

Set meshModeOnBoot in /wardriver.cfg to automatically enter mesh mode after boot uploads are complete, without needing to navigate pages manually:

Value Behaviour
none Normal wardriving (default)
core Enters Mesh Core mode — acts as coordinator, logs records from nodes
node Enters Mesh Node mode — forwards scan results to a Core

When core or node is set the SoftAP window is skipped entirely (ESP-Now owns the WiFi stack and the AP would be non-functional). The device goes straight from boot uploads to the mesh page. Set via the web UI Mesh Mode On Boot dropdown or directly in /wardriver.cfg.

Wardrive Go BLE Bridge

While on the Mesh Node or Core page, Piglet can advertise a RocketGod "iosESP" BLE bridge (service UUID 47686F73-7445-5350-4272-696467655376, advertised as iosESP-XXXX) so the Wardrive Go / WarBLE Go phone app can pair and plot APs live on its map:

  • Node pushes its own scan finds plus its own GPS fix.
  • Core pushes every node-forwarded AP plus its own GPS fix.

Enable it with the Wardrive Go BLE Bridge toggle in the Web UI's Configuration card (wardriveGoBridge in /wardriver.cfg, default off). The bridge is only ever active while on the Mesh Node/Core page — it is torn down immediately when you leave it. While enabled, the Mesh page's hold-button hint is replaced with a WG: off / advertising / connected status line. Requires the NimBLE-Arduino library (see Building Firmware below).

PigletNode — Standalone Mesh Node

A minimal, standalone firmware for the Seeed XIAO ESP32-C5 in the PigletNode/ folder. No display, GPS, or SD card required — flash it and it automatically pairs with any Piglet running in Core mode and begins scanning.

  • Single-file Arduino sketch, zero external library dependencies
  • Boots directly into JCMK-compatible ESP-Now node mode
  • Dual-band scanning: 40 channels (2.4 GHz ch 1–14 + 5 GHz UNII-1/2/2e/3)
  • Auto-pairs with Piglet Core mode (XIAO or T-Dongle)
  • 30-second Core timeout with automatic re-search
  • LED: fast blink = searching, slow blink = paired and scanning
  • Hold BOOT button > 2 s to force a re-search

Flash: Open PigletNode/PigletNode.ino in Arduino IDE, select XIAO_ESP32C5, upload. No libraries to install.

T-Dongle C5 Variant

A standalone firmware port is available for the LilyGo T-Dongle C5 in the TDongleC5_Piglet/ folder. This variant is a self-contained single-file sketch with its own display driver, LED control, and web UI — no external OLED required.

Hardware: LilyGo T-Dongle C5 (ESP32-C5, built-in ST7735 0.96" TFT, APA102 LED, TF card slot)

Additional GPS: Connect any UART GPS module via the Qwiic/JST connector (RX=GPIO12, TX=GPIO11)

Pages: Status · Networks · Navigation · Pig animation · Mesh Node

T-Dongle C5 Required Libraries

Install via Arduino Library Manager (Sketch → Include Library → Manage Libraries):

Library Author
Adafruit ST7735 and ST7789 Library Adafruit
Adafruit GFX Library Adafruit
Adafruit BusIO Adafruit
TinyGPSPlus Mikal Hart
ArduinoJson Benoit Blanchon
NimBLE-Arduino h2zero

All networking, SPI, SD, ESP-Now, and ESP-IDF headers are included in the ESP32 Arduino core — no separate install needed.

Board setup: Add https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json to Additional Boards Manager URLs, install esp32 by Espressif v3.x or later, and select ESP32C5 Dev Module.

Supported Hardware

Microcontroller Boards

Required Peripherals

  • I2C GPS module (ATGM336H)
  • 128×64 SSD1306 OLED display (I2C)
  • SPI SD card module
  • Optional LiPo battery connected to XIAO battery inputs

Peripheral Sourcing

You can get everything on Amazon but its pricey. if you dont mind waiting on aliexpress heres the build list.

$14 if you wanted to breadboard it yourself.

Wiring / Pinouts

Pin mappings are automatically selected by firmware.

XIAO ESP32-S3

Function Pin
I2C SDA GPIO 5
I2C SCL GPIO 6
GPS RX GPIO 4
GPS TX GPIO 7
Button GPIO 1
SD CS GPIO 2
SD MOSI GPIO 10
SD MISO GPIO 9
SD SCK GPIO 8

XIAO ESP32-C6 / ESP32-C5

Function Pin
I2C SDA GPIO 23
I2C SCL GPIO 24
GPS RX GPIO 12
GPS TX GPIO 11
Button GPIO 0
SD CS GPIO 7
SD MOSI GPIO 10
SD MISO GPIO 9
SD SCK GPIO 8

Note: Only the ESP32-C5 supports 5 GHz Wi-Fi scanning.

XIAO ESP32-C3

Set board=c3 in /wardriver.cfg or select XIAO C3 in the Web UI. Auto-detected from chip model on first boot.

Function Pin
I2C SDA GPIO 6 (D4)
I2C SCL GPIO 7 (D5)
GPS RX GPIO 20 (D7)
GPS TX GPIO 21 (D6)
Button none (GPIO 9 = SPI MISO conflict — wire externally if needed)
SD CS GPIO 2 (D0)
SD MOSI GPIO 10 (D10)
SD MISO GPIO 9 (D9)
SD SCK GPIO 8 (D8)

Note: 2.4 GHz only. No built-in display — attach an optional SSD1306 OLED on D4/D5.

3D Printed Cases

Print-ready STL files are available in the Case Files/ directory. These cases are designed specifically for the Piglet PCB and module stack.

👏 Case Design by Bread — Breadbox Systems

The Piglet case was designed by Bread at Breadbox Systems. If you print one, please take a moment to like and boost the design on MakerWorld — it helps the creator and makes the design easier for others to find.

🖨️ Print the Piglet Wardriver Case on MakerWorld →

File Description
Piglet Face.STL Front panel / lid
Piglet Butt.STL Rear enclosure
Piglet Butt with SMA hole.STL Rear enclosure with external antenna cutout
Piglet Midboard.STL Internal standoff / mid-layer
Piglet Features.stl Feature plate / accessory mount

For the T-Dongle C5 variant, GPS antenna mount STLs are included in TDongleC5_Piglet/GPS STL/.

Print with standard PLA or PETG. No supports required on most parts. Recommend 0.2 mm layer height, 3 perimeters.

PCB Design

Piglet includes custom PCB designs for compact, production-ready builds. KiCad project files and Gerber production files are available in the PCB Files/ directory.

PCB Images

Board Front Board Back Board Close-up
Board1 Board2 Board3

Assembled Piglet

Module Arrangement Front View Back View
Module Arrangement Built Piglet Front Built Piglet Back

Assembly Note: When stacking modules, apply Kapton tape between components to prevent electrical shorts. Pay special attention to exposed pins and solder joints that may contact adjacent modules.

First Time Run Initialization

The Wardriver functions using a config file located on the root of a FAT32-formatted SD card. On first boot the device will start its own access point (Piglet-WARDRIVE / wardrive1234) so you can connect and fill in your settings via the web interface — or you can place the config file on the SD card manually before powering on.

AP Timer & Keep-Alive

The SoftAP runs for 60 seconds by default. About 30 seconds before that window expires, the WebUI shows a "Stay in WebUI?" prompt — clicking Stay extends the window to a 5 minute rolling timer so you have room to actually use the WebUI. The same prompt re-appears 30 seconds before the 5 minute timer expires; clicking Stay again resets it.

  • Stay — extends (or re-extends) the window to 5 minutes.
  • Start Scanning Now — closes the AP immediately and begins wardriving.
  • Ignored / browser closed — timer runs out, AP closes, scanning starts.

The OLED shows the live countdown (AP: 192.168.4.1 60s initially, m:ss once extended). Once your home Wi-Fi is configured, the device will connect to it on subsequent boots and the WebUI is reachable on the STA IP shown on the OLED — the AP only comes up if STA fails.

Location: /wardriver.cfg on the SD card root

A sample config file is included in Arduino Files/Piglet/wardriver.cfg. The full default config with all available keys is shown below:

# ============================================================
# Piglet Wardriver Configuration
# Format: key=value
# Lines starting with # are comments and ignored.
# ============================================================

# ------------------------------------------------------------
# WiGLE Upload
# ------------------------------------------------------------
# Use only the "Encoded for Use" token from wigle.net/account
# Leave empty to disable WiGLE uploads.

wigleBasicToken=EnterWigleTokenHere

# ------------------------------------------------------------
# WDGoWars
# ------------------------------------------------------------
# Get your API key at: https://wdgwars.pl/profile/
# Leave empty to disable WDGoWars uploads.

wdgwarsApiKey=EnterWDGoWarsAPIKeyHere

# ------------------------------------------------------------
# Wardrift
# ------------------------------------------------------------
# Get your API key at: https://wardrift.net
# Leave empty to disable Wardrift uploads.

wardriftApiKey=EnterWardriftAPIKeyHere

# ------------------------------------------------------------
# Max Automatic Uploads at Boot
# ------------------------------------------------------------
# -1 = Upload ALL pending files every boot
#  0 = Disabled — no auto-upload at boot (use web UI manually)
# 1+ = Upload up to N files per boot

maxBootUploads=-1

# ------------------------------------------------------------
# Device Name (optional)
# ------------------------------------------------------------
# A short label for this device. Used in WiGLE CSV filenames
# and in the WiGLE upload header so you can tell devices apart.
# Spaces become underscores. Max 20 characters.
# Leave empty to use the default (no prefix).

deviceName=

# ------------------------------------------------------------
# Home Wi-Fi (STA mode)
# ------------------------------------------------------------
# If provided, device connects on boot.
# If connection fails, falls back to SoftAP for 60 seconds
# (can be extended via the "Stay in WebUI?" prompt that appears
# ~30 s before the timer expires).
#
# Auto-return while wardriving: if this SSID is seen in a scan result
# while driving, the device stops scanning, connects to it, and uploads
# pending CSVs automatically (same upload flow as boot) -- no need to
# reboot or stop by the web UI when you get home. Normal wardriving
# resumes automatically once the connection is lost (e.g. driving back
# out of range).

homeSsid=EnterWifiHere
homePsk=EnterWifiPasswordHere

# ------------------------------------------------------------
# Wardriver Access Point (SoftAP fallback)
# ------------------------------------------------------------
# SSID and password for the temporary config AP.
# Password must be 8+ characters or AP becomes open.

wardriverSsid=Piglet-WARDRIVE
wardriverPsk=wardrive1234

# ------------------------------------------------------------
# GPS Settings
# ------------------------------------------------------------
# UART baud rate for the GPS module.
# Common values: 9600, 38400, 115200

gpsBaud=9600

# ------------------------------------------------------------
# Wi-Fi Scan Mode
# ------------------------------------------------------------
# aggressive  — scans every ~3 seconds using async mode (faster, more power)
# powersaving — scans every ~12 seconds (slower, less power)

scanMode=aggressive

# ------------------------------------------------------------
# Speed Units (display only)
# ------------------------------------------------------------
# kmh = kilometers per hour
# mph = miles per hour

speedUnits=mph

# ------------------------------------------------------------
# Battery Test
# ------------------------------------------------------------
# true = logs elapsed time on battery to /battery_test.csv
# false = disabled

batteryTest=false

# ------------------------------------------------------------
# Mesh Mode On Boot
# ------------------------------------------------------------
# Automatically enter ESP-Now mesh mode after boot uploads complete.
# Bypasses the SoftAP window and jumps directly to the mesh page.
#
#   none = Normal wardriving mode (default)
#   core = Start as Mesh Core (coordinator) — logs data from nodes
#   node = Start as Mesh Node — forwards scan results to a Core
#
# Requires a compatible coordinator (Biscuit Pro, JCMK C5 Wardriver)
# when using node mode.

meshModeOnBoot=none

# ------------------------------------------------------------
# Screen Rotation
# ------------------------------------------------------------
# Rotate the display 180 degrees for upside-down mounting.
# Values: true or false
# Reboot required after changing.

rotateScreen180=false

# ------------------------------------------------------------
# Auto-Start Wardriving After Uploads
# ------------------------------------------------------------
# When true: disconnects from home Wi-Fi immediately after boot uploads
# complete and begins wardriving without delay. The web UI remains
# accessible if you later connect to the Wardriver AP, but the device
# will not hold the STA link open.
# Values: true or false
# Reboot required after changing.

autoStartAfterUpload=false

# ------------------------------------------------------------
# SD Card SPI Clock Ceiling
# ------------------------------------------------------------
# Boot negotiates the fastest SD-over-SPI clock (descending ladder) up to
# this cap and uses the fastest speed that mounts successfully. Lower this
# if you see SD write errors/corruption on marginal wiring (e.g. long
# breadboard jumpers). Default is a commonly-safe ceiling for SD-over-SPI.
# Reboot required after changing.

sdMaxSpiHz=20000000

# ------------------------------------------------------------
# Network Whitelist
# ------------------------------------------------------------
# Up to 10 SSIDs that will never be written to the WiGLE CSV log.
# Matching is exact and case-sensitive; empty slots never match, so
# blank/hidden SSIDs are never accidentally filtered. Whitelisted
# networks are still scanned and still count toward the Found totals —
# they are simply skipped when writing log rows. Editable from the
# web UI's Configuration card ("Network Whitelist" textarea, one SSID
# per line) or directly in this file.

ssidWhitelist1=
ssidWhitelist2=
ssidWhitelist3=
ssidWhitelist4=
ssidWhitelist5=
ssidWhitelist6=
ssidWhitelist7=
ssidWhitelist8=
ssidWhitelist9=
ssidWhitelist10=

# ------------------------------------------------------------
# Wardrive Go BLE Bridge
# ------------------------------------------------------------
# When true, the Mesh Node/Core page advertises a RocketGod "iosESP" BLE
# bridge (as iosESP-XXXX) so the Wardrive Go / WarBLE Go phone app can pair
# and plot APs live. Only active while on the Mesh Node/Core page.
# Values: true or false

wardriveGoBridge=false

# ------------------------------------------------------------
# Auto-Update Headless PigletNode Nodes (Core mode)
# ------------------------------------------------------------
# When true, a Core silently pushes staged /Firmware/PigletNode.ota.bin to
# any connected headless PigletNode running different firmware -- no
# on-device confirmation, since those nodes have no screen. XIAO-based
# nodes (Piglet/TDongleC5_Piglet) always use the on-screen confirm prompt
# instead, regardless of this setting. Recommended: use an SD card rated
# at least 16GB for sustained-write reliability.
# Values: true or false

autoUpdateHeadlessNodes=false

Auto-Start Wardriving After Uploads — How to Disable

Important: When autoStartAfterUpload=true, the device disconnects from your home Wi-Fi immediately after uploads finish and goes straight into wardriving. Because it no longer holds the STA connection, the web UI is not reachable on your home network after boot.

To disable this setting after it has been enabled, you have two options:

Option 1 — Connect via the Wardriver AP

When Piglet is away from the saved home network (or the home network is unavailable), it falls back to its own SoftAP. Connect to it and use the web UI:

  1. Power on the device somewhere the home Wi-Fi is not in range (or temporarily forget the home network on the device by clearing homeSsid in the config)
  2. Connect your phone or laptop to the Wardriver SSID (default: Piglet-WARDRIVE / wardrive1234)
  3. Open a browser and go to http://192.168.4.1
  4. In the Configuration section, set Auto-Start Wardriving After Uploads to Disabled
  5. Click Save & Reboot

Option 2 — Edit the SD card directly

  1. Remove the SD card from the device
  2. Open wardriver.cfg in any text editor
  3. Change autoStartAfterUpload=true to autoStartAfterUpload=false
  4. Save the file, re-insert the SD card, and reboot

Button Functions

Press Types

Press Timing Action
Single press Quick tap Advance to next page
Double press Two taps within 350 ms Toggle scan pause (Status page) / toggle Wardrive Go BLE bridge (Mesh Node page)
Long press Hold ≥ 2 seconds Enter deep sleep (or toggle Core/Node on the Mesh Node page)
Single press (while sleeping) Any Wake from deep sleep / reboot

Pages (Single Press cycles through these)

Page Name What it Shows Scanning
0 Status Scan state, SD, GPS fix, WiFi, network counts, speed, IP, upload status ✅ Active
1 Networks Large display of 2.4 GHz, 5 GHz, and total network counts ✅ Active
2 Navigation Compass arrow, heading direction, current speed ✅ Active
3 Paused Pause icon — scanning fully stopped ❌ Paused
4 Pig Walking pig animation 🐷 ✅ Active
5 Mesh Node ESP-Now link state, coordinator MAC, channel range, Found/Sent counts ↔ Forwarded via ESP-Now

Double Press — Status Page Only

When on the Status page, double-pressing toggles a scan pause without leaving the page. Useful for a quick stop without navigating to the Pause page.

  • Double press → Scanning paused on status page
  • Double press again → Scanning resumed
  • Single press (page change) → Pause automatically cleared when leaving page 0

Long Press — Deep Sleep

Hold the button for 2 seconds from any page:

  • Active log file is flushed and closed before sleeping
  • OLED displays Sleep... then powers off
  • A single button press wakes the device (full reboot)

Mesh Node Page

Entering page 5 automatically starts ESP-Now node mode. Leaving it (single press to advance) automatically restores normal wardriving. See the ESP-Now Mesh Network Node Mode section above for details.

While on this page, double-pressing toggles the Wardrive Go BLE bridge on/off immediately (no reboot or page re-entry needed) and saves the new state to /wardriver.cfg, so it stays on for this page on future boots too — the same effect as flipping the Web UI's Wardrive Go BLE Bridge toggle and saving. See Wardrive Go BLE Bridge above.

When acting as Core and a connected XIAO-based node has mismatched firmware, the page instead shows an "Update Nodes through Core?" confirm prompt; a single press on that page confirms the push (instead of advancing to the next page) for as long as the prompt is showing. See Firmware Updates below.

Building Firmware

Requirements

  • Arduino IDE 2.x or PlatformIO
  • Arduino-ESP32 core v3.3.10 — this is the exact version used to build official releases (see .github/workflows/release-firmware.yml) and the version this project is tested against. In Arduino IDE's Boards Manager, select version 3.3.10 specifically from the dropdown before installing (it keeps multiple versions installable side by side).

    Known issue: ESP32 Arduino core 3.3.11 and 3.3.12 introduce a regression on the XIAO ESP32-C5's native USB that breaks the normal auto-reset-into-bootloader sequence — uploads from Arduino IDE will silently fail to connect unless you manually hold BOOT, tap RESET, then release BOOT. If you're hitting this, downgrade to core 3.3.10 via Boards Manager; it resolves the issue with no other changes needed.

Required Libraries — XIAO Variant (S3 / C5 / C6)

Install via Arduino Library Manager (Sketch → Include Library → Manage Libraries):

Library Author Notes
TinyGPSPlus Mikal Hart GPS NMEA parsing
Adafruit GFX Library Adafruit Graphics dependency
Adafruit SSD1306 Adafruit OLED display driver
Adafruit BusIO Adafruit Required by SSD1306
ArduinoJson Benoit Blanchon v6.x or v7.x
NimBLE-Arduino h2zero Wardrive Go BLE bridge on the Mesh page

All other headers (WiFi, WebServer, WiFiClientSecure, HTTPClient, SD, SPI, Wire, esp_now.h, esp_wifi.h) are included in the ESP32 Arduino core — no separate install needed.

Required Libraries — T-Dongle C5 Variant

Install via Arduino Library Manager:

Library Author Notes
Adafruit ST7735 and ST7789 Library Adafruit TFT display driver
Adafruit GFX Library Adafruit Graphics dependency
Adafruit BusIO Adafruit Required by ST7735
TinyGPSPlus Mikal Hart GPS NMEA parsing
ArduinoJson Benoit Blanchon v6.x or v7.x
NimBLE-Arduino h2zero Wardrive Go BLE bridge on the Mesh page

All networking, SPI, SD, ESP-Now, and ESP-IDF headers are built into the ESP32 core.

Flash Steps

  1. Select the correct XIAO ESP32 board variant (S3, C5, or C6)
  2. CRITICAL: Enable PSRAM (required for TLS/HTTPS uploads)
    • Tools → PSRAM → OPI PSRAM (C5/C6) or QSPI PSRAM (S3)
  3. Use the 8M with spiffs (3MB APP/1.5MB SPIFFS) partition scheme — this gives two OTA app slots, required for self-update and Core-pushed mesh node updates (v3.0+). Boards still on the old Huge APP (3MB No OTA) scheme need one more reflash with this scheme to gain OTA capability.
  4. Upload firmware (see the Known issue note above if the board won't auto-reset into bootloader mode on upload)
  5. Insert FAT32-formatted SD card
  6. Add /wardriver.cfg to SD card root with your WiGLE API key and WiFi credentials
  7. Restart device with RST button or power cycle

Firmware Updates (v3.0+)

Every board can check GitHub Releases for a newer firmware version and install it over the air, and a Piglet acting as mesh Core can push updates out to connected nodes of any board type.

Self-update (per device):

  1. At boot, if connected to the home network, the device checks github.com/Hamspiced/piglet releases for a newer version and shows the result in the Web UI's Firmware Update card.
  2. Click Install Update — the device downloads its own firmware image over HTTPS and flashes it via the ESP32's native OTA mechanism, then reboots automatically.
  3. In the same pass, it also downloads the other two boards' images to /Firmware/ on the SD card, so a Core can immediately push them to connected nodes (see below).

Core-pushed mesh node updates:

  • A Piglet acting as Core reads /Firmware/<Board>.ota.bin files from its SD card at boot (one file per board type: Piglet.ota.bin, TDongleC5_Piglet.ota.bin, PigletNode.ota.bin).
  • The Web UI's Mesh Nodes panel (shown only in Core mode) lists connected nodes with an Update button; clicking it streams the matching image to that node over the existing ESP-Now link — no USB needed.
  • Every node reports its firmware version to the Core on each discovery handshake and heartbeat. When a connected XIAO-based node (Piglet or TDongleC5_Piglet) is running mismatched firmware, the Core's own screen shows an "Update Nodes through Core?" 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, with live progress shown on-screen.
  • Headless PigletNode nodes have no screen, so they're never prompted. Enable the Auto-Update Headless PigletNode Nodes Web UI toggle (autoUpdateHeadlessNodes, default off) to have the Core silently push staged firmware to them instead, retried at most once per node per session. Recommended for use with an SD card rated at least 16GB for sustained-write reliability.
  • The Store Piglet Node Firmware button (Firmware Update card) downloads the latest PigletNode.ota.bin release asset to /Firmware/ on demand — this works even when the Core's own firmware is already current, unlike the self-update check above which only resolves release assets when a newer version is found.
  • The node verifies a SHA-256 of the whole image before switching its boot partition, so an interrupted or corrupted transfer leaves it running its old firmware.
  • A board-type marker prevents accidentally pushing the wrong board's image (e.g. a T-Dongle image to a bare PigletNode) even though every Piglet variant shares the same ESP32-C5 silicon.
  • /Firmware/ can also be populated manually (copy a release's .ota.bin assets onto the SD card) for offline/no-home-network setups.
  • The Web UI's Mesh Nodes card also has a Channel Overrides panel: pin a specific node (by MAC) to a fixed channel range instead of the automatic even split — useful for a node with a directional antenna aimed at a specific band. Persisted to /mesh_channel_overrides.cfg on the Core's SD card.

Security note: image integrity is checked via SHA-256 (corruption/truncation), not a cryptographic signature (authenticity) — this matches the trust model of the rest of Piglet's ESP-Now mesh, which has no built-in authentication either.

Where to Order

I always order everything from JLCPCB because i get the best deals. However i do understand that people prefer the all in one project offers of PCBway so i have created this project here:

PCBWayProjects

License

Creative Commons Attribution-NonCommercial 4.0 (CC BY-NC 4.0)

You may:

  • Use
  • Modify
  • Share

You may not use this project for commercial purposes.

https://creativecommons.org/licenses/by-nc/4.0/


Created by Midwewest Gadgets LLC

About

Piglet is an open-source ESP32 wardriving platform that scans and logs Wi-Fi networks with GPS location, saves WiGLE-ready CSVs to SD, and provides a real-time web UI for control, uploads, and status. Designed for XIAO S3, C5, and C6 hardware, it focuses on reliability, transparency, and extensibility for wireless research and mapping.

Resources

Stars

296 stars

Watchers

5 watching

Forks

Releases

Packages

Contributors

Languages