Imagine two walkie-talkies that can instantly talk to each other without needing a phone tower in between — that's ESP-NOW. It's a fast, connectionless 2.4 GHz Wi-Fi frame protocol developed by Espressif that lets two or more ESP32 boards talk directly to each other by MAC address, with no Wi-Fi router required at all.
1. Real-World Uses
ESP-NOW shines whenever two or more boards need to talk directly and instantly, without any internet or router in the picture:
- Wireless remote controls — a joystick or button board sends commands to a robot car or drone almost instantly (about 1 millisecond), far faster than going through a Wi-Fi router.
- Sensor swarms — a handful of battery-powered sensor boards scattered around a garden or greenhouse, each reporting readings straight to one "hub" board, with no Wi-Fi network needed anywhere.
- Quick two-board demos — the fastest way to get two ESP32 boards exchanging data with almost no setup, since there's no SSID/password to configure and no router to be in range of.
Trade-off worth knowing: ESP-NOW only works between ESP32 boards running this same protocol — it can't talk to the internet, and (in OMS specifically) it can't be combined with Bluetooth in the same project.
2. Hardware Specifications & Advantages
- Compatible Boards: ESP32 only, per OMS's extension gating — ESP8266 does not appear in this extension's supported-boards list, even though Espressif's real ESP-NOW protocol does technically support ESP8266 hardware.
- Conflicts with: Bluetooth BLE and BLE HID (Sections 7.3/7.4) — OMS won't let you use ESP-NOW blocks in the same project as either BLE extension.
- Latency: ~1 ms (compared to 50–200 ms over traditional Wi-Fi router TCP/IP) — real ESP-NOW protocol figures.
- Payload Size: Up to 250 bytes per packet — a real ESP-NOW protocol limit, not something OMS's code checks or truncates for you.
- Addressing: 6-byte hardware MAC address (e.g.,
FF:FF:FF:FF:FF:FFfor broadcast).
3. How it Works (Framing Protocol & Dispatcher)
OMS uses a tagged messaging protocol over raw ESP-NOW payloads:
S:<text>— String message packetN:<number>— Floating-point numeric packetV:<key>:<val>— Labeled key-value payload packet
Incoming messages are handled differently per language: C++ registers a real hardware receive callback (esp_now_register_recv_cb), so a message triggers your event block essentially instantly. MicroPython has no such interrupt — instead, a machine.Timer polls for new messages every 100ms, so there's an inherent ~0-100ms extra delay before a received message reaches your "on string/number/value received" block, on top of the ~1ms the radio itself takes.
