Closed larsks closed 1 year ago
@glenn20 @larsks I've faced the exact same behavior on esp8266 while adding broadcast address as peer. It seems there's no need to add broadcast address as peer in esp8266 (I don't know why and I'm just telling this based on my own experience). So the solution is to forget about adding it as a peer and send broadcast messages freely. Anyway, I think it should be investigated precisely.
Thanks @larsks for the bug report - and to @AmirHmZz for the answer. Yes - on the esp8266 it is not actually necessary to add_peer() devices (though the docs say it is). So, the work-around is to not call add_peer() for the MAC address on the esp8266.
I will look into it, but the version of the SDK used by micropython is no longer supported by Espressif and has some well known limitations. This may be one fo the less well-known ones.
According to the documentation, esp8266 should be able to send to (but not receive on) the broadcast address:
However, in practice this seems to fail with an
OSError
:This is running Micropython installed from https://github.com/glenn20/micropython-espnow-images/blob/6b9e8d5dd08ee445a9fb3d145e64fa2473239c9a/20220709_espnow-g20-v1.19.1-espnow-6-g44f65965b/firmware-esp8266-GENERIC.bin.