<?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>nRF Cloud coap hangs after a few hours using nRF9160</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110275/nrf-cloud-coap-hangs-after-a-few-hours-using-nrf9160</link><description>Hi 
 I have been looking into this for a while and might just be missing something silly but I would appreciate any help. Our application uses a modified nrf cloud multi service sample and sends regular readings from a few sensors but we noticed after</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Apr 2024 23:37:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110275/nrf-cloud-coap-hangs-after-a-few-hours-using-nrf9160" /><item><title>RE: nRF Cloud coap hangs after a few hours using nRF9160</title><link>https://devzone.nordicsemi.com/thread/480305?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2024 23:37:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ff94977-94bb-42dc-8326-0199a672ce89</guid><dc:creator>SCollins</dc:creator><description>&lt;p&gt;Hi Pete, thanks for your detailed response. We did consider a similar fix but I was unsure if it would cause any other problems with the coap client. Thank you very much for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Cloud coap hangs after a few hours using nRF9160</title><link>https://devzone.nordicsemi.com/thread/480304?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2024 23:29:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a025e899-5b1b-4764-8b5d-bb79911c8d11</guid><dc:creator>Pete Skeggs</dc:creator><description>&lt;p&gt;Hi Sam, this is a known issue in NCS 2.6.0. We are working on a fix.&lt;/p&gt;
&lt;p&gt;The problem occurs for NON transfers when the response from the server never comes. The Zephyr coap_client library&amp;#39;s coap_client_req() function handles NON transfer responses differently than CON transfers (no timeouts, no retries).&lt;/p&gt;
&lt;p&gt;In that situation, in nrf_cloud_coap_transport.c: client_transfer(), this line waits forever:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;code&gt;&lt;span&gt; (void)k_sem_take(&amp;amp;cb_sem, K_FOREVER); /* Wait for coap_client to exhaust retries */&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;As a workaround, change the line above to:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;#define NON_RESP_WAIT_S 3&lt;br /&gt;&lt;br /&gt;/* Wait for coap_client to exhaust retries when reliable transfer selected,&lt;br /&gt;&amp;nbsp;* otherwise wait a finite time because response might never come.&lt;br /&gt;&amp;nbsp;*/&lt;br /&gt; err = k_sem_take(&amp;amp;cb_sem, reliable ? K_FOREVER : K_SECONDS(NON_RESP_WAIT_S));&lt;br /&gt; if (!err) {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LOG_DBG(&amp;quot;Got callback&amp;quot;);&lt;br /&gt; } else {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LOG_DBG(&amp;quot;Got timeout: %d&amp;quot;, err);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; err = 0; /* Ignore, since caller selected non-reliable transfer */&lt;br /&gt; }&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Cloud coap hangs after a few hours using nRF9160</title><link>https://devzone.nordicsemi.com/thread/479245?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 13:38:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fac6e482-cc60-4ecd-980b-ab39741c83e4</guid><dc:creator>helsing</dc:creator><description>&lt;p&gt;Hi Sam, just letting you know we have started looking into this.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br /&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>