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

How to set retransmissions to "0" in the generic level client model?

Hello,

I'm implementing the Generic Level Client Model, with Mesh SDK 3.1.0. When I use the generic_level_client_delta_set() function, the level model is set to retransmit messages once, so the message is always sent twice.

How can I set retransmissions to "0", so that the command is sent only one time?

Thank you very much!

Parents Reply Children
  • Hi Joakim, 

    I realized this configuration is done in the "Publication Settings" tab (in the nrf Mesh app). By default, the retransmission count is 1; I changed it to 0.

    Sorry for the inconvenience, and thanks for the help!

  • Hi again, 

    Still, I think there's a bug in the android app or in the light switch example, because the retransmission fields in the app do not match the model's retransmission parameters. For example, when I change the "interval steps" in the app, the "retransmit count" parameter changes in the node's model. So, to set "retransmit count" to 0, I have to send an "interval steps" = 0. 

    I'd appreciate your comments, thank you!

  • Hi, 

    The error is in the definition of "config_publication_params_t", specifically in the order of the definitions of the retransmit_count and the retransmit_interval fields. 

    Original definition: 

    typedef struct __attribute((packed))
    {
    uint16_t appkey_index : 12; /**< Application key index. */
    uint16_t credential_flag : 1; /**< Friendship credentials flag. */
    uint16_t rfu : 3; /**< Reserved for future use, set to 0. */
    uint8_t publish_ttl; /**< TTL for outgoing messages. */
    uint8_t publish_period; /**< Period for periodic publishing. */
    uint8_t retransmit_count : 3; /**< Number of retransmissions of each message. */
    uint8_t retransmit_interval : 5; /**< Number of 50 ms steps between each retransmission. */
    config_model_id_t model_id; /**< Model identifier. */
    } config_publication_params_t;

    New definition: 

    typedef struct __attribute((packed))
    {
    uint16_t appkey_index : 12; /**< Application key index. */
    uint16_t credential_flag : 1; /**< Friendship credentials flag. */
    uint16_t rfu : 3; /**< Reserved for future use, set to 0. */
    uint8_t publish_ttl; /**< TTL for outgoing messages. */
    uint8_t publish_period; /**< Period for periodic publishing. */
    uint8_t retransmit_interval : 5; /**< Number of 50 ms steps between each retransmission. */
    uint8_t retransmit_count : 3; /**< Number of retransmissions of each message. */
    config_model_id_t model_id; /**< Model identifier. */
    } config_publication_params_t;

    This way it works fine.

    Thanks

  • Hi.

    Thanks for feedback and for sharing the solution.

    Best regards,
    Joakim

Related