Wi-Fi CSI tools and datasets: GitHub scripts, Python analysis and OpenWrt capture

By Wu Jun · Updated 2026-11-02 · 7 min read

Everything this project actually uses and produces. Every script has been run on real hardware, together with the 10-minute capture.

0. Decide whether the toolkit fits

Your state Download the toolkit first?
OpenWrt + mt76 CSI is working and the daemon sends UDP Yes; start with a 10-second check
You only need to test a parser or algorithm Download the 10 s / 60 s data first; no flashing required
CSI firmware is not built yet Complete the reproduction guide first
You expect Wi-Fi firmware or the driver patch inside Not included; obtain them from the corresponding upstream
You need unattended long-running capture Complete permissions, logs, disk alerts and rollback drills first

1. Capture and analysis scripts

Start with the browser-local CSI capture quality checker. It validates the outer frame layout, chain_info closed groups, chain and subcarrier consistency, timestamp gaps and non-empty I/Q without uploading the capture. Results can be exported as JSON or Markdown.

The scripts and parsers are open source under MIT and run on real hardware [1].

Router stability toolkit v0.1.3

The archive contains capture, analysis, watchdog, HE80/HE40 switching, boot-time vow_atf tuning and data-format documentation. It does not contain Wi-Fi firmware, the CSI driver patch or a site-specific first-boot configuration. Run it only on a research device already using OpenWrt plus the mt76 CSI stack, read INSTALL.md, back up the configuration and confirm interface names first.

v0.1.3 moves project links in the public scripts to the canonical okwujun.pw host and adds a standard-library reproducible packager. Archives use stable file ordering, permissions and timestamp metadata while excluding .git, caches, credentials and machine-specific first-boot configuration; two independent builds are byte-identical. Capture and analysis behaviour keeps the v0.1.2 fix that aligns the direct csi_capture.py default with the documented UDP port 8888. Software Heritage completed a full archive visit for the Git repository. Snapshot swh:1:snp:84d1d83e93b8ea9e197fea3b151b3f14113bef4c fixes the main-branch revision, the release branch and the tagged release. This independent archive proves source traceability only; it is not a security audit or a performance endorsement.

# Verify before extracting
shasum -a 256 -c router-csi-toolkit-v0.1.3.tar.gz.sha256
tar -xzf router-csi-toolkit-v0.1.3.tar.gz

# Install analysis dependencies
python3 -m pip install numpy matplotlib

# typical flow: 10-second check
router-csi-toolkit/scripts/csi_capture_session.sh 10

# 10-minute stability run (raw bin + analysis images + summary txt)
router-csi-toolkit/scripts/csi_capture_session.sh 600

Requirements: macOS / Linux, Python 3.8+, numpy and matplotlib; root privileges on the capture host, and a router already running the mt76 CSI daemon (see the reproduction guide).

Outputs:

File Description
csi_udp_*.bin raw UDP stream (timestamps + I/Q) for further analysis
*_summary.txt record count, duration, mean rate, gap detection
analysis/*_heatmap.png 256-subcarrier amplitude heatmap
analysis/*_motion.png 1-second rolling motion metric

1.1 Minimum acceptance path

  1. confirm UDP visibility with tcpdump -ni any udp port 8888;
  2. capture 10 seconds and confirm the bin file is non-empty;
  3. run analyze_csi_capture.py and check record count, duration and matrix shape;
  4. only then run for 10 minutes;
  5. record maximum gaps, file growth, RSSI/SNR and daemon memory;
  6. save the command, firmware, channel and bandwidth, not only a heatmap.

If the 10-second file is empty, check the frame-type/MAC filters, interface name and target-client traffic before starting a 10-minute run.

2. Measured data (published here)

File Content Size
60-second demo source (anonymised) 60 s raw UDP stream; 347 complete groups + one tail fragment 2,777 chain records, 2.8 MB
csi_udp_*_10m.bin 10-minute raw UDP stream 57,293 chain records, ~58 MB [2]
analysis/csi_amplitude_heatmap.png amplitude heatmap (256 subcarriers × time) —
analysis/csi_mean_amplitude_motion.png 1 s rolling motion metric —

The record format is documented in section 6 of the reproduction guide (24-byte header + interleaved int16 I/Q). Download the 10 s sample from the dataset page. Verify the 60-second demo source with SHA256SUMS or inspect its manifest. The full 10-minute dataset is on Zenodo (DOI: https://doi.org/10.5281/zenodo.23434789) with 8 parts, a manifest, a reassembly guide and two analysis figures. The capture-quality audit adds a timing report, JSON summary and script that can be reproduced without training a classifier. The timestamp-gap spectral analysis compares interpolated Welch with an original-timestamp periodogram and publishes the script, frequency-sweep CSV and four-panel figure. The CSI chain-health audit quantifies eight-chain versus four-chain groups, per-chain temporal variability and the shared semantics of RSSI/SNR. It publishes the script, chain CSV, JSON summary and SVG. The CSI subcarrier-redundancy audit uses both captures to compute the 256-bin correlation matrix and PCA: 6 components explain 90% of variance, with per-bin CSV, all 256 eigenvalues, JSON, script and figure published. The result is not a physical sensor count.

Units matter: 95.5 is chain records/s, not a 95.5 Hz independent-snapshot rate. Grouping on chain_info bit 15 gives 7,609 closed measurements over 599.924 s, about 12.68 Hz. Simple chain selection produces an approximately 7,608 x 256 matrix; removing another 25 anomaly groups leaves 7,583 measurements, or about 12.64 Hz.

CSI amplitude heatmap

3. Live visualisation platform (open skeleton)

The platform/ directory is a self-hostable live dashboard:

Configure the source address, listen port and storage path in platform/README before starting. The containers only require Docker; no host-side database or Python runtime is needed.

This project deployed the platform on an older i5-2430M / 8 GB LAN server, but that is not a capacity promise for every configuration. Benchmark 10 seconds, 10 minutes and 24 hours with your own record rate and retention policy.

3.1 Platform surface and limits

Route Purpose
GET /api/health UDP ingest liveness and error counters
GET /api/stations online devices, present, motion_db
GET /api/stats / /api/config public statistics and configuration
WebSocket /ws live chart push
/api/sessions/* recording, download and deletion

The platform does not currently include an MQTT publisher and has no /api/csi/status. Home Assistant must use a REST integration against /api/stations, or a separate MQTT bridge.

4. Open-source projects you can reuse

Project Use
espressif/esp-csi [3] official ESP32 CSI application, best starting point
StevenMHernandez/ESP32-CSI-Tool [4] ESP32 capture tool for datasets
Gi-z/CSIKit [5] Python CSI parsing/visualisation (multi-platform)
citysu/csiread [6] fast Cython parsing
xyanchen/WiFi-CSI-Sensing-Benchmark (SenseFi) [7] deep-learning model zoo
francescopace/espectre [8] ESP32 + ESPHome motion sensing
seemoo-lab/nexmon_csi [9] Broadcom firmware patch, 80 MHz CSI on a Pi
ruvnet/RuView [10] community Wi-Fi "spatial intelligence" project (headline claims not peer-reviewed — lead only)
NTUMARS/Awesome-WiFi-CSI-Sensing [11] curated papers and resources
Tsinghua WST course [12] university hands-on Wi-Fi sensing material

5. Hardware (buying references)

Use Suggestion Note
First CSI experiment an ESP32 dev board from $3, 20 MHz / 30–64 subcarriers
Router form factor GL-MT6000 (MT7986) this project's platform, 80 MHz / 256 subcarriers
High-bandwidth research Nexmon CSI + Raspberry Pi / PicoScenes more flexible, higher cost

These are hardware references; no affiliate links are used. If that changes, promoted links will be clearly labelled.

6. Safety, licences and stop conditions

References and data sources

Every external claim carries a source and an evidence grade (grading scheme). Grade E marks first-party, reproducible measurements from this project.

  1. Grade E · first-party measurement Router CSI Toolkit — capture/analysis/watchdog scripts (MIT, public repository)
    Router CSI Lab · 2026
    github.com/jjjwu/router-csi-toolkit · verified: GitHub API verified the public repository, capture-quality preflight, successful CI and the v0.1.3 release on 2026-11-02; the archive SHA-256 is 59f144c0…adea7 · The public repository includes a dependency-free capture preflight; the browser checker uses the same container definition and evidence boundaries.
  2. Grade E · first-party measurement This project's 10-minute raw capture (57,293 records / 600.0 s, SHA-256 00373f83…95e2)
    Router CSI Lab · 2026
    okwujun.pw/en/datasets/ · verified: Reassembled chunks verified byte-identical (2026-10-11) · The local raw master has SHA-256 00373f83…95e2; the public de-identified derivative has SHA-256 527466ce…a440. They must not be confused.
  3. Grade C · official docs espressif/esp-csi — Applications based on Wi-Fi CSI
    Espressif Systems
    github.com/espressif/esp-csi · verified: GitHub API 2026-10-29 (stars 1,723; README confirms the complete ESP32 series list and three sender/receiver routes) · The official README states: "All ESP32 series support CSI, including ESP32 / ESP32-S2 / ESP32-C3 / ESP32-S3 / ESP32-C5 / ESP32-C6 / ESP32-C61."
  4. Grade C · official docs StevenMHernandez/ESP32-CSI-Tool — active/passive CSI extraction for ESP32
    S. M. Hernandez
    github.com/StevenMHernandez/ESP32-CSI-Tool · verified: GitHub API 2026-10-11 (stars 571, MIT, last push 2024-07-16)
  5. Grade C · official docs Gi-z/CSIKit — Python CSI parsing and visualisation
    G. Zhang
    github.com/Gi-z/CSIKit · verified: GitHub API 2026-10-11 (stars 307, MIT, last push 2025-02-19) · Parses many formats: Atheros / Intel / Nexmon / ESP32 / FeitCSI / PicoScenes.
  6. Grade C · official docs citysu/csiread — fast Cython CSI parser
    S. Zhu
    github.com/citysu/csiread · verified: GitHub API 2026-10-11 (stars 142, MIT, last push 2024-10-12)
  7. Grade C · official docs xyanchen/WiFi-CSI-Sensing-Benchmark (SenseFi) — deep-learning benchmark
    X. Chen, et al.
    github.com/xyanchen/WiFi-CSI-Sensing-Benchmark · verified: GitHub API 2026-10-11 (stars 638, MIT, last push 2023-11-06)
  8. Grade C · official docs francescopace/espectre — Wi-Fi CSI motion sensing for ESP32 (ESPHome)
    F. Pace
    github.com/francescopace/espectre · verified: GitHub API and official README fetched 2026-10-29 (stars 9,700; GPLv3; ESPHome source path, Direct API port 62587 and supported chips documented) · The official project provides ESPHome, native MQTT, Matter and browser flashing paths; one ESP32 covers one area and does not identify people or count occupants.
  9. Grade C · official docs seemoo-lab/nexmon_csi — CSI extraction on various Broadcom Wi-Fi chips
    SEEMOO Lab, TU Darmstadt
    github.com/seemoo-lab/nexmon_csi · verified: GitHub API 2026-10-29 (stars 479, last push 2026-09-30; README lists bcm43455c0 on Raspberry Pi 3B+/4B/5)
  10. Grade D · preprint/wiki ruvnet/RuView — community Wi-Fi spatial-intelligence project
    r. u. v. (community maintainer) · 2026
    github.com/ruvnet/RuView · verified: GitHub API 2026-10-11 (stars 97,237; created 2025-06-07) · Community project, not peer-reviewed: its marketing claims (real-time “spatial intelligence” / vital signs) have no independent reproduction — treat as a lead, not a conclusion.
  11. Grade C · official docs NTUMARS/Awesome-WiFi-CSI-Sensing — curated papers and resources
    NTU MARS Lab
    github.com/NTUMARS/Awesome-WiFi-CSI-Sensing · verified: GitHub API 2026-10-11 (stars 1129, MIT, last push 2025-07-19)
  12. Grade C · official docs WST — Hands-on Wireless Sensing with Wi-Fi (Tsinghua tutorial)
    Tsinghua University TNS group
    tns.thss.tsinghua.edu.cn/wst/ · verified: tns.thss.tsinghua.edu.cn HTTP 200, 2026-10-11 · A university-run hands-on Wi-Fi sensing course (slides and datasets); not a peer-reviewed paper.
  13. Grade E · first-party measurement Router CSI Lab — GL-MT6000 (MT7986) Wi-Fi CSI dataset, 10 s sample + 10 min capture
    Router CSI Lab · 2026
    doi:10.5281/zenodo.23434789 · verified: CC BY 4.0; SHA-256 published; Zenodo DOI 10.5281/zenodo.23434789 · The dataset has a Zenodo DOI (10.5281/zenodo.23434789) and can be cited directly.
  14. Grade E · first-party measurement CSI subcarrier redundancy and effective-dimensionality audit (script, metrics, PCA spectrum)
    Router CSI Lab · 2026
    okwujun.pw/en/csi-subcarrier-redundancy/ · verified: Rerun from the public 10-minute and 60-second captures with input SHA-256 527466ce…a440 and 41c35d9d…87a6; script, JSON, CSVs and figure are published together (2026-11-01) · This establishes correlation structure and effective dimensionality in these two amplitude captures only. It does not map array indices to physical frequencies or provide human ground truth.