This project is an ESP-IDF firmware for the Seeed Studio XIAO ESP32-C6 that turns the board into a self-hosted, secure Wi-Fi scanning logger. It creates its own access point, serves a responsive HTTPS web UI, logs nearby Wi-Fi access points, optionally tags rows with GPS coordinates (provided by the client browser), and exposes battery status from the on-board LiPo input.
The end result is a pocket Wi-Fi “survey” tool: scan, track, export logs as CSV, and generate a heat map view to visualize RSSI vs location.
Project overview and feature set: :contentReference[oaicite:1]{index=1}
What it does
- AP + Station mode so the device can serve the dashboard while scanning nearby Wi-Fi networks.
- HTTPS web interface using a bundled certificate/key for local secure access.
- Single scan and continuous tracking modes.
- CSV export for analysis and archiving.
- Persistent logging to SPIFFS at
/spiffs/logs.csv. - Battery monitoring via ADC with voltage/percentage/status shown on the dashboard.
- Heat map generation (Leaflet-based) to visualize logged RSSI data.
Feature list: :contentReference[oaicite:2]{index=2}
How “GPS” works in this project
This is an important implementation detail: GPS coordinates are captured via the client browser (phone/laptop) when you open the dashboard and grant location permissions. Those coordinates are then attached to scan rows so they can be plotted later.
Web UI usage steps (including location permission): :contentReference[oaicite:3]{index=3}
Hardware notes
- Target board: Seeed Studio XIAO ESP32-C6 (or compatible ESP32-C6 module).
- Battery sense: LiPo input is read via ADC1 channel 0 (GPIO0) through a divider matching
VOLTAGE_DIVIDER_RATIO(default 2:1). - Optional external antenna control: GPIO14 (configured in
init_wifi_ap).
Hardware section: :contentReference[oaicite:4]{index=4}
Build & flash (ESP-IDF)
The repo targets ESP-IDF v5.5 (or the matching version referenced by the project). On Windows, initialize the ESP-IDF environment first
(e.g., run export.ps1 from your ESP-IDF install).
Prerequisites and environment notes: :contentReference[oaicite:5]{index=5}
idf.py build
idf.py -p COM6 flash
idf.py -p COM6 monitor
Replace COM6 with the serial port on your machine. Use Ctrl+] to exit monitor.
Build/flash/monitor commands: :contentReference[oaicite:6]{index=6}
Using the web UI
- Power the device and connect to the Wi-Fi network XIAO-Logger (default password: ChangeMe123).
- Browse to https://192.168.4.1/ and accept the self-signed certificate warning.
- Grant Location permission in your browser if you want GPS-tagged scan rows.
- Use Single Scan for a one-time snapshot, or Start Tracking to log continuously.
- Use Download CSV to export logs (or Clear to reset).
Web UI workflow and defaults: :contentReference[oaicite:7]{index=7}
Battery telemetry
The dashboard’s Battery card shows live voltage, percentage, and status. Per the implementation notes, the UI refreshes battery info periodically from the device endpoint.
Battery update behavior: :contentReference[oaicite:8]{index=8}
Heat map workflow (why internet is required)
Heat map rendering uses Leaflet libraries that load from a CDN. That means you typically need an internet connection at the moment you generate the map. A practical workflow is:
- While connected to XIAO-Logger, run scans so the log includes GPS-tagged rows.
- Stop tracking (if active) and disconnect from the logger network.
- Connect your phone/laptop to the internet (cellular or another Wi-Fi).
- Revisit https://192.168.4.1/; when the map libraries are available, return to the logger LAN as needed.
- Press Generate Heat Map. If CDN loading fails, the UI prompts you to reconnect to the internet and retry.
Heat map workflow notes: :contentReference[oaicite:9]{index=9}
Data storage and endpoints
- Logs append to
/spiffs/logs.csv(SPIFFS partition). /downloadstreams the current log file./clearclears the log contents.
Storage and endpoints: :contentReference[oaicite:10]{index=10}
Customization
- Wi-Fi SSID/password: edit
main/main.c(WIFI_SSID,WIFI_PASSWORD), rebuild, and flash. - Battery calibration: adjust
VOLTAGE_DIVIDER_RATIO(and ADC definitions) if your hardware divider differs. - TLS certificate/key: replace
cert.pemandkey.pemand rebuild (embedded viaEMBED_TXTFILES).
Customization section: :contentReference[oaicite:11]{index=11}
Security and privacy notes
- The dashboard uses HTTPS with a self-signed certificate, so browsers will show a warning the first time. This is expected for local-only devices.
- GPS is collected only if the user grants browser permission; treat your exported CSV as sensitive if it includes location traces.
Source code
GitHub: https://github.com/error0327/ESP32-C6-WifiGPS-HeatMap
License
MIT License (with additional third-party licenses inherited via ESP-IDF and managed_components).
License note: :contentReference[oaicite:12]{index=12}
Suggested Blogger labels: ESP32-C6, ESP-IDF, XIAO, WiFi, GPS, Heatmap, Leaflet, IoT
Meta description: ESP32-C6 Wi-Fi scanning logger with HTTPS dashboard, browser GPS tagging, SPIFFS CSV export, battery telemetry, and Leaflet heat map visualization.