Closed Informatic closed 5 years ago
Hi,
sorry for taking this long to answer. You have found a point in the implemantation that is quite problematic. There have been many variations in the implementation and I am not quite sure which one had finally made it. I have tested the implementation a lot using a simulator and everything seems to be working fine (The cherrysim is part of the current beta release, but it needs another executable that collects all the information over a pipe and a web frontend which we couldn't open source so far. This is still in discussion). The simulator does random node setups and lets them connect to each other. This way, it can randomly produce mesh networks and reset individual nodes to monitor the mesh behaviour.
Marius
Hey!
I've been looking around implementation details on wiki, and I don't understand how https://github.com/mwaylabs/fruitymesh/wiki/The-Algorithm-in-Detail#slave-connection-procedure is implemented right now.
Looking into things, seems like https://github.com/mwaylabs/fruitymesh/blob/master/src/mesh/Node.cpp#L750 contradicts with https://github.com/mwaylabs/fruitymesh/blob/master/src/mesh/Node.cpp#L836, so that condition in line 750 can never be true, and thus disconnection will never occur.
I can't seem to reproduce this on real devices as well, as I might just be mislead somehow by the code.