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

enable disable message relay by mesh node in firmware

Hi to everybody, i'd like to know if there is a way to enable/disable mesh message relying on a node locally by the firmware without using a configuration client or a provisioner. We are working on a system where every node can be configured by a mobile app that connects using NUS; since the mesh network will have hundreds of nodes, our need is to disable the the forwarding functions on some of them. I try to use the configuration server function handle_config_relay_set but it is tailored for a configuration client request coming from the network and so it doesn't fit in our case. I also looked for help in the dev zone but without success, sadly. Any help would be appreciated.

My working environment:

Operating system: Windows 10

Development tool: segger embedded studio

Bluetooth SDK: nRF5_SDK_16.0.0_98a08e2

Mesh SDK: nrf5_SDK_for_Mesh_v4.0.0

Thank you

Gianluca

Parents Reply
  • Dear Joakim, i have found this function for changing the rely mode of the node in the module network.c:

    uint32_t network_opt_set(nrf_mesh_opt_id_t id, const nrf_mesh_opt_t * p_opt)

    calling it with the nrf_mesh_opt_id_t id = NRF_MESH_OPT_NET_RELAY_ENABLE, it seems to work (the function returns NRF_SUCCESS). If i also read the new configuration with the function network_opt_get i see that the new configuration seems to be accepted. Do you think it's better to reboot the node after changing the configuration?

Children
Related