<?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>nrf9160 modem stops reconnecting</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63200/nrf9160-modem-stops-reconnecting</link><description>Hello, 
 I have configured MQTT over TLS to connect to our broker. Everything works great except that the modem stops reconnecting to the broker after exactly 22 connect-disconnect cycles for some unknown reason. The modem establishes the connection to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 17 Aug 2020 13:41:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63200/nrf9160-modem-stops-reconnecting" /><item><title>RE: nrf9160 modem stops reconnecting</title><link>https://devzone.nordicsemi.com/thread/264897?ContentTypeID=1</link><pubDate>Mon, 17 Aug 2020 13:41:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4978099d-7ddc-4f74-b9e6-e86bac53c576</guid><dc:creator>ubieda</dc:creator><description>&lt;p&gt;Hakon, thanks for the reply. &lt;br /&gt;&lt;br /&gt;We are very likely to have units deployed by the time this modem update comes, so it would be great if that update fix is&amp;nbsp;upgreadable via FOTA&amp;nbsp;(we are currently at MFW V1.2.0, as mentioned above).&lt;br /&gt;&lt;br /&gt;Luis.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 modem stops reconnecting</title><link>https://devzone.nordicsemi.com/thread/264890?ContentTypeID=1</link><pubDate>Mon, 17 Aug 2020 13:22:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0935629-0082-4fec-afb5-51f8e0adffb1</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;There will be a fix to this in the next modem firmware. I&amp;#39;m not sure when it will be released.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 modem stops reconnecting</title><link>https://devzone.nordicsemi.com/thread/263686?ContentTypeID=1</link><pubDate>Fri, 07 Aug 2020 18:48:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d35e54c-7351-4117-a347-d7e4812cbade</guid><dc:creator>ubieda</dc:creator><description>&lt;p&gt;Guys, I would like to report an exact condition on my end, which is extremely consistent: I&amp;#39;ll explain below:&lt;br /&gt;&lt;br /&gt;Software used:&lt;br /&gt;- NCS V1.3.0&lt;br /&gt;- Modem Firmware V1.2.0&lt;br /&gt;&lt;br /&gt;Issue Description:&lt;br /&gt;- Our application communicates to AWS IoT (MQTT over TLS) periodically to exchange information. A key requirement is that we must support system operation with and without PSM/eDRX.&lt;br /&gt;- Every 15 minutes, a socket is created,&amp;nbsp;connection established, information exchanged and socket &amp;amp; connection closed until next time. After 22 times, the system&amp;nbsp;gets stuck attempting&amp;nbsp;to establish the&amp;nbsp;MQTT connection (see console output below).&lt;br /&gt;- We have more than 5 units running this code and the behavior is consistent across all of them.&lt;br /&gt;- The behavior persists and does not change regardless of setting on each interaction AT+CFUN=1 (at the beginning) &amp;amp; AT+CFUN=0 (at the end), or not enabling/disabling LTE Link at all.&lt;br /&gt;- Our code/variant using PSM does not have this behavior and has performed well so far on all the units in which it is running.&lt;br /&gt;&lt;br /&gt;Here is some console output we got when enabling CONFIG_NET_LOG=y. We reduced the reporting rate from 15-min to 30-secs to replicate the issue faster:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;/* Beginning of Log: Here&amp;#39;s the work item that interact periodically with AWS IoT. After 22 times fails */

[00:11:53.324,768] &amp;lt;dbg&amp;gt; app.cloud_interact_work_fn: cloud_interact_work_fn(): 22
[00:11:53.332,794] &amp;lt;dbg&amp;gt; app.cloud_interact_work_fn: lte_link_manager_enable()
[00:11:53.350,189] &amp;lt;dbg&amp;gt; lte_link_manager.lte_link_manager_enable: Re-enabling lte-link
[00:11:55.258,880] &amp;lt;inf&amp;gt; lte_link_manager: LTE_LC_EVT_NW_REG_STATUS: 2
[00:11:55.972,137] &amp;lt;inf&amp;gt; lte_link_manager: LTE_LC_EVT_NW_REG_STATUS: 1
[00:11:55.979,339] &amp;lt;dbg&amp;gt; app.cloud_interact_work_fn: cloud_manager_open_connection()
[00:11:55.988,037] &amp;lt;dbg&amp;gt; aws_iot.broker_init: IPv4 Address found 13.236.246.246
[00:11:55.996,398] &amp;lt;dbg&amp;gt; net_mqtt_sock_tls.mqtt_client_tls_connect: (0x20021490): Created socket 1
[00:12:00.547,760] &amp;lt;dbg&amp;gt; net_mqtt_sock_tls.mqtt_client_tls_connect: (0x20021490): Connect completed
[00:12:00.557,373] &amp;lt;dbg&amp;gt; net_mqtt_enc.connect_request_encode: (0x20021490): Encoding Protocol Description. Str:MQTT Size:00000004.
[00:12:00.569,671] &amp;lt;dbg&amp;gt; net_mqtt_enc.pack_utf8_str: (0x20021490): &amp;gt;&amp;gt; str_size:00000006 cur:0x20025369, end:0x20025464
[00:12:00.580,963] &amp;lt;dbg&amp;gt; net_mqtt_enc.pack_uint16: (0x20021490): &amp;gt;&amp;gt; val:0004 cur:0x20025369, end:0x20025464
[00:12:00.591,247] &amp;lt;dbg&amp;gt; net_mqtt_enc.connect_request_encode: (0x20021490): Encoding Protocol Version 04.
[00:12:00.601,409] &amp;lt;dbg&amp;gt; net_mqtt_enc.pack_uint8: (0x20021490): &amp;gt;&amp;gt; val:04 cur:0x2002536f, end:0x20025464
[00:12:00.611,480] &amp;lt;dbg&amp;gt; net_mqtt_enc.pack_uint8: (0x20021490): &amp;gt;&amp;gt; val:00 cur:0x20025370, end:0x20025464
[00:12:00.621,520] &amp;lt;dbg&amp;gt; net_mqtt_enc.connect_request_encode: (0x20021490): Encoding Keep Alive Time 04b0.
[00:12:00.631,713] &amp;lt;dbg&amp;gt; net_mqtt_enc.pack_uint16: (0x20021490): &amp;gt;&amp;gt; val:04b0 cur:0x20025371, end:0x20025464
[00:12:00.642,028] &amp;lt;dbg&amp;gt; net_mqtt_enc.connect_request_encode: (0x20021490): Encoding Client Id. Str:CLIENT_DEV1 Size:0000000b.
[00:12:00.654,113] &amp;lt;dbg&amp;gt; net_mqtt_enc.pack_utf8_str: (0x20021490): &amp;gt;&amp;gt; str_size:0000000d cur:0x20025373, end:0x20025464
[00:12:00.665,374] &amp;lt;dbg&amp;gt; net_mqtt_enc.pack_uint16: (0x20021490): &amp;gt;&amp;gt; val:000b cur:0x20025373, end:0x20025464
[00:12:00.675,689] &amp;lt;dbg&amp;gt; net_mqtt_enc.mqtt_encode_fixed_header: (0x20021490): &amp;lt;&amp;lt; msg type:0x10 length:0x00000017
[00:12:00.686,431] &amp;lt;dbg&amp;gt; net_mqtt_enc.packet_length_encode: (0x20021490): &amp;gt;&amp;gt; length:0x00000017 cur:0x00000000, end:0x00000000
[00:12:00.698,394] &amp;lt;dbg&amp;gt; net_mqtt_enc.mqtt_encode_fixed_header: (0x20021490): Fixed header length = 02
[00:12:00.708,251] &amp;lt;dbg&amp;gt; net_mqtt_enc.pack_uint8: (0x20021490): &amp;gt;&amp;gt; val:10 cur:0x20025367, end:0x20025464
[00:12:00.718,292] &amp;lt;dbg&amp;gt; net_mqtt_enc.packet_length_encode: (0x20021490): &amp;gt;&amp;gt; length:0x00000017 cur:0x20025368, end:0x20025464

/* Here is where it gets stuck. The reboot is issued by WDT after 1-min blocked here */

H*** Booting Zephyr OS build v2.3.0-rc1-ncs1  ***
Flash regions           Domain          Permissions
00 00 0x00000 0x08000   Secure          rwxl
01 31 0x08000 0x100000  Non-Secure      rwxl

Non-secure callable region 0 placed in flash region 0 with size 32.

SRAM region             Domain          Permissions
00 07 0x00000 0x10000   Secure          rwxl
08 31 0x10000 0x40000   Non-Secure      rwxl

Peripheral              Domain          Status
00 NRF_P0               Non-Secure      OK
01 NRF_CLOCK            Non-Secure      OK
02 NRF_RTC0             Non-Secure      OK
03 NRF_RTC1             Non-Secure      OK
04 NRF_NVMC             Non-Secure      OK
05 NRF_UARTE1           Non-Secure      OK
06 NRF_UARTE2           Secure          SKIP
07 NRF_TWIM2            Non-Secure      OK
08 NRF_SPIM3            Non-Secure      OK
09 NRF_TIMER0           Non-Secure      OK
10 NRF_TIMER1           Non-Secure      OK
11 NRF_TIMER2           Non-Secure      OK
12 NRF_SAADC            Non-Secure      OK
13 NRF_PWM0             Non-Secure      OK
14 NRF_PWM1             Non-Secure      OK
15 NRF_PWM2             Non-Secure      OK
16 NRF_PWM3             Non-Secure      OK
17 NRF_WDT              Non-Secure      OK
18 NRF_IPC              Non-Secure      OK
19 NRF_VMC              Non-Secure      OK
20 NRF_FPU              Non-Secure      OK
21 NRF_EGU1             Non-Secure      OK
22 NRF_EGU2             Non-Secure      OK
23 NRF_DPPIC            Non-Secure      OK
24 NRF_GPIOTE1          Non-Secure      OK
25 NRF_REGULATORS       Non-Secure      OK

SPM: NS image at 0xc000
SPM: NS MSP at 0x2002b028
SPM: NS reset vector at 0x17b0d
SPM: prepare to jump to Non-Secure image.
/* End of log */&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;We are really looking forward to the outcome of this issue, since it is an important requirement in our application.&lt;br /&gt;&lt;br /&gt;Thanks in advance,&amp;nbsp;&lt;br /&gt;Luis.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 modem stops reconnecting</title><link>https://devzone.nordicsemi.com/thread/260134?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2020 12:13:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55b2904e-6a0e-48ce-aea2-5960b25f36c0</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Can you try using the latest version of bsdlib? Since you are using modem firmware 1.2.0 you should also use the latest bsdlib.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 modem stops reconnecting</title><link>https://devzone.nordicsemi.com/thread/258039?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 09:45:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6724bf03-358a-42c3-b571-1797834eab0b</guid><dc:creator>Vlad T</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;I think that the problem is bsdlib/modem related. The bug reproduces with the https_client example, there is no MQTT related stuff in the project. Please see my reply above.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vlad&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 modem stops reconnecting</title><link>https://devzone.nordicsemi.com/thread/258033?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 09:37:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee5a1397-e01d-4de7-870c-ded8a70e9cc7</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;have you checked that it isn&amp;#39;t the broker that&amp;#39;s dropping the connection after reconnecting a number of times? Do you get any error codes? Can you provide a more detailed log output with these settings enabled?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_NET_LOG=y
CONFIG_MQTT_LOG_LEVEL_DBG=y&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 modem stops reconnecting</title><link>https://devzone.nordicsemi.com/thread/258008?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 08:51:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1bdd2eee-10a0-45e6-8bb1-0c338f6f4c34</guid><dc:creator>Vlad T</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It seems that the bug is triggered by setsockopt(fd, SOL_TLS, TLS_HOSTNAME, ...., ...) line.&lt;/p&gt;
&lt;p&gt;I have tested the &amp;quot;https_client&amp;quot; sample also. It can connect and disconnect forever until I set the TLS_HOSTNAME socket option. Then it starts to hang after 22 cycles.&lt;/p&gt;
&lt;p&gt;Please see the attached project.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vlad&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5287.https_5F00_client.zip"&gt;devzone.nordicsemi.com/.../5287.https_5F00_client.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>