How-to · Intermediate · 3 min read
ESP-NOW
Peer-to-Peer Messaging Between ESP32 Boards
By Geekobot Learning Team · Updated 24 Oct 2026
On this page
ESP-NOW is Espressif's connectionless protocol that lets ESP32 and ESP8266 boards send short messages directly to each other with no router. Each message carries up to 250 bytes and is addressed by the receiver's MAC address. It starts in milliseconds and uses little power, so it suits remotes, sensor nodes and battery projects. Range is similar to Wi-Fi, typically tens to over a hundred metres in open air.
Key specs at a glance
- Payload
- Up to 250 bytes per message (larger in ESP-NOW v2 on recent ESP-IDF)
- Addressing
- MAC address of each peer, or broadcast FF:FF:FF:FF:FF:FF
- Peers
- Up to 20 paired peers; fewer when encrypted
- Range
- Similar to Wi-Fi: tens of metres indoors, 100 m or more line of sight
- Boards
- ESP32 family and ESP8266
- With Wi-Fi
- Works alongside Wi-Fi if both use the same channel
Setting it up
- 1On the receiver, print its MAC address with
WiFi.macAddress()afterWiFi.mode(WIFI_STA). - 2On both boards, call
WiFi.mode(WIFI_STA)andesp_now_init(). - 3On the sender, add the receiver as a peer with
esp_now_add_peer()using its MAC and channel 0 (current channel). - 4Define a struct for your data, for example temperature and battery voltage, and send it with
esp_now_send(mac, (uint8_t*)&data, sizeof(data)). - 5On the receiver, register a receive callback with
esp_now_register_recv_cb()and copy the bytes back into the same struct.
The receive callback's signature changed in Arduino-ESP32 core 3.x; use the examples installed with your core version.
Common patterns
a handheld ESP32 with buttons sends commands to a robot or relay board.
wake from deep sleep, read a sensor, send one message, sleep again. Each wake takes well under a second, far less than joining Wi-Fi.
many nodes send to one ESP32 that is also on Wi-Fi and forwards data to MQTT and Home Assistant. Set the nodes to the router's Wi-Fi channel.
send to FF:FF:FF:FF:FF:FF so every nearby board receives it, useful for pairing.
Limits and alternatives
ESP-NOW only works between Espressif chips. Delivery confirmation means the radio acknowledged the packet, not that your code processed it, so add your own sequence numbers if order matters. For longer range use LoRa; for non-Espressif boards use nRF24L01 or Bluetooth. See choosing a wireless module.
Try it: Battery life calculator
Change the values and the diagram and results update as you type.
Send sensor data between two ESP32 boards with ESP-NOW
You need: Two ESP32 boards, A sensor such as a DHT22 (optional), USB cables · Tools: Computer with Arduino IDE and the ESP32 core
Get the parts2 of 3 found in our store · ₹477
Two ESP32 boardsESP32-H2 SuperMini Development Board₹449Closest match, check the specs- A sensor such as a DHT22 (optional)Find this part
USB cablesUSB Cable₹28
- 1Get the receiver MACUpload a sketch that prints WiFi.macAddress() and note it.
- 2Write the receiverInit ESP-NOW and register a receive callback that prints the struct.
- 3Write the senderInit ESP-NOW, add the receiver as a peer and send a struct every few seconds.
- 4TestOpen both serial monitors and watch messages arrive.
- 5Add deep sleepMake the sender sleep between messages for battery use.
Common mistakes to avoid
- Using a different Wi-Fi channel from the gateway's router.
- Different struct layouts on sender and receiver.
- Expecting ESP-NOW to talk to non-Espressif boards.
- Copying examples for the wrong core version callback signature.
- Sending more than 250 bytes in one message.
Frequently asked questions
Does ESP-NOW need a Wi-Fi router?
No. Boards talk directly to each other using their MAC addresses.
Can ESP32 and ESP8266 talk with ESP-NOW?
Yes. Both support it, though the ESP8266 API is slightly different.
Can I use ESP-NOW and Wi-Fi at the same time?
Yes, if the ESP-NOW peers use the same channel as the Wi-Fi network the board is connected to.
What is the range of ESP-NOW?
Similar to Wi-Fi: tens of metres indoors and 100 m or more line of sight with good antennas.
How much data can ESP-NOW send?
Up to 250 bytes per message with the classic API, which is plenty for sensor readings and commands.
Parts for this guide
- ₹1,869View
Calculators
Terms in this guide
Projects that use it
Put this into practice: 9 step-by-step builds in our project library use parts from this guide.
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

