ESP-NOW Not Working
Espressif ESP32
Severity: ModerateWhat Does This Error Mean?
ESP-NOW not working on ESP32 is almost always caused by a mismatched Wi-Fi channel, wrong peer MAC address, or ESP-NOW not being initialized before adding peers. Both sender and receiver must be on the same Wi-Fi channel and both must call esp_now_init() successfully.
Affected Models
- ESP32 DevKit
- ESP32-WROOM-32
- ESP32-S2
- ESP32-S3
- ESP32-C3
- ESP32 WROVER
Common Causes
- Wi-Fi channel mismatch — sender and receiver must operate on the same channel
- Wrong peer MAC address — even one incorrect byte prevents delivery
- esp_now_init() called after WiFi.begin() without setting channel explicitly
- Receiver not registered as a peer on the sender using esp_now_add_peer()
- Wi-Fi mode not set to WIFI_STA or WIFI_AP before calling esp_now_init()
How to Fix It
-
Set Wi-Fi mode before calling esp_now_init().
Call WiFi.mode(WIFI_STA) before esp_now_init() on both sender and receiver. ESP-NOW requires the Wi-Fi stack to be initialized, even if you are not connecting to a router. The mode must be set consistently on all devices involved.
-
Verify the peer MAC address exactly.
The MAC address used in esp_now_add_peer() must exactly match the receiver's Wi-Fi MAC address. Print the receiver's MAC with WiFi.macAddress() and copy it byte-for-byte. A single incorrect digit means the message will never be delivered.
-
Match Wi-Fi channels on all devices.
When both sender and receiver are also connected to a Wi-Fi router, they must be on the same channel. If your router uses channel 6, both ESP32s must use channel 6 for ESP-NOW. Set the channel explicitly with esp_wifi_set_channel(CHANNEL, WIFI_SECOND_CHAN_NONE) if needed.
-
Register the peer before sending.
You must call esp_now_add_peer() with the peer info struct before calling esp_now_send(). Include the peer MAC, channel, and encryption flag (false for unencrypted). Sending to a MAC that has not been added as a peer will fail silently.
-
Implement and check the send callback.
Register a send callback with esp_now_register_send_cb() to see whether each message was delivered. The callback reports ESP_NOW_SEND_SUCCESS or ESP_NOW_SEND_FAIL after each transmission. A FAIL on every send despite correct MAC and channel usually means the receiver is out of range or not running.
When to Call a Professional
ESP-NOW is a software protocol over the 2.4GHz radio. If init() returns ESP_OK but send callbacks always report failure, the receiving ESP32 may not be running the correct firmware.