Mesh relay enable/disable

Hi!

We would like to install approx. 2000 pcs BLE devices in a mesh network. The device density is quite high (2x5 meters matrix, same level, no objects).

I think only couple of nodes should have relay functionality. Too many relays cause extreme network load, message cache overflow and ineffective network operation.

I plan to enable the relay function in 80 devices only. The distance between relays is 10-15 meters. The number of hops between the longest ends is about 20 hops, so TTL will be set to 24.

I plan to disable the relay, proxy and the advertisement functions in the normal nodes.

Is my approach correct? Will it work? What do you recommend to optimize the network? Shall I play with the retransmission parameters?

The next question is related to enable/disable relay functions: I would like to use the same fw in the nodes. Enable the relay is a configuration parameter. I couldn't find API function to do this. However there are public functions in the mesh source code core/include/network.h like network_opt_get/set. (mesh v5.0)

Is it recommended to use these functions to tune the relay function?

  • Hi,

    Your approach seems to be fine. Not having all your nodes in the network beeing a relay node is an intended way of doing it. Like you mentioned, having too many relays will cause a huge load on the network and disturbance between the nodes. 

    As for your question regarding the API for enabling/disabling the relay feature, I think you can use it but not entirely sure. I will have to discuss this with the mesh team and come back to you with an answer on Monday.

  • 0
    6118 pts.
    in reply to Mttrinh

    After discussing with our developer it seems using network_opt_get/set directly is not supported, as these are internal APIs. Applications should use mesh_opt_core_adv_set/get with role = CORE_TX_ROLE_RELAY and the correct options struct (enabled = false, or enabled = true in the struct of course to re-enable the relay role). mesh_opt_core_*_get/set are declared in in mesh/core/api/mesh_opt_core.h, and are part of the public, supported API for application use.

  • Hi, thank you for your answer. I see it is possible to enable/disable the relay and tune the retransmission parameters. I will play with them.

    I would like to disable the proxy functionality too. I don't need thousands of proxy nodes. The relay nodes should have proxy and the normal nodes shouldn't be discoverable. What is the recommended way to stop advertisement but remain the member of the mesh?

  • 0
    6118 pts.
    in reply to Mttrinh

    Hi,

    Peter Gombos said:
    What is the recommended way to stop advertisement but remain the member of the mesh?

    By "stop advertising" I assume you mean disabling the proxy functionality? You can disable proxy by setting this define MESH_FEATURE_GATT_PROXY_ENABLED to 0.

  • Yes, I would like to disable the gatt proxy feature. However I would do it runtime. Compile time define is not suitable for me because I have to use the same firmware in every devices.
    How can I enable/disable the proxy functionality at startup?

Related