-
Versions: MicroPython 1.22.1, Thonny 4.1.4, ESP32-WROOM-32D I am running the small ESP-NOW examples found here: https://docs.micropython.org/en/latest/library/espnow.html on two different ESP32s. However, the receiver receives messages from the transmitter. The peer address added to transmitter is NEITHER a broadcast address NOR the address of the receiver. What am I doing wrong or have misunderstood? TIA |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
@volentiae - its a little hard to understand what you are doing here. One thing I have occasionally found useful is to double check just what peers the transmitter thinks have been registered by inserting If you could post your code snippets it might help me understand what is happening. (Remember to follow the guidelines for posting code in https://github.com/orgs/micropython/discussions/9111). |
Beta Was this translation helpful? Give feedback.
-
Sure, here is the sender code
It doesn't matter what MAC address is added for the peer, the messages are still received and displayed by the receiver. Here is the receiver code
It looks to me as if all transmissions are made using the broadcast address irrespective of the address added. |
Beta Was this translation helpful? Give feedback.
-
The print(esp_now.get_peers()) was inserted in these places:
The following MAC addresses have been tested print(esp_now.get_peers()) vs the MAC address shows different results So some addresses can bypass the receiver's MAC address. Those MAC addresses that can bypass are more than the ones listed above I know from testing with a group of people. However, I cannot remember which ones. |
Beta Was this translation helpful? Give feedback.
-
It seems as if this test can check if the address is not bypassing the receiver's MAC address
Except that is also becomes true for the broadcast address FF:FF:FF:FF:FF:FF. However, there must be an underlying issue somewhere I think. |
Beta Was this translation helpful? Give feedback.
Yes, any mac address with the least significant bit of the left-most byte set is a multicast mac address. These are treated similarly to broadcast addresses by the underlying ESPNOW implementation - ie. they will not be returned by
esp_now.get_peers()
and they will be responded to by listening clients.