nRF24 / RF24Mesh

OSI Layer 7 Mesh Networking for RF24Network & nrf24L01+ & nrf52x devices
http://nrf24.github.io/RF24Mesh
GNU General Public License v2.0
422 stars 153 forks source link

Missing node will disable all children. #237

Closed JonasZaverka closed 3 months ago

JonasZaverka commented 5 months ago

Hi, Im trying to implement this awesome library into my bachelor thesis. I ran into an issue. Picture1 In this picture all is working fine. Now I’m going to disable nodID:4 Picture2 Children of nodeID:4 will not get a valid address. All comunication fails. mesh.renewAddress() and mesh.begin(); doesnt help.

This persist until nodeID:4 is back online.

After nodeID:4 is back online. After some time, all is working fine. Picture3

But for me it’s quite a problem since losing a node is not an unrealistic problem. Is this issue with my code or setup. Or perhaps this scenario will not work?

Thank you, i can send code if anybody suggests that this should work fine but my code is at fault :)

Thank you very much for your work.

TMRh20 commented 5 months ago

Nodes need to verify their connection periodically. If you look at the examples, you will see exactly this.

I have my nodes checking their connection every 30 seconds, while the example verifies the connection whenever a write fails.

You most likely have something wrong in your code, but this is not the place to debug your code, rather to report issues with the library.

JonasZaverka commented 5 months ago

if i dont verify the connection nothing happens. After i try sending something it fails and tries to reconnect. Than it gets this weird address. Honestly i ran into memory issues a little later. It may be that. But if i understood correctly. If one of the nodes goes missing the library should handle reassigning new addresses to all of the missing nodes children. Is that correct ?

2bndy5 commented 5 months ago

If one of the nodes goes missing the library should handle reassigning new addresses to all of the missing nodes children. Is that correct ?

The correct answer is no because you have to implement the connectivity handling in user code. See any of the examples and look at where renewAddress() is used. https://github.com/nRF24/RF24Mesh/blob/7c30debee4b91d63c27847213eaf10d413a10212/examples/RF24Mesh_Example/RF24Mesh_Example.ino#L83-L91