DEV Community

Pratha Maniar
Pratha Maniar

Posted on

A Deep Dive Into ESP-CSI: Channel State Information on ESP32 Chips

Most people know Wi-Fi only as a way to connect phones, laptops, and IoT devices to the internet. But Wi-Fi can do much more.

Espressif’s ESP-CSI (Channel State Information) technology allows ESP32-series chips to “sense” what is happening in the environment using only Wi-Fi signals—no cameras, no radar, no extra sensors.

Every Wi-Fi signal changes as it passes through a room.
People, walls, furniture, movement—everything affects the signal slightly.
ESP-CSI captures these tiny changes in the Wi-Fi channel and turns them into meaningful data.

This makes it possible to detect:

  • Human presence
  • Motion
  • Gestures
  • Indoor positioning
  • Environmental changes

And all of this works using only an ESP chip and Wi-Fi.

Why Is ESP-CSI Better Than RSSI?

Normally, Wi-Fi devices only report RSSI (Received Signal Strength Indicator), which is a single number representing signal strength.
However, CSI provides much more detailed information, including:

  • How each frequency of the Wi-Fi signal was changed.
  • How much it was absorbed or reflected.
  • How much noise is in the environment.
  • How the signal phase rotated.
  • How the signal was delayed.
Aspect RSSI CSI
What it shows Overall signal strength (one value) Detailed channel info (amplitude + phase per subcarrier)
Detail Level Low Very high
Sensitivity Detects big changes only Detects tiny movements (even breathing)
Use Cases Basic connection quality, coarse location Motion sensing, presence, gesture, indoor positioning
Interference Easily affected More stable if environment doesn’t change
Accuracy Low High

How Does ESP-CSI Work?

Wi-Fi uses OFDM, which splits one Wi-Fi channel into many smaller frequencies called subcarriers. Each Wi-Fi packet carries amplitude and phase information for every subcarrier.

When these subcarriers travel through the environment, they get affected by:

  • People absorbing energy.
  • Moving objects shifting the wave pattern.
  • Walls reflecting the signal.
  • Furniture and air slightly bending the waves.

The ESP chip measures two things for each subcarrier:

  • Amplitude—how strong the signal became.
  • Phase—how much the wave rotated or was delayed.

Together, this forms the CSI (Channel State Information) array.

When someone moves:

  • Amplitude values fluctuate.
  • Phase values shift in characteristic patterns.
  • Even small movements cause detectable changes.

These tiny variations act as “clues” about what happened in the environment. The ESP device captures this at the PHY layer, then exposes it to the user through CSI callback events in Espressif’s API.

Features of ESP-CSI

1. Detailed Channel Insights
CSI provides amplitude and phase information for every Wi-Fi subcarrier, giving much more detail than a single RSSI value. This allows precise sensing of environmental changes.

2. No Extra Hardware Required
Works on standard ESP32-series chips (ESP32, S2, C3, C6, etc.) using built-in Wi-Fi—no special sensors or NICs needed.

3. High Sensitivity
Can detect both large movements and very small changes, such as breathing or slight object shifts.

4. Real-Time Processing
ESP chips can analyze CSI data locally and instantly, enabling fast responses without needing external servers.

5. Flexible Operating Modes
Supports multiple ways to collect CSI, including sniffer mode, router-based CSI, and device-to-device communication for advanced setups.

6. Stable and Robust
CSI amplitude data stays reliable even with typical indoor interference like chargers or other electronic devices.

7. Easy Software Integration
Fully supported in ESP-IDF and compatible with Espressif cloud tools, with open-source utilities to process and analyze CSI data.

Where Is ESP-CSI Used?

Human activity detection: Detect presence, movement, gestures, or even subtle actions like breathing—useful for security, elder care, and smart homes.

Indoor positioning: Provide accurate indoor location tracking for people or devices in buildings like malls, airports, and hospitals.

Environmental monitoring: Sense small changes in the environment through Wi-Fi signal variations.

Intrusion detection: Act as a motion sensor to detect unauthorized movement without cameras.

Asset tracking: Track the real-time location of important items in places like warehouses or hospitals.

Smart home automation: Enable location-based actions, such as auto-adjusting lights, AC, or appliances.

Chip Performance Ranking

Espressif categorizes the CSI capability of its chips approximately in the following order.
ESP32-C5 > ESP32-C6 > ESP32-C3 ≈ ESP32-S3 > ESP32.

Meaning:

Newer chips, like C5 & C6, → better CSI quality.
C3 & S3 → good general performance.
Original ESP32 → lowest but still works.

How Can ESP-CSI Be Implemented?

Espressif provides three ways to obtain CSI data.

Method 1: Getting CSI from a Router (get_router_csi)

  • Setup: One ESP device + a router.
  • Process: ESP sends ping packets to the router. The router replies with packets containing CSI information. ESP receives those packets and extracts CSI (amplitude, phase, etc.). This is the simplest method—ideal for beginners.

Method 2: Exchanging CSI Between Two ESP Devices (get_device_csi)

  • Setup: Two ESP chips + router acting as a relay.
  • Process: Both ESP devices send ping packets to the router. The router forwards packets to the correct device. When Device B receives a ping from Device A, it replies with CSI. Device A then extracts CSI information.

Method 3: Getting CSI Using a Dedicated Packet Sender (get_broadcast_csi)

  • Setup: A device that sends broadcast packets + multiple ESP receivers.
  • Process: The transmitter sends broadcast packets on different Wi-Fi channels. All ESP devices (in monitor mode) receive these packets. Each ESP extracts CSI data independently.

Want to dive deeper?
Check out Espressif’s official CSI documentation here:
https://docs.espressif.com/projects/esp-techpedia/en/latest/esp-friends/solution-introduction/esp-csi/esp-csi-solution.html

Top comments (0)