Learn/rusty_esp_signalesp-nowesp32radiorust

rusty_esp_signal Is a Pure Rust Alternative to Arduino Radio Sketches

rusty_esp_signal is a pure Rust alternative to Arduino radio sketches: Wi-Fi presence, ESP-NOW, BLE setup, LoRa, and an LD2410 parser, each with a status.

Signed by M·
Dusk brick meadow with short antenna towers, each topped by an orb, golden threads crossing the flower beds inside the frame
Is rusty_esp_signal a pure Rust alternative to Arduino radio sketches?

For the application layer, yes. rusty_esp_signal is a pure Rust alternative to Arduino radio sketches: Wi-Fi presence, authenticated ESP-NOW, BLE provisioning, LoRa framing, and an LD2410 parser. The Wi-Fi and Bluetooth controllers stay Espressif's blobs. Only BLE provisioning has run on a real ESP32-CAM so far.

Related reading

Builder field note

ESP32 Radio in Rust: Wi-Fi CSI, ESP-NOW, BLE, LoRa and mmWave

APIs, composition, and home deployment for ESP32 Radio in Rust: Wi-Fi CSI, ESP-NOW, BLE, LoRa and mmWave live on the field note.

rusty_esp_signal is a pure Rust alternative to Arduino radio sketches for the ESP32 radios a house actually uses: presence from Wi-Fi channel state, an authenticated ESP-NOW link, Wi-Fi provisioning over Bluetooth, LoRa point-to-point framing, and an LD2410 mmWave parser. The market standard is a pile of Arduino sketches, one per radio, copied from a vendor example. This page is the comparison, and it keeps a separate status for each radio. The builder field note on rusty_esp_signal is that ledger. Presence continues in the Sense vision, and the links continue in the Connect vision.

What an Arduino radio sketch usually is

An ESP-NOW sketch, a BLE provisioning sketch, and a LoRa sketch are three tutorials that do not share a key, a replay window, or a place to say "this has not been run on two boards." They work. They also drift.

The layer this crate remakes

The Wi-Fi and Bluetooth controllers stay Espressif's. A pure Rust alternative to Arduino radio sketches remakes the application layer above those blobs, not the radio. Thread and Zigbee are out of v1. The ESP-IDF programming guide and the esp-rs book document the controllers this crate does not replace.

One status per radio

On silicon: Bluetooth provisioning. Host-verified, with firmware that builds: CSI presence, ESP-NOW, LoRa, the LD2410 parser, and station policy. That split is the whole point of a pure Rust alternative to Arduino radio sketches. A single "supported" badge would hide it.

The rows, without blending them

Bluetooth provisioning is the silicon row. The device advertises, a Chrome page using Web Bluetooth writes the Wi-Fi credentials, and an ESP32-CAM joined 7.5 seconds after the write. The next boot joined alone in 9.5 seconds with Bluetooth off. The passphrase does not touch a server or a log. There is also an ESP-IDF build of that path for the XIAO ESP32-S3 Sense. It builds and has not yet run on that board.

ESP-NOW, LoRa, and mmWave

ESP-NOW sessions start with a three-message P-256 handshake, HKDF-SHA256, and a 16-byte HMAC-SHA256 tag with a replay window. 227 bytes of payload remain in a 250-byte datagram. The two-board test has not run. LoRa firmware for an ESP32-C6 plus SX1262 builds, and time-on-air matches Semtech's published calculator. Range, RSSI, and packet error need two nodes and have not been taken. The LD2410 parser is checked against the protocol document's example frames and follows the wire where the vendor datasheet disagrees with the vendor tool. It has not been checked against a live module.

Presence, with the dataset named

On a public labelled ESP32-C6 dataset the detector read an empty room as present 17.4 percent of the time and a walking person 86.1 percent. A held-out empty room read 0 percent and a held-out walk 60.8 percent. Those numbers are not a recording from a Janus device in your house. The home computer's reading of the same stream is rusty_esp_sense, which is the pure Rust alternative to a camera when the question is occupancy rather than a picture.

Where the Arduino sketch still wins

Keep the vendor sketch when you need that one radio today, on the board the tutorial used, and you do not need the other radios to share an identity. A pure Rust alternative to Arduino radio sketches is the wrong week of work for a single blink-over-ESP-NOW demo.

Honest limits

  • Do not describe ESP-NOW, LoRa, or the LD2410 as "tested on hardware." They are not.
  • CSI numbers above are a public dataset, not our room.
  • Each session is meant to tie to the device identity in rusty_esp_mid. Mesh traffic that leaves the LAN rides rusty_esp_iroh, not this crate.

Copying one Arduino sketch for ESP-NOW and another for LoRa feels faster until the second board arrives and the keys do not match. A pure Rust alternative to Arduino radio sketches puts those radios in one crate so the status line can be different for each of them without a different coding style. You still provision Wi-Fi over Bluetooth the way a phone expects, with a browser rather than a store app. You do not get a green check on LoRa by finishing the BLE row. A pure Rust alternative to Arduino radio sketches is stricter than a tutorial in that one way, and looser than a product brochure. A pure Rust alternative to Arduino radio sketches will tell you the two-board test has not been run. A pure Rust alternative to Arduino radio sketches would be worse if it smoothed that sentence into "supported."

Where to start

Read a smart home without the cloud, pick hardware in choosing an ESP32 board, and flash with espino. The Learn index holds the field notes.

The source is part of Remade With Rust, the identity model is MATA, and a radio datasheet that should become a retrieval corpus goes through RAG Converter.

FAQ

Quick answers for builders evaluating this technology.

Which radio in this pure Rust alternative to Arduino radio sketches has run on silicon?

Bluetooth provisioning. An ESP32-CAM joined 7.5 seconds after a Chrome page wrote the Wi-Fi credentials over Web Bluetooth, and the next boot joined alone in 9.5 seconds with Bluetooth off. The passphrase never touches a server or a log.

Is ESP-NOW encrypted here?

Each session uses a three-message handshake over P-256 with HKDF-SHA256, and every frame carries a 16-byte HMAC-SHA256 tag with a replay window. Payload left in a 250-byte datagram is 227 bytes. The two-board test has not run yet.

Has LoRa or the LD2410 been measured on hardware?

Not yet. LoRa firmware for an ESP32-C6 with an SX1262 builds, and time-on-air matches Semtech's calculator. The LD2410 parser follows the wire where the vendor datasheet and the vendor tool disagree. Neither has a live-module table.

Can Wi-Fi presence replace a motion sketch?

It can report presence from channel state. On a public labelled ESP32-C6 dataset the on-chip detector read an empty room as present 17.4 percent of the time and a walking person 86.1 percent. A held-out empty room read 0 percent and a held-out walk 60.8 percent. Our own room recording has not been made.

Are Thread and Zigbee included?

No. They are out of v1 and belong to the home computer's border-router plan. This crate does not pretend to be a Thread stack.