ESPNow docs: trying to understand the finer points #11836
Replies: 2 comments 3 replies
-
Thanks for the feedback on the docs Peter - getting better incrementally.
I have never used multicast on the esp32 platform, so I am not sure how to subscribe to a multicast group (and I am unaware if that is possible with micropython), but you can treat any valid multicast MAC address like a broadcast address in terms of sending. I suspect a little more work is required to make that usable on micropython. I suspect it could be quite useful for managing cohorts of espnow devices.
Yes, it will send to all registered peers. I thought that was explicit, but on re-reading I see that it is not - thanks for pointing it out. I'll make an update. Note that
These are functionally identical: "In the second form, mac=None and sync=True." where the second form refers to
Yes. To send to the broadcast (or multicast) address, you have to register the broadcast (or multicast) with To send a broadcast message, you must set the bcast address as the peer in I'l think about reformulating the statement in the docs to make it clearer. (I misunderstood this for some time as the espressif docs are not clear on this). |
Beta Was this translation helpful? Give feedback.
-
A mac address has 6 bytes. I use |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Some queries re this otherwise comprehensive doc.:
multicast
option. How do you define a multicast address?ESPNow.send(msg)
: the message is forwarded to the peer specified in.add_peer
. What happens if multiple peers have been registered? The doc seems to imply it will go to all of them but perhaps it should be stated.ESPNow.send(msg)
sends to all registered peers, what is the difference between that andESPNow.send(None, msg)
? I can't make sense of the phrase "will send to all registered peers except the broadcast address" given that (as I understand it) the broadcast address sends to every ESPNow device that is in range and using the same channel, registered or not.Beta Was this translation helpful? Give feedback.
All reactions