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

Access_model_reliable_publish and acknowledge, retries

Hi,


I am using nRF52840 and nRF SDK 15.2 and nRF SDK for Mesh 3.1.


When I try to send acknowledged messages, sometimes my device needs to retry several times before the message is acked. Sometimes it takes 5 retries before I get an ack, even though my development boards are right next to each other with good signal strength. Why is this? With unacknowledged publishing, the same device always receives the message when no retries.

Furthermore, I have logged the status in access_model_publish() return by packet_alloc_and_tx() and sometimes, under reliable publishing, it returns (NRF_ERROR_INVALID_STATE) which makes access_model_publish() to call add_reliable_message(). What's the implication of this and why does it return NRF_ERROR_INVALID_STATE??

Parents
  • Hi,

    Sorry for the late response on this,

    How often does this happen? How big is you packets and how fast do you send them?

    access_model_publish() returning NRF_ERROR_INVALID_STATE means that there is already a segmented packet to this destination in progress. Wait for it to finish before sending new segmented packets.

  • This happen when I regularly send acknowledged messages more often than around every 4 seconds.

    Above is a snippet from RTT viewer. Here, I have logged the return value of packet_alloc_and_tx() inside access_model_publish(). As you can see, this time the function is called five times before the message is acknowledged. Sometimes, some of these status messages show and 8 (NRF_ERROR_INVALID_STATE) instead of 0, but continues till ack is received.

    Edit: To clarify, I am not calling access_model_reliable_publish multiple times above, it is called automatically by the API.

    My messages are between 20 and 30 bytes and indeed segmented, but it should not take a long time to send those. I have not changed the retry interval of reliable publish, where can I do that?

Reply
  • This happen when I regularly send acknowledged messages more often than around every 4 seconds.

    Above is a snippet from RTT viewer. Here, I have logged the return value of packet_alloc_and_tx() inside access_model_publish(). As you can see, this time the function is called five times before the message is acknowledged. Sometimes, some of these status messages show and 8 (NRF_ERROR_INVALID_STATE) instead of 0, but continues till ack is received.

    Edit: To clarify, I am not calling access_model_reliable_publish multiple times above, it is called automatically by the API.

    My messages are between 20 and 30 bytes and indeed segmented, but it should not take a long time to send those. I have not changed the retry interval of reliable publish, where can I do that?

Children
No Data
Related