You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been working a lot with ESP-NOW controllers recently, getting a jump on my holiday light setup. The normal controller registration method was seemingly working fine at first. To review that process: ESP-NOW controllers send a "register" packet to the gateway. The gateway then adds the peer to the 'peer list' that is built-in (internal) to ESP-NOW functionality, and also an external peer list maintained by the FDRS gateway, which is an array that also contains a "last seen" variable. Adding the address to the internal peer list allows the ability to send one message to every peer on the list with a null-addressed ESP-NOW send command esp_now_send(0, (uint8_t *)&thePacket, sizeof(thePacket));.
When I sent using that method, however, the transmission was only received by the first four devices that were added to the peer list. Instead, I replaced it with a for() loop that just cycled through all of the peers and send them an individual packet. Now is where it's a bit interesting:
When the for() loop sent every message one after another with no delay, the behavior matched the issue I was having with the internal peer list. It failed after the first four messages.
When I waited for the send callback to be called before moving to the next message/recipient, everything worked as intended.
So that is what I've done, and it is working great so far! Details on my holiday project are coming soon!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've been working a lot with ESP-NOW controllers recently, getting a jump on my holiday light setup. The normal controller registration method was seemingly working fine at first. To review that process: ESP-NOW controllers send a "register" packet to the gateway. The gateway then adds the peer to the 'peer list' that is built-in (internal) to ESP-NOW functionality, and also an external peer list maintained by the FDRS gateway, which is an array that also contains a "last seen" variable. Adding the address to the internal peer list allows the ability to send one message to every peer on the list with a null-addressed ESP-NOW send command
esp_now_send(0, (uint8_t *)&thePacket, sizeof(thePacket));
.When I sent using that method, however, the transmission was only received by the first four devices that were added to the peer list. Instead, I replaced it with a for() loop that just cycled through all of the peers and send them an individual packet. Now is where it's a bit interesting:
So that is what I've done, and it is working great so far! Details on my holiday project are coming soon!
Beta Was this translation helpful? Give feedback.
All reactions