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

Periodic publish gets called twice

Hello,


I am using the nRF SDK for Mesh v.3.1.0.

To achieve periodic publishing, I set p_pubstate->publish_period.step_num = 1 instead of zero in the configure step in node_setup.c. This indeed results in periodic publishing, but app_gen_onoff_client_publish_interval_cb() gets called twice, even though retransmit_count i set to 0. Why is that? 

Parents
  • Hi,

    Can you check that all retransmit_count is set to 0?

  • Hi,

    Amadeus said:
    And, also regarding periodic publishing, is there a way to start (and stop) the periodic publish after the node_setup.c at any given time? For example, if I want my node to start periodic publishing for five minutes at a given time, could I achieve this by calling e.g. access_model_publish_period_set() or another appropriate function?

    Yes that is possible, but it is not recommended if your product is targeted to be used in an environment where third party mesh provisioner/configurator is controlling publication settings of your product.

    As for the issue where the callback app_gen_onoff_client_publish_interval_cb() gets called twice, we are looking into it. I will update you when we have an update.

  • Hi, thank you. 

    When I call access_model_publish_period_set() instead of setting step_num to 1 in node_setup.c,  app_gen_onoff_client_publish_interval_cb() is just called once. I. e. the issue referred to above seems to happen only if I initialize my clients with periodic publish in node_setup.

  • UPDATE: You have probablyhas updated periodic publication settings for the both instances of the client model on the client example. Note that in the client example there is a common periodic publication callback for both instances of the client models. If a periodic publication is configured for both client model instances with the same publish periods, the publication callback will get triggered twice as expected (but with a different model handle in each case). Probably this is what is being observed.

Reply
  • UPDATE: You have probablyhas updated periodic publication settings for the both instances of the client model on the client example. Note that in the client example there is a common periodic publication callback for both instances of the client models. If a periodic publication is configured for both client model instances with the same publish periods, the publication callback will get triggered twice as expected (but with a different model handle in each case). Probably this is what is being observed.

Children
No Data
Related