<?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>CoAP Observer loses connection after RRC idle</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/120408/coap-observer-loses-connection-after-rrc-idle</link><description>I have a nRF9151 currently set up to observe a CoAP resource on my server. The initial GET request works, and if I respond with new updates from the server (within a few seconds) everything works fine. If I wait more than ~10 seconds however, the device</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 04 Apr 2025 15:46:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/120408/coap-observer-loses-connection-after-rrc-idle" /><item><title>RE: CoAP Observer loses connection after RRC idle</title><link>https://devzone.nordicsemi.com/thread/530663?ContentTypeID=1</link><pubDate>Fri, 04 Apr 2025 15:46:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86e6e90a-fd7d-4bc0-b071-b581ac4c2ecc</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;The NAT timeout isn&amp;#39;t an issue of CoAP. Using UDP will not prevent to send the empty messages.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know, why you need the server to initiate sending data to the device, in other cases it&amp;#39;s OK to do this as response, when the device initiates the communication.&lt;/p&gt;
&lt;p&gt;Anyway, if you really need the server to initiate the communication, then eDRX and a VPN to your M(V)NO will be your friend (if both is supported). &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP Observer loses connection after RRC idle</title><link>https://devzone.nordicsemi.com/thread/530661?ContentTypeID=1</link><pubDate>Fri, 04 Apr 2025 15:37:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9592bb78-251f-4c17-9d26-aefdbde56b4a</guid><dc:creator>siliconwitch</dc:creator><description>&lt;p&gt;Indeed I discovered two issues: The first one was on my server side code. I had to enable a keep-alive option in order to prevent the CoAP library from terminating&amp;nbsp;the socket.&lt;/p&gt;
&lt;p&gt;After that, the timeout would then happen at ~120 seconds. I suppose that&amp;#39;s the MNO NAT timeout.&lt;/p&gt;
&lt;p&gt;I had some success sending empty UDP packets periodically to keep the socket open, but over many devices the cost of doing this would be quite expensive.&lt;/p&gt;
&lt;p&gt;So, rather than using CoAP observer, we&amp;#39;ve now just opened a UDP listener&amp;nbsp;on the device side so that the server can send messages directly. This actually turned out to be a cleaner solution on both sides.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP Observer loses connection after RRC idle</title><link>https://devzone.nordicsemi.com/thread/530655?ContentTypeID=1</link><pubDate>Fri, 04 Apr 2025 14:57:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0dd34b91-d6c2-4fbd-9c59-13c4642a55b0</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;In many case it will be either a NAT (Network Address Translator) at your cloud server or at the MNO public internet break out.&lt;/p&gt;
&lt;p&gt;What is the interval your server sends notifications to the device? 10s will be very fast for the idea with the NAT, but may be it&amp;#39;s rather 60s than 10s. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP Observer loses connection after RRC idle</title><link>https://devzone.nordicsemi.com/thread/530256?ContentTypeID=1</link><pubDate>Wed, 02 Apr 2025 13:07:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8b2d2f9-03ae-43f9-8138-54a4d7de8594</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;Are you able to share more information about your setup? There isn&amp;#39;t much information from the provided logs. Does your device actually loose network connection, or does the device stop responding to logging as well?&lt;/p&gt;
&lt;p&gt;Are you using your application or a sample from us?&amp;nbsp; Will need some more information in order to understand what is going on with your device. Could you provide a modem trace as well?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>