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
  • Hi.

    Maybe you can take a look at this case, and Bjørn's answer.

     Best regards.

  • 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

Reply
  • 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

Children
Related