08/02/19 - First two-way communication Success!

A project log for My attempt at an ESP-NOW Mesh

Designing a custom mesh for sensors, home automation and remote controlling using Espressif's ESP-NOW

david-mDavid M. 08/02/2019 at 21:220 Comments

In my pursuit to find the two-way communication solution, I have made three posts on the most applicable forums I could find.

I have also read through the ESP-NOW API reference to check if I have missed something from my view.

A little bit more digging around, I found a few pages indicating that two-way communication is indeed possible:

Update! For some reason, I turn on the same exact modules I programmed yesterday which didn't work no matter how I tried, now work first try. The problem must be in how I structure my code, and the timings of function execution. I hope I will find the issue which caused it.

Anyway, now that it works, let's take a look at how it functions:

Fig. 24 - Two-way communication between Node A and Node B. Captured with Five Wire.

After the nodes discover each other using the ScanForSlave function, Node A sends out the first packet in my case, containing a 0x00 (Green pin). After some time, Node B receives it (Light-blue pin), and right after, Node A gets a confirmation message that it has indeed been received (Pink pin). Also, right after receiving the 0x00, Node B increments it to 0x01 and sends it back (Brown pin). After some time, Node A receives the 0x01, after which it also increments it by one and sends it back.

This is how my two-way communication works for now. What I wonder about is whether it would be possible to transmit and receive packets at the same time by taking the advantage of using different channels, but I'm not exactly sure if that is possible at all on such a device.