<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Access_model_reliable_publish and acknowledge, retries</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55144/access_model_reliable_publish-and-acknowledge-retries</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 22 Jan 2020 12:48:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55144/access_model_reliable_publish-and-acknowledge-retries" /><item><title>RE: Access_model_reliable_publish and acknowledge, retries</title><link>https://devzone.nordicsemi.com/thread/230342?ContentTypeID=1</link><pubDate>Wed, 22 Jan 2020 12:48:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed8639ff-7b38-45aa-a0ff-f38dc28e5e76</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sorry for the late response. I have talked to one of our developers and this is his response to the issue:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;I see why the customer is facing the issue. He uses the 30 Byte long messages and uses the &amp;quot;acknowledged transfer&amp;quot; API. In a case when he uses the acknowledged transfer API, he is sending these messages to a Group address. When SAR transfer is triggered to the group address, according to the specification there will be no block acknowledgements to the SAR message segment (Note that these transport layer block acknowledgements are different than the access layer unack/acked message classification). Therefore, the nrf mesh stack will retry 4 times (i.e. TRANSPORT_SAR_TX_RETRIES_DEFAULT) before declaring the SAR transfer completion. It takes about 4-5 seconds to finish this process, it will take longer, if the message is bigger. Therefore, customer sees that he cannot initiate new SAR message earlier than 4 seconds to the same destination.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;How does he see things working differently for unacknowledged messages?&lt;/em&gt;&lt;br /&gt;&lt;em&gt;The SAR mechanism does not distinguish if the message being sent is acknowledged or not at the model/access layer. Therefore, the SAR transfer for unacknowledged model messages to the Group destination should work exactly like that of acknowledged model messages. Therefore, he should see the same ~4 second waiting period before he can trigger another unacknowledged model message. I verified this by on desk experiment. Now, since this does not happen in customer&amp;#39;s case (he is reporting much better performance for unacked messages), then the destination for these unacked messages is not a Group address (I suspect that these unacked messages are being sent from another client instance which is publishing to a Unicast address). If the destination is Unicast, the SAR transfer will succeed as soon as full transport layer block acknowledgement is received from the destination node thereby unblocking the transport layer for accepting further SAR messages to the same destination.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;In summary, if a customer wants better throughput while delivering data to the group, it is better to use model messages that will fit into single segment. For a reference, see Table 3.42 in Mesh Specification v1.0.1.&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Access_model_reliable_publish and acknowledge, retries</title><link>https://devzone.nordicsemi.com/thread/225468?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2019 19:02:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4311b09-761c-4a82-8244-c3b30dec6e4d</guid><dc:creator>Amadeus</dc:creator><description>&lt;p&gt;Yes, and I am calling that function before access_model_reliable_publish() and get no &amp;quot;Acknowledged transfer canceled&amp;quot; log in the above snippet, therefore, the problem should not be that I am sending messages to fast.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Access_model_reliable_publish and acknowledge, retries</title><link>https://devzone.nordicsemi.com/thread/225444?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2019 16:10:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3fc2ba3-b5ee-4605-88d6-7d6c549a98ae</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Yes, if access_model_reliable_cancel() is called it should c&lt;span&gt;ancel an ongoing reliable message.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Access_model_reliable_publish and acknowledge, retries</title><link>https://devzone.nordicsemi.com/thread/225209?ContentTypeID=1</link><pubDate>Thu, 12 Dec 2019 15:27:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd7b668a-d91c-47d4-b63c-cce25c56bdaf</guid><dc:creator>Amadeus</dc:creator><description>&lt;p&gt;I can try that, but I am able to send unacknowledged messages MUCH faster, so I really don&amp;#39;t think that is the problem. Furthermore, shouldn&amp;#39;t access_model_reliable_cancel() cancel ongoing packets if I was sending messages to fast?&lt;/p&gt;
&lt;div style="left:130px;position:absolute;top:34px;" id="gtx-trans"&gt;
&lt;div class="gtx-trans-icon"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Access_model_reliable_publish and acknowledge, retries</title><link>https://devzone.nordicsemi.com/thread/225189?ContentTypeID=1</link><pubDate>Thu, 12 Dec 2019 14:20:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32d30d78-521d-4a71-9f27-45a66b9b0943</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Just to be sure that you don&amp;#39;t send messages too fast you should wait for the&amp;nbsp;&lt;span&gt;NRF_MESH_EVT_TX_COMPLETE&amp;nbsp;before sending a new&amp;nbsp;message.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote user="Amadeus"]I have not changed the retry interval of reliable publish, where can I do that?[/quote]
&lt;p&gt;You can change it using the define&amp;nbsp;ACCESS_RELIABLE_RETRY_DELAY found in the access_reliable header file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Access_model_reliable_publish and acknowledge, retries</title><link>https://devzone.nordicsemi.com/thread/224859?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2019 09:01:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5c41f9b-74d4-4379-a463-0c9b2d55f05a</guid><dc:creator>Amadeus</dc:creator><description>&lt;p&gt;This happen when I regularly send acknowledged messages more often than around every 4 seconds.&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/5811.Nordic.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Above is a snippet from RTT viewer.&amp;nbsp;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 (&lt;span&gt;NRF_ERROR_INVALID_STATE)&lt;/span&gt; instead of 0, but continues till ack is received.&lt;/p&gt;
&lt;p&gt;Edit: To clarify, I am not calling access_model_reliable_publish multiple times above, it is called automatically by the API.&lt;br /&gt;&lt;br /&gt;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?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Access_model_reliable_publish and acknowledge, retries</title><link>https://devzone.nordicsemi.com/thread/224780?ContentTypeID=1</link><pubDate>Tue, 10 Dec 2019 15:23:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd370fed-ac35-45fd-a701-78cccb61c684</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sorry for the late response on this,&lt;/p&gt;
&lt;p&gt;How often does this happen? How big is you packets and how fast do you send them?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;access_model_publish() returning&amp;nbsp;NRF_ERROR_INVALID_STATE means&amp;nbsp;that there is already a segmented packet to this destination in progress. Wait for it to finish before sending new segmented packets.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>