Expand description
Host-side decoder for the firmware’s serialized CSI wire format.
WebSocket frames from csi-webserver-rs are the device’s serialized
records: each is postcard::to_slice_cobs(&CSIDataPacket) — a COBS-framed,
postcard-encoded struct — with the trailing \0 COBS terminator stripped by
the server. This module mirrors that on-device struct so the client can
decode frames into typed fields for local Parquet export, exactly as the
server does for its own dumps.
§Why the struct is mirrored, not imported
esp-csi-rs is an esp-hal crate and cannot compile for a desktop host, so
the wire types are re-declared here. postcard is not self-describing and
uses varint encoding, so these mirrors must match the firmware field-for-
field, in order. Pinned to esp-csi-rs 0.8.0. When the firmware bumps
its protocol/struct, update these definitions in lockstep with the server.
Structs§
- Date
Time - Optional NTP-derived calendar timestamp the firmware may attach to a packet.
- Decode
Error - Failure decoding a serialized CSI frame.
- Decoded
Csi - Chip-agnostic decoded CSI record — the superset of every layout’s fields.
- PacketA
- esp32 / esp32c3 / esp32s3 layout — mirror of
CSIDataPacket(#[cfg(not(any(esp32c5, esp32c6)))]). Field order is the wire order. - Packet
Bc5 - esp32c5 layout — mirror of the
#[cfg(any(esp32c5, esp32c6))]CSIDataPacketwithout the#[cfg(feature = "esp32c6")]fields. Field order is the wire order. - Packet
Bc6 - esp32c6 layout — the c5 layout plus the three
#[cfg(feature = "esp32c6")]fields (he_sigb_len,cur_single_mpdu,rxmatch0) at their declared positions. Field order is the wire order.
Enums§
- Chip
Variant - Which on-device
CSIDataPacketlayout a connected chip produces. - RxCsi
Fmt - Compact CSI data-format descriptor.
Functions§
- decode
- Decode one COBS-framed postcard CSI frame into a
DecodedCsi.