<?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>Mesh SAR time-out</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51486/mesh-sar-time-out</link><description>Hello everyone. My project is getting quite complex so I will try to abridge. (Mesh SDK 3.2.0) I am trying to send wifi credentials from an android application (derived from the Android-nRF-Mesh-Library ) to a mesh server node (said node being connected</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Sep 2019 12:00:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51486/mesh-sar-time-out" /><item><title>RE: Mesh SAR time-out</title><link>https://devzone.nordicsemi.com/thread/211797?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2019 12:00:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e0da780-4055-41ba-a641-0974d0b3fea0</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Increasing the retransmit count will help make sure that the receiving node get the message. All mesh devices maintain a message cache, which is used&amp;nbsp;&lt;span&gt;for filtering out packets that the device has already handled. This is to avoid messages being forwarded by the same realys over and over.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Even though increasing the retransmit might help it doesn&amp;#39;t ensure that there never will be packet loss. The best option would be to send a reliable(acknowledgeable) message.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Just to clarify, the client node in this case will act as a relay node? If so, then message should be relayed as it is,&amp;nbsp;&lt;/span&gt;message PDU remains unchanged when message is relayed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh SAR time-out</title><link>https://devzone.nordicsemi.com/thread/209966?ContentTypeID=1</link><pubDate>Tue, 17 Sep 2019 04:16:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3bec660-092a-4be7-9da3-b7bb0694444f</guid><dc:creator>Thierry</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/roshanrajaratnam"&gt;Roshan Rajaratnam&lt;/a&gt;,&lt;br /&gt;Thank you for your enlightening reply. &lt;br /&gt;&lt;br /&gt;So simply creating a message&amp;nbsp;PDU long enough should make it a reliable message with acknowledgement, is that right?&lt;br /&gt;&lt;br /&gt;As I said, the node connected to the android device over proxy is receiving every packets so I would suppose this part works correctly indeed. However, the next node receiving the relayed packets is often missing a few packets.&lt;br /&gt;&lt;br /&gt;So, how is it acknowledged over proxy but then is not over the rest of the mesh network?&lt;br /&gt;&lt;br /&gt;&lt;span class="user-name"&gt;&lt;br /&gt;As&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/mttrinh"&gt;Mttrinh&lt;/a&gt;&amp;nbsp;suggested, I tried increasing the&amp;nbsp;&lt;span&gt;retransmit count on the client; increasing it a bit still produced the error, but increasing it to 6 seemed to have every message pass (with only one relaying node in between). &lt;br /&gt;Wouldn&amp;#39;t increasing the retransmit count on every client put an unnecessary burden on the network? What if, out of bad luck, one packet get lost for all&amp;nbsp;retransmissions, I would still be missing the whole PDU for one lost packet.&lt;br /&gt;&lt;br /&gt;This PDU being important, I think it would be safer to make sure the proxy connection is directly onto the server node.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh SAR time-out</title><link>https://devzone.nordicsemi.com/thread/209603?ContentTypeID=1</link><pubDate>Fri, 13 Sep 2019 11:52:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1041cd5a-5faa-4953-a380-95a1831bb799</guid><dc:creator>Roshan Rajaratnam</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/thierry"&gt;Thierry&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Yes the api was renamed to make it a little bit more sensible as the calling the api SendMeshMessage would be wrong as the library does not send anything but generate a mesh packet, hence the renaming to createMeshPdu. About acknowledged messages, If you check all configuration/generic messages are of of type MeshMessage. So basically you just have to create an acknowledged message and send it and the library will handle it for you. Unfortunately we are missing the retransmission in the Mesh library. Currenlty the library only retransmit segmented messages based on block acks.&lt;/p&gt;
&lt;p&gt;IMHO your message should just work out of the box.&lt;/p&gt;
&lt;p&gt;Hope this answers your question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh SAR time-out</title><link>https://devzone.nordicsemi.com/thread/207868?ContentTypeID=1</link><pubDate>Wed, 04 Sep 2019 09:36:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2789ea04-e2fb-450f-8cdf-b1f987f1657f</guid><dc:creator>Thierry</dc:creator><description>&lt;p&gt;If it had, let&amp;#39;s say, received segment 5 but did not get segment 4... I thought it&amp;nbsp;could fetch it from the message&amp;#39;s source.&lt;br /&gt;&lt;br /&gt;I would like to use an acknowledged message for sure. This is a priority as if the server cannot connect to wifi, the rest of the mesh network is pretty much useless.&lt;br /&gt;&lt;br /&gt;From the &lt;a href="https://github.com/NordicSemiconductor/Android-nRF-Mesh-Library"&gt;Nordic Android-nRF-Mesh-Library&lt;/a&gt;, I was using sendMeshMessage() of MeshManagerApi.java&lt;/p&gt;
&lt;p&gt;Its name changed in a recent version (2.0.3 ?) to :&lt;/p&gt;
&lt;pre&gt;&lt;span&gt;public void &lt;/span&gt;&lt;span&gt;createMeshPdu&lt;/span&gt;(&lt;span&gt;final int &lt;/span&gt;dst&lt;span&gt;, &lt;/span&gt;&lt;span&gt;@NonNull &lt;/span&gt;&lt;span&gt;final &lt;/span&gt;MeshMessage meshMessage)&lt;/pre&gt;
&lt;p&gt;but there doesn&amp;#39;t seem to be any option to send it as an&amp;nbsp;&lt;span&gt;acknowledged message (nor does it have a retransmission count), or am I mistaken?&lt;br /&gt;&lt;br /&gt;Here&amp;#39;s my message, if ever.. :&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;&lt;span&gt;public class &lt;/span&gt;ServerWifiSet &lt;span&gt;extends &lt;/span&gt;GenericMessage {&lt;br /&gt;&lt;br /&gt;    &lt;span&gt;private static final &lt;/span&gt;String &lt;span&gt;TAG &lt;/span&gt;= ServerWifiSet.&lt;span&gt;class&lt;/span&gt;.getSimpleName()&lt;span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;    private static final int &lt;/span&gt;&lt;span&gt;OP_CODE &lt;/span&gt;= ApplicationMessageOpCodes.&lt;span&gt;SERVER_WIFI_SET&lt;/span&gt;&lt;span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;    private final &lt;/span&gt;String &lt;span&gt;mSSID&lt;/span&gt;&lt;span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;    private final &lt;/span&gt;String &lt;span&gt;mPass&lt;/span&gt;&lt;span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;/**&lt;br /&gt;&lt;/span&gt;&lt;span&gt;     * Constructs PublishServerWifi message.&lt;br /&gt;&lt;/span&gt;&lt;span&gt;     *&lt;br /&gt;&lt;/span&gt;&lt;span&gt;     * &lt;/span&gt;&lt;span&gt;@param &lt;/span&gt;&lt;span&gt;appKey                &lt;/span&gt;&lt;span&gt;application key for this message&lt;br /&gt;&lt;/span&gt;&lt;span&gt;     * &lt;/span&gt;&lt;span&gt;@param &lt;/span&gt;&lt;span&gt;SSID                  &lt;/span&gt;&lt;span&gt;SSID&lt;br /&gt;&lt;/span&gt;&lt;span&gt;     * &lt;/span&gt;&lt;span&gt;@param &lt;/span&gt;&lt;span&gt;pass                  &lt;/span&gt;&lt;span&gt;pass&lt;br /&gt;&lt;/span&gt;&lt;span&gt;     * &lt;/span&gt;&lt;span&gt;@throws &lt;/span&gt;&lt;span&gt;IllegalArgumentException if any illegal arguments are passed&lt;br /&gt;&lt;/span&gt;&lt;span&gt;     */&lt;br /&gt;&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;public &lt;/span&gt;&lt;span&gt;PublishServerWifi&lt;/span&gt;(&lt;span&gt;@NonNull &lt;/span&gt;&lt;span&gt;final &lt;/span&gt;ApplicationKey appKey&lt;span&gt;, final &lt;/span&gt;String SSID&lt;span&gt;, final &lt;/span&gt;String pass) {&lt;br /&gt;        &lt;span&gt;super&lt;/span&gt;(appKey)&lt;span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;        if &lt;/span&gt;(SSID.length()&amp;gt;&lt;span&gt;32 &lt;/span&gt;|| pass.length()&amp;gt;&lt;span&gt;64&lt;/span&gt;) &lt;span&gt;throw new &lt;/span&gt;IllegalArgumentException()&lt;span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;        this&lt;/span&gt;.&lt;span&gt;mSSID &lt;/span&gt;= SSID&lt;span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;        this&lt;/span&gt;.&lt;span&gt;mPass &lt;/span&gt;= pass&lt;span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;        &lt;/span&gt;assembleMessageParameters()&lt;span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;    &lt;span&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;public int &lt;/span&gt;&lt;span&gt;getOpCode&lt;/span&gt;() {&lt;br /&gt;        &lt;span&gt;return &lt;/span&gt;&lt;span&gt;OP_CODE&lt;/span&gt;&lt;span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;    &lt;span&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;void &lt;/span&gt;&lt;span&gt;assembleMessageParameters&lt;/span&gt;() {&lt;br /&gt;        &lt;span&gt;mAid &lt;/span&gt;= SecureUtils.&lt;span&gt;calculateK4&lt;/span&gt;(&lt;span&gt;mAppKey&lt;/span&gt;.getKey())&lt;span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;        final &lt;/span&gt;ByteBuffer paramsBuffer&lt;span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;        &lt;/span&gt;paramsBuffer = ByteBuffer.&lt;span&gt;allocate&lt;/span&gt;(&lt;span&gt;this&lt;/span&gt;.&lt;span&gt;mSSID&lt;/span&gt;.length() + &lt;span&gt;1 &lt;/span&gt;+ &lt;span&gt;this&lt;/span&gt;.&lt;span&gt;mPass&lt;/span&gt;.length()).order(ByteOrder.&lt;span&gt;LITTLE_ENDIAN&lt;/span&gt;)&lt;span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;        &lt;/span&gt;paramsBuffer.put(&lt;span&gt;this&lt;/span&gt;.&lt;span&gt;mSSID&lt;/span&gt;.getBytes())&lt;span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;        &lt;/span&gt;paramsBuffer.put(&lt;span&gt;new byte&lt;/span&gt;[&lt;span&gt;1&lt;/span&gt;])&lt;span&gt;; &lt;/span&gt;&lt;span&gt;// 1 empty byte for separation&lt;br /&gt;&lt;/span&gt;&lt;span&gt;        &lt;/span&gt;paramsBuffer.put(&lt;span&gt;this&lt;/span&gt;.&lt;span&gt;mPass&lt;/span&gt;.getBytes())&lt;span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;        &lt;/span&gt;&lt;span&gt;mParameters &lt;/span&gt;= paramsBuffer.array()&lt;span&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;        &lt;/span&gt;&lt;span&gt;//Log.d(&amp;quot;Publish mParameters&amp;quot;, new String(mParameters));&lt;br /&gt;&lt;/span&gt;&lt;span&gt;    &lt;/span&gt;}&lt;br /&gt;}&lt;/pre&gt;
&lt;p&gt;Then, again the&amp;nbsp;device connected over proxy seems to receive everything. So should I make this message an acknowledged one only once i got the message on the client side?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh SAR time-out</title><link>https://devzone.nordicsemi.com/thread/207676?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2019 12:14:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f08f79cd-03a7-41a6-9e3a-d0904d5d8a0a</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;What do you mean by &amp;quot;ask&amp;quot;? A message from the client can be retransmittet a number of times depending on your configuration, to ensure that the server receives this message. An ACK can be sent back from the server if a reliable message was sent. Have you tried increasing the retransmit count on the client?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh SAR time-out</title><link>https://devzone.nordicsemi.com/thread/207604?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2019 09:02:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdffc510-e657-4f4b-b4c5-38bcb2890ef0</guid><dc:creator>Thierry</dc:creator><description>&lt;p&gt;Hi! No worry.&lt;br /&gt;That&amp;#39;s perfectly right. &lt;br /&gt;Im still stuck on this and I would love to know the cause... Shouldn&amp;#39;t the server &amp;quot;ask&amp;quot; for the missing packets?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh SAR time-out</title><link>https://devzone.nordicsemi.com/thread/207600?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2019 08:51:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9acdcb46-3ed5-4ea7-9754-a1d224449980</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt; &lt;br /&gt;Sorry for the delayed response. Have you had any progress on this matter? Seems like there are some packet loss when sending packets to the server. If I understand this correctly, you hit SAR timeouts on the server when packets are retransmitted from the client? &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh SAR time-out</title><link>https://devzone.nordicsemi.com/thread/206966?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2019 03:03:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3904814-95fc-4b1b-b92d-f0a9edee2a9a</guid><dc:creator>Thierry</dc:creator><description>&lt;p&gt;I found it helpful to increase this value in nrf_mesh_config_core.h :&lt;/p&gt;
&lt;pre&gt;#define CORE_TX_QUEUE_BUFFER_SIZE_RELAY 128&lt;/pre&gt;
&lt;p&gt;Now (up to 512), the client doesn&amp;#39;t give me any &amp;quot;no memory&amp;quot; error anymore.&lt;br /&gt;However, with max packet data length being 97bytes (9 segments), I still hit SAR time-outs on the server, &lt;br /&gt;receiving&amp;nbsp;sometimes all 9, but&amp;nbsp;more often seeing only 8 segments or less. &lt;br /&gt;It is not always the same number dropping either. (ie, sometime only the 3rd one drops, sometime it&amp;#39;s another one)&lt;br /&gt;&lt;br /&gt;Reducing size of message to fit in less segments works better... &lt;br /&gt;but this is not optimal as I cannot realistically know my user&amp;#39;s wifi credentials won&amp;#39;t be that long.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>