<?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 MQTT responses time</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/95231/nrf9160-mqtt-responses-time</link><description>Hi, 
 I&amp;#39;m using nRF9160 to send data to AWS via MQTT publish every second. Normally, the nRF9160 responds with &amp;quot;OK&amp;quot; almost instantly when I send the AT command, however, it takes more than 1 second to send &amp;quot;OK&amp;quot; from time to time. I&amp;#39;m wondering how can</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Jan 2023 12:48:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/95231/nrf9160-mqtt-responses-time" /><item><title>RE: nRF9160 MQTT responses time</title><link>https://devzone.nordicsemi.com/thread/403844?ContentTypeID=1</link><pubDate>Mon, 09 Jan 2023 12:48:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0a5c318-47a4-457c-92fe-103cb6905342</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;That would match my suspicion in my first reply.&lt;/p&gt;
&lt;p&gt;Have you tried to monitor the signal strength and other connection parameters to see if there is a correlation?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 MQTT responses time</title><link>https://devzone.nordicsemi.com/thread/403704?ContentTypeID=1</link><pubDate>Mon, 09 Jan 2023 01:01:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c35da88-dd66-4ecb-bedb-f55eb12081ae</guid><dc:creator>yesheng</dc:creator><description>&lt;p&gt;Update:&lt;br /&gt;With more testing, I think this&amp;nbsp;phenomenon is more of a temporal thing. These events tend to happen consecutively. Perhaps signal strength plays a more critical role.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 MQTT responses time</title><link>https://devzone.nordicsemi.com/thread/403505?ContentTypeID=1</link><pubDate>Fri, 06 Jan 2023 02:32:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5a73ef6-4ffd-4162-a7c8-c0cb387ac486</guid><dc:creator>yesheng</dc:creator><description>&lt;p&gt;Hi Didrik,&lt;/p&gt;
&lt;p&gt;The log shows the client_write_msg takes an unusual amount of time to finish. Normally, it takes less than 10 ms to finish writing 1 kB of data.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/4722.Untitled.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve increased the&amp;nbsp;&lt;span&gt;CONFIG_NRF_MODEM_LIB_HEAP_SIZE, and it seems to reduce the frequency. I&amp;#39;ll keep monitoring.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 MQTT responses time</title><link>https://devzone.nordicsemi.com/thread/403235?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2023 16:00:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d70a7e81-cd4e-4cc1-8bd2-f9183331492d</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Did you also try to increase CONFIG_NRF_MODEM_LIB_HEAP_SIZE and CONFIG_NRF_MODEM_LIB_SHMEM_CTRL_SIZE?&lt;/p&gt;
&lt;p&gt;How often or consistent is the gap?&lt;/p&gt;
&lt;p&gt;Could you also enable logging in the MQTT library, and send me the log?&lt;/p&gt;
&lt;p&gt;CONFIG_NET_LOG=y&lt;/p&gt;
&lt;p&gt;CONFIG_MQTT_LOG_LEVEL_DBG=y&lt;/p&gt;
&lt;p&gt;(and, if you haven&amp;#39;t already, enable debug logging in the SLM itself).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 MQTT responses time</title><link>https://devzone.nordicsemi.com/thread/402606?ContentTypeID=1</link><pubDate>Fri, 30 Dec 2022 05:26:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec288cb4-df89-44da-8087-dcef09e9bae6</guid><dc:creator>yesheng</dc:creator><description>&lt;p&gt;Hi Didrik,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using the SLM FW (SDK: 2.0.2), and I&amp;#39;m sending ~1KB/s. I tried to double the size of CONFIG_NRF_MODEM_LIB_SHMEM_TX_SIZE but it doesn&amp;#39;t seem to change anything.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The RTT log shows a gap between Raw send and datamode off pending. that&amp;#39;s the place I saw the modem&amp;#39;s slow responses.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1672381852933v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;for reference, this is the normal situation, only 3 ms delay between raw send and datamode off pending&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1672382263179v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 MQTT responses time</title><link>https://devzone.nordicsemi.com/thread/402532?ContentTypeID=1</link><pubDate>Thu, 29 Dec 2022 12:40:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34743240-5577-4910-83df-b8e5ca881764</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How much data are you sending?&lt;/p&gt;
&lt;p&gt;Depending on your link quality and how much data you are sending, it might be that the modem isn&amp;#39;t always able to send the data fast enough, causing send() to block until the memory buffer becomes ready again.&lt;/p&gt;
&lt;p&gt;One thing you can try to reduce the latency, is to increase the buffers controlled byt eh Kconfig options found in this Kconfig file: nrf/lib/nrf_modem_lib/Kconfig.modemlib&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Didrik&lt;/p&gt;
&lt;p&gt;P.S. Due to holiday vacations, response time might be longer than normal. We apologize for the inconvenience.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>