An ESP-NOW LED Blink Is Only the First Test

ESP32, ESP-NOW, wireless

This is the read-only HTML version. For the full Visual Space experience, open the app.

ESP32, wireless LED — Images

ESP32, wireless LED — Images

Source: Hello World for ESP-NOW on Hackaday.io · Jake Wachlin

Latency, packet loss

Jake Wachlin’s 2019 ESP32 example makes a wireless LED blink without configuring individual recipients. His follow-up tests reveal the more useful lesson for connected devices: a quick reply and dependable message delivery are separate goals.

Getting two boards to exchange a message is a useful milestone, but it doesn’t tell you how dependable that connection will be. Jake Wachlin shared Hello World for ESP-NOW on Hackaday.io after struggling to find a working example for an ESP32-based RC link he was planning. Created on February 27, 2019, the project starts with a remotely controlled LED and then asks the more consequential question: what happens when messages don’t arrive?

A deliberately simple starting point

Wachlin’s March 16 introduction describes an Arduino-based example in which one ESP32 sends messages and another toggles an LED when it receives them. “Sender” and “receiver” are roles in this demonstration, not fixed limitations of ESP-NOW; the devices can communicate in both directions.

The example uses the broadcast MAC address, with all six bytes set to 0xFF, rather than configuring each recipient individually. Its packed message structure contains two 32-bit fields: an address index and a counter. Wachlin intended the address field for a later, application-level addressing scheme, while the counter helps track delivery. His 2019 write-up describes a 250-byte maximum data body and advises keeping the payload below that limit.

That’s a useful separation: the radio broadcasts the message, while software could decide which device should act on it. But the starting example deliberately has no security. It demonstrates communication, not a finished control protocol.

Wachlin links an example repository for builders who want a starting point. Treat it as a dated reference rather than an assurance of compatibility with today’s toolchain: API changes were already one of his reasons for writing the example in the first place.

Measuring the whole exchange

In a second log on March 16, 2019, Wachlin modified the example into an echo test. One board started a timer and sent a message; the other immediately sent it back. The originating board stopped the timer when the reply arrived and counted an error if the round trip failed.

He added padding to test different message sizes, using 1,000 messages sent at 5 Hz. The two placements were about four inches apart on a desk and about 128 inches apart across the room. He ran the tests on Wi-Fi channel 1 in a city apartment where, he reported, the 2.4 GHz spectrum was crowded. He hadn’t selected the channel based on measured conditions.

Wachlin described the round-trip latency as good overall, with slightly higher latency at the greater distance. The bigger concern was the missed-message rate, which he reported increased quickly as the boards moved apart. These are observations from that setup, not a general range specification for ESP-NOW.

The measurement also needs a careful label: round-trip time includes both transmissions and some parsing and processing, not just one-way radio latency. Wachlin presented a one-way error estimate by halving the missed round trips. That isn’t an independent measurement of each direction—a failed exchange doesn’t reveal whether the original message or its echo was lost.

For important messages, he suggested adding retries until receipt is confirmed. He also proposed that direct messaging might be more reliable than broadcasting and expected encryption to increase latency, but neither comparison was tested in this log.

A channel-setting trap worth remembering

The later discussion adds a useful debugging lesson. On February 23, 2020, commenter CRprog reported what appeared to be communication between devices configured for different channels, alongside a home access-point connection.

The next day, CRprog corrected that interpretation: they reported that the channel settings hadn’t changed the radios’ actual operating channel, and everything had coincidentally been on channel 1. This was a commenter’s diagnosis, not a documented fix from Wachlin, but it makes the distinction clear: a channel number in a configuration structure is not proof of the radio’s state.

Scale remained an open question, too. When someone proposed using payload addresses and broadcast acknowledgments for 100 ESP32s in one room, Wachlin confirmed that custom addressing fit the example’s approach—but explicitly said he hadn’t tested that many devices together.

What the LED can’t tell you

The enduring value of this small project is the step from “it blinks” to “let’s count the failures.” For a sensor network or a prospective RC link, the next useful test isn’t merely another successful packet. It’s checking what the application does when a message is missed, a retry arrives late, or the connection disappears altogether. A working broadcast example gives you a place to start those experiments; the delivery and failure behavior still need to be designed.

Source: Hello World for ESP-NOW

Internet Of Things

2 Followers

Connect useful things with clear purpose. Explore sensors, embedded devices, networks and automation; share projects, troubleshoot integrations, and compare approaches to reliability, power use, security and maintaining connected systems.

Visual Space is built for projects like this—where creators collaborate, organize goals, and grow communities around real work.