<?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>Thread device won&amp;#39;t fetch reply before retrying</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89102/thread-device-won-t-fetch-reply-before-retrying</link><description>I found my thread device to have quite a large latency so I analysed the communication and found out that the device is actually timeouting and retrying before listening for a reply. 
 Here is what I see on the border router for a TCP socket open (SYN</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 04 Jul 2022 12:46:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89102/thread-device-won-t-fetch-reply-before-retrying" /><item><title>RE: Thread device won't fetch reply before retrying</title><link>https://devzone.nordicsemi.com/thread/375319?ContentTypeID=1</link><pubDate>Mon, 04 Jul 2022 12:46:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a59d035-3519-4411-8a80-e1f8eaf1db6a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply. I was out of office (vacation) the last week.&lt;/p&gt;
&lt;p&gt;Our Thread team noticed that you got an answer in the github issue, which seemed to solve your problem. I suggest that we close this ticket for now.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread device won't fetch reply before retrying</title><link>https://devzone.nordicsemi.com/thread/373435?ContentTypeID=1</link><pubDate>Tue, 21 Jun 2022 12:04:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c945298c-8d8f-4264-beeb-399954a56d4e</guid><dc:creator>FrancoisG</dc:creator><description>&lt;p&gt;Yes exactly that, the nRF goes to sleep before it receives the ack in the first transmission.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread device won't fetch reply before retrying</title><link>https://devzone.nordicsemi.com/thread/373389?ContentTypeID=1</link><pubDate>Tue, 21 Jun 2022 10:48:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5193a88c-8eab-499f-80b3-57bd9c0b5585</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;So what you are saying is that the nRF goes to sleep before it receives the ack in the first transmission? Or is this the connection to the network, so all this is before you actually enter the sleepy state (as this is a&amp;amp;nbsp;&amp;lt;span&amp;gt;CONFIG_OPENTHREAD_MTD_SED=y)&lt;/p&gt;
&lt;p&gt;I will have to forward this question to our Thread team. I will keep you posted.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread device won't fetch reply before retrying</title><link>https://devzone.nordicsemi.com/thread/373272?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2022 13:50:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:feda31c1-ca0e-44df-b8d3-c4223060f840</guid><dc:creator>FrancoisG</dc:creator><description>&lt;p&gt;I&amp;#39;m also available for a call if you want, maybe this could help get in sync. Today I&amp;#39;m free mostly anything reasonable EST.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread device won't fetch reply before retrying</title><link>https://devzone.nordicsemi.com/thread/373271?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2022 13:47:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e985709-ea28-416b-908a-fa1c8584bd60</guid><dc:creator>FrancoisG</dc:creator><description>&lt;p&gt;When I connect to the MQTT server here&amp;nbsp;&lt;a href="https://github.com/fgervais/project-nrf-thread-switch/blob/b0dcef3b4292b6e716625568dfe844519e6a419f/app/src/main.c#L232"&gt;https://github.com/fgervais/project-nrf-thread-switch/blob/b0dcef3b4292b6e716625568dfe844519e6a419f/app/src/main.c#L232&lt;/a&gt;&amp;nbsp; it will open a tcp socket (SYN/SYN-ACK/ACK).&lt;/p&gt;
&lt;p&gt;This is all then managed by the tcp stack of the nrf sdk.&lt;/p&gt;
&lt;p&gt;You can have a look at the wireshark screenshot here you will see a complete transaction:&amp;nbsp;&lt;a id="" href="https://github.com/openthread/openthread/discussions/7822"&gt;https://github.com/openthread/openthread/discussions/7822&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The problem are the black lines (retries). I am not getting the first [SYN, ACK] before the tcp stack retries sending a new [SYN].&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread device won't fetch reply before retrying</title><link>https://devzone.nordicsemi.com/thread/373250?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2022 13:01:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d998f143-4ae8-405d-8f03-9baec7403c49</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok, I am struggling a bit to understand this issue. Can you point me to where in your application you are sending the SYN message, what ACK you are not getting (if that is the case, or perhaps I misunderstand?) And from where is the retransmit triggered?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread device won't fetch reply before retrying</title><link>https://devzone.nordicsemi.com/thread/373221?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2022 12:10:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd348548-3c73-4af4-8ae6-51f511109612</guid><dc:creator>FrancoisG</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;I wake up only on button press to send the event and at the poll period (236 seconds).&lt;/p&gt;
&lt;p&gt;The acks are received by the tcp/ip stack, this is transparent to my application code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread device won't fetch reply before retrying</title><link>https://devzone.nordicsemi.com/thread/373213?ContentTypeID=1</link><pubDate>Mon, 20 Jun 2022 11:57:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:766eb963-d060-4a1d-815d-d0f73cffeae0</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;So this is a Sleepy End Device (SED). How often do you wake up? Do you go to sleep before receiving your ACKs? Can you try to extend the &amp;quot;awake period&amp;quot; and not go to sleep until you have received the ACKs?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am not sure exactly where to look in your project. Where do you receive the acks?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thread device won't fetch reply before retrying</title><link>https://devzone.nordicsemi.com/thread/373119?ContentTypeID=1</link><pubDate>Sun, 19 Jun 2022 15:53:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fbccea49-294c-4a69-b5bb-117e128fbecb</guid><dc:creator>FrancoisG</dc:creator><description>&lt;p&gt;I made some progress on this and sent a more specific question on the `openthread` side.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m still unsure but it might be the expected behavior. Even though at least in my case it surely is not optimal.&lt;/p&gt;
&lt;p&gt;The question on `openthread` is here if somebody from nordic would have something to add:&amp;nbsp;&amp;nbsp;&lt;a href="https://github.com/openthread/openthread/discussions/7822"&gt;github.com/.../7822&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>