<?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: Wait until connected</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58838/thingy91-wait-until-connected</link><description>Hi, 
 I am using the Thingy 91 and I have a program, where I first read GPS, then switch to NBIoT Mode and then send the data to a server. 
 However if I switch the Antenna to NBIoT Mode, I have to wait a certain amount of time until the Thingy 91 has</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 01 Apr 2020 13:32:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58838/thingy91-wait-until-connected" /><item><title>RE: Thingy91: Wait until connected</title><link>https://devzone.nordicsemi.com/thread/242985?ContentTypeID=1</link><pubDate>Wed, 01 Apr 2020 13:32:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea23d65e-4200-480a-97f3-9fd6eec55766</guid><dc:creator>Jan Tore Guggedal</dc:creator><description>&lt;p&gt;Hi Max,&lt;/p&gt;
&lt;p&gt;The file was moved recently, and is now located here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/include/modem/lte_lc.h"&gt;https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/include/modem/lte_lc.h&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve updated my original answer accordingly as well.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jan Tore&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91: Wait until connected</title><link>https://devzone.nordicsemi.com/thread/242977?ContentTypeID=1</link><pubDate>Wed, 01 Apr 2020 13:21:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33586b79-8a08-4c60-b030-3ee5f010ad12</guid><dc:creator>Maxvi33</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;br /&gt;Thank&amp;#39;s for your help!&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I can&amp;#39;t open&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;your&amp;nbsp;&lt;/span&gt;link&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/include/lte_lc.h"&gt;https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/include/lte_lc.h&lt;/a&gt;&amp;nbsp;&amp;quot;page not found&amp;quot;&lt;br /&gt;And i search &amp;quot;blob&amp;quot; section but i don&amp;#39;t find anything...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Kind regards&lt;br /&gt;Max&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91: Wait until connected</title><link>https://devzone.nordicsemi.com/thread/239102?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2020 12:41:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6789be7-6156-4e08-8d1a-a7e410231eb3</guid><dc:creator>Jan Tore Guggedal</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Adding a bit to Heidi&amp;#39;s answer, if you want to use a higher level of abstraction in your application.&lt;/p&gt;
&lt;p&gt;nRF Connect SDK&amp;nbsp;offers a convenience library for LTE link control:&amp;nbsp;&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/include/lte_lc.h"&gt;https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/include/lte_lc.h&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It offers, among other things, APIs to set modem&amp;#39;s system mode and connect/disconnect to LTE network.&lt;br /&gt;To enable it, set CONFIG_LTE_LINK_CONTROL=y in your prj.conf and include the header file.&lt;br /&gt;If you don&amp;#39;t want the library to automatically to connect to LTE network on boot, you need to set the following:&lt;br /&gt;CONFIG_LTE_AUTO_INIT_AND_CONNECT=n&lt;/p&gt;
&lt;p&gt;I think relevant functions for you to achieve what you want are for example:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;lte_lc_system_mode_set(LTE_LC_SYSTEM_MODE_GPS);

lte_lc_normal();

// Do GPS stuff

lte_lc_offline();

lte_lc_system_mode_set(LTE_LC_SYSTEM_MODE_NBIOT);

// Blocking call, tries to connect for 10 minutes by default
lte_lc_init_and_connect();

// Wait for LTE connection...
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jan Tore&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thingy91: Wait until connected</title><link>https://devzone.nordicsemi.com/thread/238747?ContentTypeID=1</link><pubDate>Mon, 09 Mar 2020 09:37:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d96dcc66-4e11-46cc-8f18-2679a08fa999</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Yes, there is. The AT command &lt;a href="https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/nw_service/cereg_read.html"&gt;AT+CEREG?&lt;/a&gt;&amp;nbsp;lets you read the network registration status, which will tell you if the UE has connected to the network.&lt;/p&gt;
&lt;p&gt;You can use the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/at_cmd.html"&gt;AT command interface&lt;/a&gt; available in NCS to read out this information in your application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You can read more about all AT commands available in the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/pdf/nrf91_at_commands_v1.1.pdf"&gt;AT Command Reference Guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Heidi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>