<?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>AWS IoT library socket disconnection after one minute</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66063/aws-iot-library-socket-disconnection-after-one-minute</link><description>Been scratching my head over this one for a few hours.. 
 I am testing out the AWS IoT library in version 1.3.1 of nrf Connect SDK. Connect, subscribe, and ping are all working correctly as evidenced by the logs. However, after one minute the socket connection</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 18 Sep 2020 17:28:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66063/aws-iot-library-socket-disconnection-after-one-minute" /><item><title>RE: AWS IoT library socket disconnection after one minute</title><link>https://devzone.nordicsemi.com/thread/270391?ContentTypeID=1</link><pubDate>Fri, 18 Sep 2020 17:28:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f67d8bca-432e-4a1b-aba0-fc7ffcf91584</guid><dc:creator>Dominic</dc:creator><description>&lt;p&gt;Switched from the included iBasis SIM to a Bell SIM and the problem disappears so it appears to be something at the carrier level. Will not be troubleshooting this any further for the time being.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AWS IoT library socket disconnection after one minute</title><link>https://devzone.nordicsemi.com/thread/270388?ContentTypeID=1</link><pubDate>Fri, 18 Sep 2020 16:53:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a9622e8-72f2-4e66-b6e4-31a7ba5d4e46</guid><dc:creator>Dominic</dc:creator><description>&lt;p&gt;Today I updated the modem firmare to v1.2.1 and tried running the aws iot example from the master branch, neither solved the issue. I did notice that the modem was switching between RRC idle and connected modes a few times so I decreased the keep-alive interval to keep the connection open. This also did not fix the issue. It is always 60 seconds between broker connection and disconnection.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v2.3.0-rc1-ncs1-2409-g81abf77417fd  ***
[00:00:00.000,305] &amp;lt;err&amp;gt; board_nonsecure: AT socket could not be opened
[00:00:00.000,579] &amp;lt;err&amp;gt; board_nonsecure: thingy91_magpio_configure failed with error: -14
The AWS IoT sample started, version: v1.0.0
LTE cell changed: Cell ID: 30512907, Tracking area: 11651
PSM parameter update: TAU: -1, Active time: -1
RRC mode: Connected
Network registration status: Connected - roaming
DATE_TIME_OBTAINED_MODEM
AWS_IOT_EVT_CONNECTING
[00:00:05.418,365] &amp;lt;dbg&amp;gt; aws_iot.broker_init: IPv4 Address found 13.58.33.200
[00:00:09.063,110] &amp;lt;dbg&amp;gt; aws_iot.aws_iot_cloud_poll: AWS broker connection request sent.
[00:00:09.405,792] &amp;lt;inf&amp;gt; aws_fota: Created notify_next_topic $aws/things/nrf91-test/jobs/notify-next
[00:00:09.406,188] &amp;lt;inf&amp;gt; aws_fota: Created get_topic $aws/things/nrf91-test/jobs/$next/get/#
[00:00:09.406,494] &amp;lt;inf&amp;gt; aws_fota: previously subscribed to notify-next topic
[00:00:09.406,860] &amp;lt;inf&amp;gt; aws_jobs: Publish topic: $aws/things/nrf91-test/jobs/$next/get
[00:00:09.407,165] &amp;lt;inf&amp;gt; aws_jobs: Publish payload {&amp;quot;clientToken&amp;quot;: &amp;quot;&amp;quot;}
[00:00:09.454,223] &amp;lt;dbg&amp;gt; aws_iot.mqtt_evt_handler: MQTT client connected!
AWS_IOT_EVT_CONNECTED
Persistent session enabled
Publishing: {
                &amp;quot;state&amp;quot;:        {
                                                &amp;quot;reported&amp;quot;:     {
                                                                                        &amp;quot;app_version&amp;quot;:  &amp;quot;v1.0.0&amp;quot;,
                                                                                                                                        &amp;quot;batv&amp;quot;: 4093,
                                                                                                                                                                        &amp;quot;ts&amp;quot;:   1600447218196
                                                                                                                                                                                                        }
                                                                                                                                                                                                                }
                                                                                                                                                                                                                 } to AWS IoT broker
[00:00:09.502,716] &amp;lt;dbg&amp;gt; aws_iot.aws_iot_send: Publishing to topic: $aws/things/nrf91-test/shadow/update
AWS_IOT_EVT_READY
[00:00:09.601,654] &amp;lt;dbg&amp;gt; aws_iot.mqtt_evt_handler: MQTT_EVT_PUBACK: id = 4244 result = 0
[00:00:09.610,595] &amp;lt;inf&amp;gt; aws_fota: Checking for an available job
[00:00:09.611,145] &amp;lt;inf&amp;gt; aws_fota: No queued jobs for this device
[00:01:05.726,165] &amp;lt;dbg&amp;gt; aws_iot.mqtt_evt_handler: MQTT_EVT_DISCONNECT: result = -128
AWS_IOT_EVT_DISCONNECTED
[00:01:06.226,623] &amp;lt;dbg&amp;gt; aws_iot.aws_iot_cloud_poll: Socket error: POLLNVAL
[00:01:06.226,867] &amp;lt;dbg&amp;gt; aws_iot.aws_iot_cloud_poll: The cloud socket was unexpectedly closed.
AWS_IOT_EVT_DISCONNECTED
RRC mode: Idle
RRC mode: Connected
Network registration status: Connected - roaming
RRC mode: Idle&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AWS IoT library socket disconnection after one minute</title><link>https://devzone.nordicsemi.com/thread/270373?ContentTypeID=1</link><pubDate>Fri, 18 Sep 2020 15:13:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0212112-4082-4887-bdb6-9962f5484cee</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]I am testing out the AWS IoT library in version 1.3.1 of nrf Connect SDK[/quote]
&lt;p&gt;&amp;nbsp;There has been a lot of work done to the AWS IoT library since v1.3.x,&amp;nbsp; there is now also a dedicated aws_iot sample for this library on the master branch.&lt;/p&gt;
&lt;p&gt;Please test with the master branch, and see if that solves the issue. I also recommend testing with the latest &lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF9160-DK/Download"&gt;modem firmware&lt;/a&gt;, v.1.2.1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>