esp-csi-rsA Rust crate for collecting Channel State Information (CSI) on ESP32 series devices using the no-std embedded framework.
‼️ Command Line Interface (CLI) Option: If you’d like to extract CSI without having to code your own application, there is the CLI wrapper that was created for that purpose. The CLI also gives access to all the features available in this crate. Check out the
esp-csi-cli-rsrepository where you can flash a pre-built binary. This allows you to interact with your board/device immediately wihtout the need to code your own application.
esp_csi_rs builds on top of Espressif’s low-level abstractions to enable easy CSI collection on embedded ESP devices. The crate supports various WiFi modes and network configurations and integrates with the esp-wifi and embassy async ecosystems.
esp-csi-rs supports several ESP devices including the ESP32-C6 which supports WiFi 6. The current list of supported devices are:
With exception to the ESP32 and the ESP32-C2, esp-csi-rs leverages the USB-JTAG-SERIAL peripheral available on many recent ESP development boards. This allows for higher baud rates compared to using the UART interface.
defmt & Serialized Outputesp-csi-rs reduces device to host transfer overhead further by supporting both serialized output and defmt. This allows for better CSI throughput when communicating the output to a host device. defmt is a highly efficient logging framework introduced by Ferrous Systems that targets resource-constrained devices. More detail about defmt can be found here.
By enabling the optional async-print feature, the crate delegates packet serialization and output to an asynchronous driver. This ensures that heavy I/O operations won’t block the async executor. Keeping logging non-blocking is critical for maintaining higher throughput and preventing dropped CSI packets.
When setting up a CSI collection system, dummy traffic on the network is needed to exchange packets that encapsulate the CSI data. esp-csi-rs allows you to control the intervals at which traffic is generated.
Traffic carrying collected CSI data are tagged with sequence numbers that triggered the collection. This is useful in star topologies where the traffic generator wants to track the CSI generated with a single broadcast across several stations.
esp-csi-rs defines two types of roles that a node can take in a collection network:
esp-csi-rs defines two types of collection modes:
esp-csi-rs supports three operational modes:
esp-csi-rs allows you to configure a device to one several operational modes including ESP-NOW, wifi station, or sniffer. As such, esp-csi-rs supports several network setups allowing for flexibility in collecting of CSI. Some possible setups including the following:
To use esp_csi_rs in your project, create an ESP no-std project set up using the esp-generate tool (modify the chip/device accordingly):
cargo install esp-generate
esp-generate --chip=esp32c3 your-project
Add the crate to your Cargo.toml. At a minimum, you would need to specify the device and the desired logging framework (println or defmt):
esp-csi-rs = { version = "0.3.0", features = ["esp32c3", "println"] }
‼️ The selected logging framework needs to align with the selected framework for the
esp-backtracedependency
The repository contains an example folder that contains examples for various device configurations. To run any of the examples enter the following to your command line:
cargo esp32s3 --example <example-name>
Just replace example-name with the file name of any of the examples.
You can find full documentation on docs.rs.
This crate is still in early development and currently supports no-std only. Contributions and suggestions are welcome!
Copyright 2026 The Embedded Rustacean
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Made with 🦀 for ESP chips