<?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>The ltc_lc_init_and_connect() blocks all threads</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45488/the-ltc_lc_init_and_connect-blocks-all-threads</link><description>I am trying to build an application on the nrf9160dk dev board. It it supposed to collect data from a sensor, and send updates via MQTT when there is an NB-IoT connection available. 
 My problem is that when I call lte_lc_init_and_connect(), everything</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 01 Apr 2019 11:48:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45488/the-ltc_lc_init_and_connect-blocks-all-threads" /><item><title>RE: The ltc_lc_init_and_connect() blocks all threads</title><link>https://devzone.nordicsemi.com/thread/179472?ContentTypeID=1</link><pubDate>Mon, 01 Apr 2019 11:48:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0505ed3-c8a1-4d74-9de8-79ed365b9226</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for the update.&amp;nbsp;The default priority of the main thread is &amp;#39;0&amp;#39; if your kernel is enabled with preemptive support, and -1 if not (&lt;a href="http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/reference/kernel/threads/#system-threads"&gt;link&lt;/a&gt;).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The ltc_lc_init_and_connect() blocks all threads</title><link>https://devzone.nordicsemi.com/thread/179177?ContentTypeID=1</link><pubDate>Fri, 29 Mar 2019 10:17:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f45e1c5-74fc-449b-9268-a4e97abc8bfb</guid><dc:creator>Linus</dc:creator><description>&lt;p&gt;After some more debugging, I realize that I might have&amp;nbsp;goofed with the thread priorities. As long as the data collection thread has higher priority than the LTE thread, it looks a bit better.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The ltc_lc_init_and_connect() blocks all threads</title><link>https://devzone.nordicsemi.com/thread/179142?ContentTypeID=1</link><pubDate>Fri, 29 Mar 2019 08:52:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db5030a6-6576-437f-a361-aaa0747e2ff9</guid><dc:creator>Linus</dc:creator><description>&lt;p&gt;After some debugging, I am suspecting that this code is the culprit:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;pre&gt;int32_t bsd_os_timedwait(uint32_t context, uint32_t timeout)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* TODO: to be implemented */&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 0;&lt;br /&gt;}&lt;/pre&gt;
&lt;p&gt;It seems to busy wait on the socket while waiting for the AT commands.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>