<?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>Thingy91 requires reset running mqtt_simple</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68230/thingy91-requires-reset-running-mqtt_simple</link><description>Hi, We are using the Thingy91, which is running the mqtt_simple (nRF SDK 1.4 and modem firmware 1.2.2) example, to push data direct to our AWS instance. Everything is running smoothly aside from the following issue: I ran a power consumption test over</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 Nov 2020 16:28:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68230/thingy91-requires-reset-running-mqtt_simple" /><item><title>RE: Thingy91 requires reset running mqtt_simple</title><link>https://devzone.nordicsemi.com/thread/281648?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2020 16:28:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:257d77fb-be19-4c46-8fcb-ad46ae0d955c</guid><dc:creator>cachro2</dc:creator><description>&lt;p&gt;Hi Didrik,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thanks for the update! I diff&amp;#39;d my current application source, which I am testing, against your code&amp;nbsp;and did not notice much of a difference. I will try running a test with the firmware you provided as well. Currently, however, I am on day 11 of my test and experienced 11 MQTT connection resets so far. The&amp;nbsp;resets do not occur at any specific time interval and sometimes are only a few hours apart. However, the code I provided above cycles the connection just fine.&lt;/p&gt;
&lt;p&gt;Please let me know what you find.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91 requires reset running mqtt_simple</title><link>https://devzone.nordicsemi.com/thread/281497?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2020 10:26:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6adc93ad-96bc-47eb-86df-cc70218cfc8b</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi, and sorry for the very late answer.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s good to hear that you have found a workaround.&lt;/p&gt;
&lt;p&gt;I have also set up a test myself, but it has not gotten disconnected yet.&lt;/p&gt;
&lt;p&gt;Here is the application I am using:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8360.mqtt_5F00_simple_5F00_repeating.zip"&gt;devzone.nordicsemi.com/.../8360.mqtt_5F00_simple_5F00_repeating.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It will also enable modem tracing automatically, so you should not have to do anything else than just starting capturing the trace in the Trace Collector application.&lt;/p&gt;
&lt;p&gt;Another possible reason for why you do not get a trace is that you have opened the wrong port. Is the &amp;quot;Auto device/port filter&amp;quot; enabled?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91 requires reset running mqtt_simple</title><link>https://devzone.nordicsemi.com/thread/280689?ContentTypeID=1</link><pubDate>Wed, 18 Nov 2020 17:22:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3bb3ecb8-0cf3-4e58-ab34-3d0b3bd6c659</guid><dc:creator>cachro2</dc:creator><description>&lt;p&gt;Still unable to take a modem trace to pinpoint the exact cause of disconnect.. the modem trace instructions do not work for the DK and software package versions specified above.&amp;nbsp;Would&amp;nbsp;still be&amp;nbsp;interested in resolving this issue. Based on the time of the disconnect&amp;#39;s occurrence, the issue&amp;nbsp;might&amp;nbsp;have something to do with certificates expiring or some timeout.&lt;/p&gt;
&lt;p&gt;Nevertheless, for those interested, I found a simple workaround to&amp;nbsp;cycle the&amp;nbsp;MQTT connection upon disconnect. This way we don&amp;#39;t lose critical information on the device with a hard reset.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;void main(void)
{
	int err;

	printk(&amp;quot;The MQTT simple sample started\n&amp;quot;);

#if defined(CONFIG_MQTT_LIB_TLS)
	err = certificates_provision();
	if (err != 0) {
		printk(&amp;quot;Failed to provision certificates\n&amp;quot;);
		return;
	}
#endif /* defined(CONFIG_MQTT_LIB_TLS) */

        /* reboot MQTT modem when disconnected */
        while(1) {

                modem_configure();

                err = client_init(&amp;amp;client);
                if (err != 0) {
                        printk(&amp;quot;ERROR: client_init %d\n&amp;quot;, err);
                        break;
                }

                err = mqtt_connect(&amp;amp;client);
                if (err != 0) {
                        printk(&amp;quot;ERROR: mqtt_connect %d\n&amp;quot;, err);
                        break;
                }

                err = fds_init(&amp;amp;client);
                if (err != 0) {
                        printk(&amp;quot;ERROR: fds_init %d\n&amp;quot;, err);
                        break;
                }

                while (1) {
                        err = poll(&amp;amp;fds, 1, mqtt_keepalive_time_left(&amp;amp;client));
                        if (err &amp;lt; 0) {
                                printk(&amp;quot;ERROR: poll %d\n&amp;quot;, errno);
                                break;
                        }

                        err = mqtt_live(&amp;amp;client);
                        if ((err != 0) &amp;amp;&amp;amp; (err != -EAGAIN)) {
                                printk(&amp;quot;ERROR: mqtt_live %d\n&amp;quot;, err);
                                break;
                        }

                        if ((fds.revents &amp;amp; POLLIN) == POLLIN) {
                                err = mqtt_input(&amp;amp;client);
                                if (err != 0) {
                                        printk(&amp;quot;ERROR: mqtt_input %d\n&amp;quot;, err);
                                        break;
                                }
                        }

                        if ((fds.revents &amp;amp; POLLERR) == POLLERR) {
                                printk(&amp;quot;POLLERR\n&amp;quot;);
                                break;
                        }

                        if ((fds.revents &amp;amp; POLLNVAL) == POLLNVAL) {
                                printk(&amp;quot;POLLNVAL\n&amp;quot;);
                                break;
                        }
                }
                
                printk(&amp;quot;Disconnecting MQTT client...\n&amp;quot;);
                
                err = mqtt_disconnect(&amp;amp;client);
                if (err) {
                        printk(&amp;quot;Could not disconnect MQTT client. Error: %d\n&amp;quot;, err);
                }
                
                printk(&amp;quot;Aborting MQTT client...\n&amp;quot;);
                
                mqtt_abort(&amp;amp;client);
                if (err) {
                        printk(&amp;quot;Could not abort MQTT client. Error: %d\n&amp;quot;, err);
                }

                nrf_delay_ms(120000);
        }

        printk(&amp;quot;Resetting device...\n&amp;quot;);

        NVIC_SystemReset();
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I added a 120 second delay which was tested to be a sufficient amount of time for our AWS instance to boot back up after an accidental reboot. I also replaced the &amp;#39;returns&amp;#39; with &amp;#39;breaks&amp;#39; (line 23, 29, 35) because otherwise the application hung up. Unfortunately, in those scenarios, a hard reset is required.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;A final note: I took the device for a 50 mile drive yesterday and was very impressed by its performance. Kudos to the Nordic team for a solid solution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91 requires reset running mqtt_simple</title><link>https://devzone.nordicsemi.com/thread/280186?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 16:35:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6591db69-2f9c-45ec-b7d1-69fbd09d5ef4</guid><dc:creator>cachro2</dc:creator><description>&lt;p&gt;I am testing the DK at the moment.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;First flipped SW5 to program the nRF52 with:&amp;nbsp;&lt;strong&gt;&lt;em&gt;nrfjprog --program nRF9160_DK_board_controller_FW.hex --sectorerase -f nrf52 -r --verify&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;Then flipped SW5 back to program the DK.&lt;/p&gt;
&lt;p&gt;Since I could not find proj.conf in Segger, I modified the proj.conf directly within the folder C:\ncs\nrf\samples\nrf9160\mqtt_simple and added&amp;nbsp;&lt;span&gt;CONFIG_BSD_LIBRARY_TRACE_ENABLED=y as shown in the instructions.&lt;br /&gt;&lt;br /&gt;I then closed the Segger project and re-opened/re-configured all MQTT settings.&amp;nbsp;As always, I&amp;nbsp;use the board name nrf9160dk_nrf9160ns to open the mqtt_simple project.&lt;br /&gt;&lt;br /&gt;After programming, I opened LTE Link Monitor and ran&amp;nbsp;AT%XMODEMTRACE=1,2 which responded with OK.&lt;br /&gt;&lt;br /&gt;I then opened Trace Collector and it remains at 0 bytes without incrementing.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91 requires reset running mqtt_simple</title><link>https://devzone.nordicsemi.com/thread/280181?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 16:21:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b1ad178-39c6-4c8f-9da3-cdcebf7ddfe5</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Yes, the instructions should work for all the modem firmware versions.&lt;/p&gt;
&lt;p&gt;Are you using the Thingy or the DK?&lt;/p&gt;
&lt;p&gt;If you are using the DK, the board name should be nrf9160dk_nrf9160ns (when building an application that will run on the nRF9160 and not the nRF52840 board controller).&lt;/p&gt;
&lt;p&gt;For the Thingy, you should use thingy91_nrf9160ns. Also, if you are using the Thingy, you must run the connectivity_bridge application on the nRF52840, otherwise you will not be able to get the modem trace from the Thingy.&lt;/p&gt;
&lt;p&gt;Did you remember to add CONFIG_BSD_LIBRARY_TRACE_ENABLED=y to the prj.conf? If you are using SES, you must re-open or re-configure the project for changes to prj.conf to take effect.&lt;/p&gt;
&lt;p&gt;Does it help to send AT%XMODEMTRACE=1,2 to the modem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91 requires reset running mqtt_simple</title><link>https://devzone.nordicsemi.com/thread/280177?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 16:01:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3daec8f8-adec-417f-847c-019333c12790</guid><dc:creator>cachro2</dc:creator><description>&lt;p&gt;Thanks Didrik, I will generate the logs and the modem trace&amp;nbsp;shortly.&lt;br /&gt;&lt;br /&gt;Have you confirmed the modem trace instructions you sent work for modem v1.2.2? The trace collector&amp;nbsp;file does not increment in size after following the instructions. I am testing with the DK. Is the board name when you open the project supposed to be nrf9160dk_nrf9160ns?&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2020-11-16T16:01:35.544Z INFO Application data folder: C:\Users\KOPTER\AppData\Roaming\nrfconnect\pc-nrfconnect-tracecollector&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2020-11-16T16:01:35.615Z DEBUG App pc-nrfconnect-tracecollector v1.0.5 official&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2020-11-16T16:01:35.615Z DEBUG App path: C:\Users\KOPTER\.nrfconnect-apps\node_modules\pc-nrfconnect-tracecollector&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2020-11-16T16:01:35.616Z DEBUG nRFConnect 3.6.0 is supported by the app (^3.0.0)&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2020-11-16T16:01:35.616Z DEBUG nRFConnect path: C:\Users\KOPTER\AppData\Local\Programs\nrfconnect\resources\app.asar&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2020-11-16T16:01:35.616Z DEBUG HomeDir: C:\Users\KOPTER&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2020-11-16T16:01:35.616Z DEBUG TmpDir: C:\Users\KOPTER\AppData\Local\Temp&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2020-11-16T16:01:36.552Z VERBOSE Could not fetch serial number for serial port at COM1&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2020-11-16T16:01:36.552Z VERBOSE Could not fetch serial number for serial port at COM2&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2020-11-16T16:01:39.179Z INFO Device opened&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2020-11-16T16:01:41.006Z INFO Tracefile created: C:\Users\KOPTER\AppData\Roaming\nrfconnect\pc-nrfconnect-tracecollector\trace-2020-11-16T16-01-41.005Z.bin&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91 requires reset running mqtt_simple</title><link>https://devzone.nordicsemi.com/thread/280163?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 15:12:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f826391-6b15-4c8d-accc-91b3073095e5</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Yes, that error certainly explains why the device stops publishing.&lt;/p&gt;
&lt;p&gt;The mqtt_simple sample will not try to re-connect if it looses connection, so it will not be able to (or even try) to send or receive anything after it gets disconnected.&lt;/p&gt;
&lt;p&gt;The question then becomes why you get disconnected. Error code 57 is ENOTCONN, which means that you lost the TLS/TCP connection to the MQTT broker.&lt;/p&gt;
&lt;p&gt;The connection could be terminated by both the broker and the client, but I can&amp;#39;t tell which or why from the log.&lt;/p&gt;
&lt;p&gt;Do you have any logs from the broker?&lt;/p&gt;
&lt;p&gt;A modem trace will also let us see the IP traffic between the client and the broker. That will at least tell us who terminated the connection. It might also help us figuring out why the connection is closed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91 requires reset running mqtt_simple</title><link>https://devzone.nordicsemi.com/thread/280142?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 14:35:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d6117ff-fc3f-4b2a-a9f5-4a2dabc02512</guid><dc:creator>cachro2</dc:creator><description>&lt;p&gt;UPDATE:&lt;/p&gt;
&lt;p&gt;Another over night test with LTE Link Monitor running yielded a MQTT client disconnected error.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/4150.disconnect.png" /&gt;&lt;/p&gt;
&lt;p&gt;Assuming this is the issue, what is the best way to&amp;nbsp;counteract disconnects automatically?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91 requires reset running mqtt_simple</title><link>https://devzone.nordicsemi.com/thread/280027?ContentTypeID=1</link><pubDate>Mon, 16 Nov 2020 01:49:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3dfa1e69-2a25-4742-a913-62eda017aead</guid><dc:creator>cachro2</dc:creator><description>&lt;p&gt;Hi Didrik,&lt;br /&gt;&lt;br /&gt;I have conducted a number of tests over the past few days to confirm what I am seeing. I&amp;#39;ve confirmed&amp;nbsp;that it is an issue that occurs with the default mqtt_simple firmware (nRF Connect Toolchain Version v1.4.0) provided in the SDK.&amp;nbsp;I have removed all firmware modifications and still see the issue.&lt;br /&gt;&lt;br /&gt;I have tested both the Thingy91 and the nRF9160 DK which yielded the same results.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My setup is as follows.&lt;/p&gt;
&lt;p&gt;Project settings for Thingy91, as an example:&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/project-settings.png" /&gt;&lt;/p&gt;
&lt;p&gt;I configured publish/subscribe topic,mqtt client id and broker to point at our AWS instance.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2018.configuration.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The AWS instance is running&amp;nbsp;Mosquitto MQTT broker. I launched a mosquitto_sub client which is subscribed to the unit&amp;#39;s topic and prints the messages that it receives to a log file.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;mosquitto_sub -h localhost -t &amp;quot;pub/test&amp;quot; -v | while IFS= read -r line; do printf &amp;#39;%s %s\n&amp;#39; &amp;quot;$(date)&amp;quot; &amp;quot;$line&amp;quot;; done &amp;gt;&amp;gt; pub_mqtt.log
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Additionally, mosquitto_pub is set to publish a single message to the unit every hour.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#!/bin/bash
exec 3&amp;gt;&amp;amp;1 4&amp;gt;&amp;amp;2
trap &amp;#39;exec 2&amp;gt;&amp;amp;4 1&amp;gt;&amp;amp;3&amp;#39; 0 1 2 3
exec 1&amp;gt;log_mqtt.out 2&amp;gt;&amp;amp;1

while true;
do
        NOW=$(date +&amp;quot;%m-%d-%Y %H:%M:%S&amp;quot;)
        echo &amp;quot;Current date: $NOW&amp;quot;
        mosquitto_pub -h localhost -t &amp;quot;sub/test&amp;quot; -m &amp;quot;abc&amp;quot;
        sleep 3600
done
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In my most recent test, the pub_mqtt.log shows that the unit stops posting after 23 hours.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;Sat Nov 14 22:36:43 UTC 2020 pub/test abc
Sat Nov 14 23:36:44 UTC 2020 pub/test abc
Sun Nov 15 00:36:44 UTC 2020 pub/test abc
Sun Nov 15 01:36:44 UTC 2020 pub/test abc
Sun Nov 15 02:36:43 UTC 2020 pub/test abc
Sun Nov 15 03:36:44 UTC 2020 pub/test abc
Sun Nov 15 04:36:43 UTC 2020 pub/test abc
Sun Nov 15 05:36:45 UTC 2020 pub/test abc
Sun Nov 15 06:36:43 UTC 2020 pub/test abc
Sun Nov 15 07:36:44 UTC 2020 pub/test abc
Sun Nov 15 08:36:43 UTC 2020 pub/test abc
Sun Nov 15 09:36:44 UTC 2020 pub/test abc
Sun Nov 15 10:36:43 UTC 2020 pub/test abc
Sun Nov 15 11:36:44 UTC 2020 pub/test abc
Sun Nov 15 12:36:43 UTC 2020 pub/test abc
Sun Nov 15 13:36:44 UTC 2020 pub/test abc
Sun Nov 15 14:36:43 UTC 2020 pub/test abc
Sun Nov 15 15:36:44 UTC 2020 pub/test abc
Sun Nov 15 16:36:43 UTC 2020 pub/test abc
Sun Nov 15 17:36:44 UTC 2020 pub/test abc
Sun Nov 15 18:36:46 UTC 2020 pub/test abc
Sun Nov 15 19:36:45 UTC 2020 pub/test abc
Sun Nov 15 20:36:45 UTC 2020 pub/test abc
Sun Nov 15 21:36:45 UTC 2020 pub/test abc&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;All of my other tests looked very similar. When the unit froze, I attempted to manually publish a single message in the terminal via&amp;nbsp;mosquitto_pub with no response. However, after I switched the Thingy91 on/off it resumed posting.&lt;/p&gt;
&lt;p&gt;So the setup above is fairly simple&amp;nbsp;and&amp;nbsp;easy to recreate.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;strong&gt;Do you have any logs you can share? Can you produce some?&lt;/strong&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;strong&gt;Could you take a modem trace, so we can see what happens on the modem side?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I have not yet taken a modem trace but will do so if need be. For the most part, everything is set to default as far as testing goes.&amp;nbsp;I am connected to the Thingy91&amp;nbsp;via an external debugger (nrf9160DK) which does not allow me to run LTE Link Monitor to monitor the status of the Thingy. I will therefore monitor the status of the nrf9160DK running the firmware as opposed to the Thingy overnight.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;strong&gt;Is all the communication going from the device to the cloud? Or do you send data both ways?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Default mqtt_simple firmware which echos message sent.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;strong&gt;What QoS level are you using?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The default which is QoS 0.&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;strong&gt;What SIM card are you using, and what network are you connected to?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;iBasis SIM cards that came with the Thingy91 and DK. The unit currently is connected to&amp;nbsp;Verizon Wireless&amp;nbsp;but also will connect to AT&amp;amp;T Mobility.&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;strong&gt;Are you using eDRX and/or PSM? Are you doing anything else to save power?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Whatever the default settings are in mqtt_simple firmware.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;strong&gt;How is your logic for sending the data? Could you share some code of the modifications you have done to the sample?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;No changes, logic for sending/receiving data listed above.&lt;/p&gt;
&lt;p&gt;UPDATE:&lt;/p&gt;
&lt;p&gt;Running mqtt_simple on the nRF9160 DK with LTE Link Monitor running in the background yielded this error:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2020-11-16T06:03:59.412Z DEBUG modem &amp;lt;&amp;lt; Received: abc&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2020-11-16T06:03:59.415Z DEBUG modem &amp;lt;&amp;lt; Publishing: abc&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2020-11-16T06:03:59.418Z DEBUG modem &amp;lt;&amp;lt; to topic: pubs/ehubo_1 len: 12&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2020-11-16T06:03:59.466Z DEBUG modem &amp;lt;&amp;lt; [mqtt_evt_handler:238] MQTT client disconnected -57&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2020-11-16T06:03:59.468Z DEBUG modem &amp;lt;&amp;lt; ERROR: mqtt_live -57&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2020-11-16T06:03:59.469Z DEBUG modem &amp;lt;&amp;lt; Disconnecting MQTT client...&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2020-11-16T06:03:59.470Z DEBUG modem &amp;lt;&amp;lt; Could not disconnect MQTT client. Error: -57&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;2020-11-16T06:04:06.106Z DEBUG modem &amp;lt;&amp;lt; +CSCON: 0&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Could this be the problem? The unit is still connected to LTE and the AT commands returned good results as seen in the logs.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2020_2D00_11_2D00_16T04_5F00_58_5F00_17.025Z_2D00_log.txt"&gt;devzone.nordicsemi.com/.../2020_2D00_11_2D00_16T04_5F00_58_5F00_17.025Z_2D00_log.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/8424.error.png" /&gt;&lt;/p&gt;
&lt;p&gt;I am using modem firmware&amp;nbsp;mfwnrf9160122.zip for the DK.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for your support.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Robert&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91 requires reset running mqtt_simple</title><link>https://devzone.nordicsemi.com/thread/279526?ContentTypeID=1</link><pubDate>Wed, 11 Nov 2020 14:36:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee43e708-894a-4da3-8d1f-bd0c864c07ac</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Perhaps, we need to reset the radio&amp;nbsp;using a&amp;nbsp;specific AT command?[/quote]
&lt;p&gt;&amp;nbsp;No, that is not necessary.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]The mqtt_simple firmware does not interact with the ADP5360 PMIC via I2C like the asset_tracker firmware does. Could the PMIC be causing the issue?[/quote]
&lt;p&gt;&amp;nbsp;I don&amp;#39;t think so. If you look in the board files, you will see that it initializes the PMIC. So as long as the application is compiled for the Thingy:91, that should not be a problem.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]I ran a power consumption test over the weekend which published data to our instance every 10 seconds and noticed that approx. every 22 hours the Thingy91 stopped publishing&amp;nbsp;data to our instance. After a power cycle (on/off&amp;nbsp;switch) it resumed posting. Do you know why this could be?[/quote]
&lt;p&gt;&amp;nbsp;Not without more information.&lt;/p&gt;
&lt;p&gt;Do you have any logs you can share? Can you produce some?&lt;/p&gt;
&lt;p&gt;Could you take a &lt;a href="https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/getting-started-cellular/posts/how-to-get-modem-trace-using-trace-collector-in-nrf-connect"&gt;modem trace&lt;/a&gt;, so we can see what happens on the modem side?&lt;/p&gt;
&lt;p&gt;As you are using a Thingy:91, you must make sure that you are running the connectivity_bridge application on the nRF52840. Otherwise you will not be able to get a modem trace from the Thingy.&lt;/p&gt;
&lt;p&gt;Is all the communication going from the device to the cloud? Or do you send data both ways?&lt;/p&gt;
&lt;p&gt;What QoS level are you using?&lt;/p&gt;
&lt;p&gt;What SIM card are you using, and what network are you connected to?&lt;/p&gt;
&lt;p&gt;Are you using eDRX and/or PSM? Are you doing anything else to save power?&lt;/p&gt;
&lt;p&gt;How is your logic for sending the data? Could you share some code of the modifications you have done to the sample?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]One additional question: According to this&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_thingy91%2FUG%2Fthingy91%2Fhw_description%2Fpower_supply.html"&gt;documentation&lt;/a&gt;, the EEPROM onboard the Thingy apparently is critical for correct operation and should not be changed. Can you please elaborate what information is stored there and if&amp;nbsp;this will affect our units running the mqtt_simple firmware in the field?[/quote]
&lt;p&gt;&amp;nbsp;I have asked our developers for more information, but I do not belive that it is the problem. My suspicion is that the data is used by the asset_tracker application and nRF Cloud. But I will come back to you on this when I know for certain.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Didrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>