This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Customizing relay node behaviour in mesh.


Hi everybody.

I'm trying to design a mesh network in which most of the nodes, if not every, should be a relay due to parallel positioning of the devices and each one of them should only be active (advertising, scanning, relaying etc.) let's say only every hour, and also I can't really use LPN/Friendship feature.

I read that you can dynamically disable reley feature via. config_client_relay_set(), and also this thread, but if I'm not wrong, that seem's like you'd have to provision a node again.
So just to clarify, it's possible in some timer function to disable relay functionality, make it go to sleep mode for one hour, then wake it up, enable relay, send and pass on messages, and then again repet that cycle?

In case if it's possible, does this kind of implementation, where every node for most of the time is sleeping, has any negative affects on the network itself, like maybe updating network keys or any other problems may appear?

And if it's not, is there any other way that would allow me to implement this kind of feature? Maybe by basic BLE advertising, scanning, connecting, but that seem's pretty challenging and more complex than mesh for larger network.

Thanks for any thoughts, I appreciate that.

  • Hi bursztyn12,

    Could you clarify that you want to completely put the node to sleep in a period of time and then wake it up or you just want to disable the relay function of the node but still keep the node active and listen to mesh packet ? 
    In both case, it's totally fine to do it on your node without requirement of re-provisioning or re-configuration with the config client/server. 

    However, you would need to take in to account the mesh network performance when multiple nodes enter sleep mode at the same time. Do you still have good enough coverage from available relay nodes so that the message can be relayed to every awake node ? 

    And please be aware that if you put a node in to sleep mode, there will be no message cache for that node and it won't be able to receive the message when it wake up from sleep. 

  • Ok, so I will describe my use case more precisely to answear your questions/thoughts and will see, if theoretically, it could still work.

    For now I would like to implement simple mesh network and basically use only relay feature so, my devices do some measurements, send them/relay to proxy/collector, and after this, to answear your first question , yes put every node to sleep and then wake them all up at the same time to repeat that cycle, because my additional goal is to make it as low power as possible, and I think I can deal with current consumption of relay node, but only when it's per hour, not when it's constant.

    Regarding this second part, like I said, I would like to do all communication in that one synchronized duty/active cycle and when it's done, all nodes become inactive/sleeping mode (that synchronized part seem's pretty tricky, but will see), so I don't really consider problems with coverage to every awake node and no message cache.

    Also if it's still possible, to enter sleep mode I would have to work on node CPU like you said here, modify and use the peripheral Power Management Example ,or maybe there's another way to achieve that in mesh?

  • Hi,

    How many node do you plan to have in your network ? 
    If you don't have too many, you may think of doing normal BLE connections. We can support up to 20 concurrent connections. If you can do normal BLE, it might be easier than having to implement clock sync with all nodes. And you can achieve much lower power consumption compare to let all nodes stay in mesh for a period (constant 6-7mA power consumption in scanning). 
    How long do you plan to keep the devices in active mesh mode per hour?

    How do you detect that all nodes have finished transmitting and how to make sure all nodes have synced the time and know when to go to sleep ? 

    I don't see much problem putting the chip to sleep after you disable mesh and keep a timer to wake it up after a certain time. 

Related