Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing node will disable all children. #237

Closed
JonasZaverka opened this issue Apr 21, 2024 · 3 comments
Closed

Missing node will disable all children. #237

JonasZaverka opened this issue Apr 21, 2024 · 3 comments
Labels

Comments

@JonasZaverka
Copy link

JonasZaverka commented Apr 21, 2024

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
Copy link
Member

TMRh20 commented Apr 22, 2024

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
Copy link
Author

JonasZaverka commented Apr 22, 2024

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
Copy link
Member

2bndy5 commented Apr 22, 2024

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.

// If a write fails, check connectivity to the mesh network
if (!mesh.checkConnection()) {
//refresh the network address
Serial.println("Renewing Address");
if (mesh.renewAddress() == MESH_DEFAULT_ADDRESS) {
//If address renewal fails, reconfigure the radio and restart the mesh
//This allows recovery from most if not all radio errors
mesh.begin();
}

@2bndy5 2bndy5 closed this as completed Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants