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

Group message repetition always required on application level?

In the light-switch-proxy-client example there is every unreliable group message repeated a number of times (GROUP_MSG_REPEAT_COUNT). Is this always required to be implemented on application level or is there also an implicit group message repetition mechanism for unreliable messages inside the stack itself?

If group message repetition is required to be managed on application level, how many repetitions do you recommend? In the light-switch-proxy-client example there are 3 repetitions while e.g. in the light-switch-proxy-server example for the Thingy example there are 5 repetitions. Is there a reason for these different settings?

Parents
  • Hi Armin, 

    the default number of repeated transmissions of one original mesh packet, CORE_TX_REPEAT_ORIGINATOR_DEFAULT,  is defined as 1 in nrf_mesh_config_core.h, i.e. one repeated transmission per packet. At the application level you will implement your own functions for sending reliable and\or reliable packets for each model client/server , in the case of simple_on_off_client_set_unreliable()  we call access_model_publish() repeats times in a loop. 

    uint32_t simple_on_off_client_set_unreliable(simple_on_off_client_t * p_client, bool on_off, uint8_t repeats)
    {
        simple_on_off_msg_set_unreliable_t set_unreliable;
        set_unreliable.on_off = on_off ? 1 : 0;
        set_unreliable.tid = m_tid++;
    
        access_message_tx_t message;
        message.opcode.opcode = SIMPLE_ON_OFF_OPCODE_SET_UNRELIABLE;
        message.opcode.company_id = SIMPLE_ON_OFF_COMPANY_ID;
        message.p_buffer = (const uint8_t*) &set_unreliable;
        message.length = sizeof(set_unreliable);
        message.force_segmented = false;
        message.transmic_size = NRF_MESH_TRANSMIC_SIZE_DEFAULT;
    
        uint32_t status = NRF_SUCCESS;
        for (uint8_t i = 0; i < repeats; ++i)
        {
            message.access_token = nrf_mesh_unique_token_get();
            status = access_model_publish(p_client->model_handle, &message);
            if (status != NRF_SUCCESS)
            {
                break;
            }
        }
        return status;
    }

    No, I am not aware of any specific reason for why the repetition number in the Mesh SDK example and the Thingy example are set to different values. It could be that the value was increased in the Thingy examples since have been shown at trade shows where there are a lot of activity on the 2.4GHz spectrum, i.e. in order to make the demo more robust against packet collisions.

    Best regards

    Bjørn  

      

     

  • Does this mean the total number of repetitions for group messages is CORE_TX_REPEAT_ORIGINATOR_DEFAULT multiplied with the number of repetitions on application level?

Reply Children
Related