This repository provides a complete CSI (Channel State Information) sensing platform using ESP32. It includes everything from firmware for data collection to processing, visualization, feature extraction, and machine learning pipelines.
The goal is to build a full Wi-Fi sensing workflow for research and real-world applications.
CSI Pipeline:
ESP32 → CSI Collection → UART/TCP → Data Logging →
Preprocessing → Feature Extraction → ML/DL → Applications
This project includes:
- ESP32 CSI firmware
- Python/C++ processing toolkit
- Realtime visualization tools
- Dataset management structure
- Examples and utilities
Applications include:
- Human Activity Recognition (HAR)
- Device-free localization
- Gesture recognition
- Breathing & fall detection
- General Wi-Fi sensing
csi-sensing/
│
├── firmware/ # ESP32 CSI firmware
├── data/ # CSI datasets (raw / processed / labels)
├── processing/ # Processing algorithms (Python/C++)
├── examples/ # Demo scripts
├── tools/ # Utility scripts for capture/analysis
├── docs/ # Technical documentation
├── configs/ # Configuration files
├── scripts/ # Bash automation scripts
└── README.md
- ESP-IDF ≥ 5.0
- Python 3.8+
- Git & ESP32 toolchain installed
cd firmware/esp32-csi-collector
idf.py set-target esp32
idf.py build
idf.py -p /dev/ttyUSB0 flash
idf.py monitorpython tools/logger.py \
--port /dev/ttyUSB0 \
--baud 921600 \
--output data/raw/csi.logpython tools/realtime_server.py --tcp 3333 --save data/raw/python processing/python/preprocess.py \
--input data/raw/csi.log \
--output data/processed/csi_clean.npyIncludes:
- Noise removal
- Phase unwrapping
- Amplitude normalization
- Spike removal / smoothing
- Filtering (Hampel, Butterworth, SavGol)
python examples/python-live-plot/plot_from_csi_serial.py -p <PORT>Or
cd tools
python3 esp_csi_tool.py -p <PORT>Supported for:
- Subcarrier amplitude
- Subcarrier phase
- Time progression
Feature extraction:
python processing/python/feature_extract.py \
--input data/processed/csi_clean.npy \
--output data/processed/features.npyTrain SVM:
python processing/python/model/svm_classifier.pyTrain LSTM:
python processing/python/model/lstm_model.py --epochs 40Plot CSI in realtime:
python examples/python-live-plot/live_plot.py -p /dev/ttyACM0Located in docs/:
- Project architecture
- CSI frame structure
- ESP32 CSI extraction guide
- Preprocessing techniques
- Sensing application notes
Contributions are welcome!
- Open issues for bugs/feature requests
- Submit pull requests
- Discussion is encouraged
MIT License.