Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Configuring mesh transmission count and interval

I'm new to the Bluetooth mesh world and I'm trying to change some basic configuration parameters during runtime, by modifying the Light Switch example. I've searched around for a correct way or function to change the transmit count and interval for the origin node of a message, and the re-transmit count and interval of a relay node, but found no suitable answer. So far my best bet is using the following code in the main loop; 

mesh_opt_core_adv_t relay_options = {.enabled = true, .tx_count = 3, .tx_interval_ms = 55};
uint8_t is_nested;
ERROR_CHECK(sd_nvic_critical_region_enter(&is_nested));
NRF_MESH_ERROR_CHECK(mesh_opt_core_adv_set(CORE_TX_ROLE_RELAY, &relay_options));
ERROR_CHECK(sd_nvic_critical_region_exit(is_nested));

 for configuring a relay node (server) and switching out the role: CORE_TX_ROLE_RELAY to CORE_TX_ROLE_ORIGINATOR for the client.

The code runs without any errors, but i don't know how to verify that the change has been accepted. When i look at the config of the nodes in the app, the parameters have their default value of 1 count and 100 ms interval, which to me indicates that the new parameters were rejected or changed again afterwards. So what is the correct way of changing these parameters?

Side question: Where can i find the callback that gets triggered when the node receives an input on Rx? I could print how many unfiltered transmission has been received at this location which is why it is of interest.

Parents
  • Hi.

    Thank you for your question.

    Could you add some information about what version of the SDK you are working with?

    Also, exactly where inside the example did you add your code? Maybe the defines you have added is re-defined at a later time.

    Br,
    Joakim

  • Of course, sorry for not mentioning that earlier. I'm using the SDK for mesh v.5.0.0, and the nRF5 SDK 17.1.0, i.e. the most recent versions. 

    I added the code in the main loop in main.c, after the initialize() and start() calls, but before the for-loop. 

    Some updates regarding the subject. By navigating to the configuration server in a nodes elements in the app (android) and manually updating the interface (swiping down), i can confirm that the retransmit count and interval gets set. The .enabled option setting the relay node feature seems to be disregarded however (always on), and I can't manually turn it off in the app either. These observations were only made for the relay servers.
    I've still not managed or understood where to change the source's transmit count and interval. 

  • Update: By testing a smaller network with 4 servers and 1 client it indeed seems like .enabled = false disables the relay feature, since the on/off messages sometimes arrive with a lowered TTL when it is set to true, but never when it is false. However the nRF App still says the servers are relays when looking in their configuration models. I don't know if this is a bug in the app or not. 

    It would still be nice to get a reassurance from you though, Joakim, that this is the correct way to change these parameters. Both for the publish retransmission at the source, and the relays retransmissions and relay feature on/off. 

Reply
  • Update: By testing a smaller network with 4 servers and 1 client it indeed seems like .enabled = false disables the relay feature, since the on/off messages sometimes arrive with a lowered TTL when it is set to true, but never when it is false. However the nRF App still says the servers are relays when looking in their configuration models. I don't know if this is a bug in the app or not. 

    It would still be nice to get a reassurance from you though, Joakim, that this is the correct way to change these parameters. Both for the publish retransmission at the source, and the relays retransmissions and relay feature on/off. 

Children
Related