Skip to main content

Crate esp_csi_rs

Crate esp_csi_rs 

Source
Expand description

§esp-csi-rs — CSI collection on ESP devices

Thin facade over esp_csi_rs_core, the shared engine. This crate keeps the published esp-csi-rs name and public API stable; all functionality lives in esp-csi-rs-core and is re-exported here in full.

See the esp-csi-rs-core docs for the full API.

Modules§

central
Central-node operating modes.
config
Runtime configuration types.
csi
CSI packet types and frame-format definitions.
esp_now_pool
ESP-NOW receive pool that bypasses esp-radio’s heap-allocating dispatcher.
esp_radio
Wireless support for Espressif ESP32 devices.
espnow_phy
ESP-NOW PHY forcing (per-peer rate / HT40) and radio bring-up helpers.
logging
Logging backends and CSI-line emission for the crate.
node
Node topology/configuration types and the CSINode orchestrator.
peripheral
Peripheral-node operating modes.
profile
Radio-profile seam.
protocol
ESP-NOW wire-format packets and the magic-prefix framing helpers.
stats
Global statistics counters and sequence-drop detection state.
time
Calendar-time helpers for stamping CSI packets.

Macros§

log_ln
Logging macro that routes to println!/defmt based on features.
log_raw
Log raw bytes without any added newline (blocking path only; no-op when async is active).

Structs§

CSINode
Primary orchestration object for CSI collection.
CSINodeClient
Handle for controlling a running CSINode from user code.
CSINodeHardware
Hardware handles required to operate a CSI node.
ControlPacket
Control packet sent from Central to Peripheral.
EspNowConfig
Configuration for ESP-NOW traffic generation.
IOTaskConfig
Controls whether TX and RX tasks are active for a node.
PeripheralPacket
Peripheral reply packet — a pure presence beacon.
StandardProfile
Default profile: generic chip-level radio tuning only, no extended bring-up.
WifiApConfig
Configuration for self-contained softAP CSI collector mode.
WifiSnifferConfig
Configuration for Wi-Fi Promiscuous Sniffer mode.
WifiStationConfig
Configuration for Wi-Fi Station mode.

Enums§

CentralOpMode
Central node operational modes.
CollectionMode
CSI collection behavior for the node.
CsiDeliveryMode
CSI delivery mode — single-atomic dispatch in the WiFi callback.
Node
High-level node type and mode.
PeripheralOpMode
Peripheral node operational modes.

Traits§

RadioProfile
Pluggable Wi-Fi bring-up back-end.

Functions§

apply_peer_espnow_phy
Apply per-peer ESP-NOW PHY with recv suspended during the driver call (C5-safe).
clear_csi_callback
Remove the user CSI callback registered via set_csi_callback and switch to CsiDeliveryMode::Off.
csi_delivery_mode
Returns the active CSI delivery mode.
csi_logging_enabled
Returns whether inline CSI logging is currently enabled (i.e. whether the per-packet UART/JTAG log_csi path will run).
install_static_espnow_recv
Install this crate’s static-pool ESP-NOW receive callback.
run_process_csi_packet
Internal task that handles collection-mode changes and rate statistics.
set_csi_callback
Register a user callback invoked inline for every captured CSI packet.
set_csi_delivery_mode
Set the active CSI delivery mode (callback / async / off).
set_csi_logging_enabled
Enable or disable inline CSI logging (per-packet UART/JTAG output).
set_csi_raw_callback
Register a raw CSI fast-path callback (CPU-benchmark use).
set_peer_espnow_phy
Force a peer’s ESP-NOW TX PHY to the configured rate and bandwidth.
set_raw_listen
Enable/disable raw-listen mode — see [RAW_LISTEN]. Set this before the node starts so no control packets are ingested during the run.
set_raw_recv_callback
Register a raw-recv callback — see [RAW_RECV_CALLBACK]. Pair with crate::set_raw_listen(true). The callback runs in the WiFi task’s C-FFI context, so it must return quickly and do only lock-free bookkeeping.