<?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_publish blocking - stuck at mutex_lock</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89442/nrf9160-mqtt_publish-blocking---stuck-at-mutex_lock</link><description>Hi, This appears to be similar to Case 232209 (from 3 years ago). 
 What: I am looking to have the 9160 act as a producer - sending ANT and GPS records on a regular basis. I am batching the data so that the LTE/MQTT doesnt block the GPS receiver. At each</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 06 Nov 2022 09:09:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89442/nrf9160-mqtt_publish-blocking---stuck-at-mutex_lock" /><item><title>RE: nrf9160: mqtt_publish blocking - stuck at mutex_lock</title><link>https://devzone.nordicsemi.com/thread/394267?ContentTypeID=1</link><pubDate>Sun, 06 Nov 2022 09:09:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0dcab2d-f8b6-48bb-aab0-611121f4770d</guid><dc:creator>Brett</dc:creator><description>&lt;p&gt;Hi Janathan,&lt;br /&gt;&lt;br /&gt;I did not find a solution, yet, but I will need to at some stage.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have worked around this for the moment by using 2 x thingy91&amp;#39;s.&lt;br /&gt;1 for GPS and the other for ANT/UART, not ideal but it works for the PoC I have running.&amp;nbsp; Once I move closer to the final solution, I will need to find a way to buffer and batch process the data - but that wont be until later this year or early next year.&lt;/p&gt;
&lt;p&gt;regards&lt;br /&gt;-brett&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160: mqtt_publish blocking - stuck at mutex_lock</title><link>https://devzone.nordicsemi.com/thread/394130?ContentTypeID=1</link><pubDate>Fri, 04 Nov 2022 11:47:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:283008b7-dd52-45a8-8d33-0c93b519a1f7</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Did you find a solution ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160: mqtt_publish blocking - stuck at mutex_lock</title><link>https://devzone.nordicsemi.com/thread/375667?ContentTypeID=1</link><pubDate>Wed, 06 Jul 2022 07:12:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64f1845b-0ba8-471c-bb53-e3c899e6d610</guid><dc:creator>Brett</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7217.prj.txt"&gt;devzone.nordicsemi.com/.../7217.prj.txt&lt;/a&gt;&lt;br /&gt;This is my prj.conf file if it helps&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160: mqtt_publish blocking - stuck at mutex_lock</title><link>https://devzone.nordicsemi.com/thread/375666?ContentTypeID=1</link><pubDate>Wed, 06 Jul 2022 07:08:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5856f27a-13ec-4115-8b89-b5fa4af0c15f</guid><dc:creator>Brett</dc:creator><description>&lt;p&gt;Hi Jonathan,&lt;/p&gt;
&lt;p&gt;CONFIG_MQTT_KEEPALIVE=1200&lt;br /&gt;&lt;br /&gt;reconnect is not defined.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;The strange thing is, it sends the first packet fine its only when it sends the 2nd packet that it locks up and this send is basically immediately, as I have 10 packets buffered in a queue to send.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Is there anything that I need to consider when doing batch processing like this ? Timing or ?&lt;br /&gt;Do I need to consider a different MQTT setting ?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Do I need to consider any&amp;nbsp;ACK packets for MQTT or is all this managed by the underlying protocol stack.&amp;nbsp; I dont really understand the full implementations of poll, mqtt_live and mqtt_input functions and if I need to manage any of these after I do the send. In this instance the code is a producer only - no subscribe required.&lt;/p&gt;
&lt;p&gt;I understand the basics, but not sure if I am missing anything.&amp;nbsp; Happy to share the code I am using if&amp;nbsp;that&amp;nbsp;helps.&amp;nbsp; Its a bit ugly at the moment, with all the&amp;nbsp;debug print statements :)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;regards&lt;br /&gt;-brett&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160: mqtt_publish blocking - stuck at mutex_lock</title><link>https://devzone.nordicsemi.com/thread/375598?ContentTypeID=1</link><pubDate>Tue, 05 Jul 2022 14:27:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cb9b5ab-ee5a-4644-a73f-6ca92efcd95e</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;There are some configuration options to considder,&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/v1.6.0/samples/nrf9160/mqtt_simple#configuration"&gt;https://github.com/nrfconnect/sdk-nrf/tree/v1.6.0/samples/nrf9160/mqtt_simple#configuration&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Do you have a reconnect defined or a keepalive?&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160: mqtt_publish blocking - stuck at mutex_lock</title><link>https://devzone.nordicsemi.com/thread/375143?ContentTypeID=1</link><pubDate>Fri, 01 Jul 2022 14:55:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:392d5a45-08ea-45ce-9d98-393ab6980861</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi, We have entered the summer holiday period in Norway so staffing is low, so some delayed response time is expected.&lt;br /&gt;&lt;/span&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160: mqtt_publish blocking - stuck at mutex_lock</title><link>https://devzone.nordicsemi.com/thread/374643?ContentTypeID=1</link><pubDate>Wed, 29 Jun 2022 01:15:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8493a2be-61bc-47f2-b36a-a7c21c716e5f</guid><dc:creator>Brett</dc:creator><description>&lt;p&gt;I forgot to add, this is running from the v1.6.0 SDK.&lt;/p&gt;
&lt;p&gt;I tried 1.7.0 but had issues when loading and booting the code, so went back to 1.6.0.&lt;/p&gt;
&lt;p&gt;I tried to go to 2.0.0, but too many breaking changes for now - I will migrate there when I have more time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>