Hi Glenn,glenn20 wrote: ↑Sat Aug 28, 2021 1:04 pm
- Announces itself with a specific "discovery" message on broadcast (unencrypted) asking for a service name (eg. "broker") and waits for responses for a few seconds
- Any of my "broker" nodes that receive the message add the new device as an unencrypted peer and responds with an "Announce" response.
Thanks very much for your work on EspNow on MicroPython ! I was about to do a project on C, but python might help having something easier to code !
However, I'm trying to use ESPNow in python, and I'm stuck at the begining.
I must implement a system where there will be a master node, and 10 slave nodes.
Idealy, slaves should not have to know the master node MAC, and I would like to make them register automatically.
I thought of some algorithm to do so, but I'm stuck in an endless loop : The master node can listen to broadcast messages (listen to any unknown peer), but I can't find a way to make any slave send broadcast messages ?
Am I missing a part ?
I'm very interrested of how you did what you talk earlier (see quote), nodes sending discovery messsage on broadcast ?
PS : I had a look on a C library to be used with platformio and ESP32, which was called "ESPNOW flooding mesh library". Obviously it was using ESPNow, and it abstract all the stuff around espnow, so you just have to setup a master slave, slaves nodes, a cypher key, and everything runs smoothly ! Might be a good idea to reimplement it in python If I can make espnow work on micropython, I might give it a try !
Regards