<?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 connected yet not connected</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81234/nrf9160-connected-yet-not-connected</link><description>I&amp;#39;m sorry, I don&amp;#39;t know how this is reproduceable. 
 Yesterday and today my connection does not work. Sometimes . Yesterday it was OK early in the morning and in the afternoon. Today it was OK until the afternoon. 
 I did not change the setup, just rebooting</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 03 Nov 2021 14:06:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81234/nrf9160-connected-yet-not-connected" /><item><title>RE: nRF9160 connected yet not connected</title><link>https://devzone.nordicsemi.com/thread/337294?ContentTypeID=1</link><pubDate>Wed, 03 Nov 2021 14:06:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d0a3b05-f091-4d74-a1de-d42cc80f7c5e</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Lukas,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Its good to hear that your main problem is fixed.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Here are the answers of your remaining questions:-&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;* Which queries do You recommend to find out connection quality?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For finding out connection quality you can use AT+CSCQ command (&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fref_at_commands%2FREF%2Fat_commands%2Fmob_termination_ctrl_status%2Fcesq_set.html"&gt;Nordic Semiconductor Infocenter&lt;/a&gt;) which shows the Reference Signal Received Quality (RSRQ) and Reference Signal Received Power (RSRP).&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;* What can I query to try to renew the connection, change operator or somehow get a connection?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;You can write AT+COPS &lt;span&gt;selects a Public Land Mobile Network(PLMN) manually. It reads and searches the current mobile network (&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fref_at_commands%2FREF%2Fat_commands%2Fnw_service%2Fnw_service.html"&gt;Nordic Semiconductor Infocenter&lt;/a&gt;).&amp;nbsp;We recommend&amp;nbsp;to left it on automatic selection.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Regarding Debug print&lt;/strong&gt; : I think it may not be an error as you are trying to read a field in a struct that isn&amp;#39;t used, and thinking the invalid value in the unused field is a problem. &lt;em&gt;&lt;strong&gt;struct&amp;nbsp;&lt;/strong&gt;&lt;/em&gt;lte_lc_evt is used only in the tac fields and id fields in the cell struct. Therefore, when you get the CELL-UPDATE event only these two parameter are set with value. Others are zero.&amp;nbsp;&amp;nbsp;&lt;em&gt;&lt;strong&gt;&amp;nbsp;(See again- number 4 line of your debug log).&amp;nbsp; &lt;/strong&gt;&lt;/em&gt;You can look at this link : &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/include/modem/lte_lc.h#L179"&gt;https://github.com/nrfconnect/sdk-nrf/blob/main/include/modem/lte_lc.h#L179&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hope it helps.&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;Kazi Afroza Sultana&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 connected yet not connected</title><link>https://devzone.nordicsemi.com/thread/337074?ContentTypeID=1</link><pubDate>Tue, 02 Nov 2021 12:07:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a83f90a4-d82c-44c9-9adc-6ddee78cd226</guid><dc:creator>Lukas Kuhs</dc:creator><description>&lt;p&gt;Hmm... There are two problems.&lt;/p&gt;
&lt;p&gt;&amp;quot;Yesterday&amp;quot; (refereing to ticket creation) there was a bad connection. &amp;quot;Today&amp;quot; (refereing to ticket creation) there was a software bug that led to the server rejecting some of the packets, but connection seemed to have been OK &amp;quot;today&amp;quot;. So my main problem is fixed. Thank You for helping with this!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Questions remaining to be able to cope with bad connection situations better in the future:&lt;/p&gt;
&lt;p&gt;* Why is the debug print incorrect (showing mcc=mnc=0)? This is misleading...&lt;/p&gt;
&lt;p&gt;* Which queries do You recommend to find out connection quality?&lt;/p&gt;
&lt;p&gt;* What can I query to try to renew the connection, change operator or somehow get a connection?&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Lukas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 connected yet not connected</title><link>https://devzone.nordicsemi.com/thread/337026?ContentTypeID=1</link><pubDate>Tue, 02 Nov 2021 09:55:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96aff50a-916c-4280-b3bd-85ea356c7884</guid><dc:creator>Lukas Kuhs</dc:creator><description>&lt;p&gt;Yes, I already wrote so in my initial question, that it is only in some of the queries.&lt;/p&gt;
&lt;p&gt;This is the code for printing (omitting the other cases):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void lte_handler(const struct lte_lc_evt *const evt)
{
	switch (evt-&amp;gt;type) {
	case LTE_LC_EVT_CELL_UPDATE:
		printk(&amp;quot;LTE cell changed: mcc=%d, mnc=%d, id=%d, tac=%d, earfcn=%d, timing_advance=%d, measurement_time=%lld, phys_cell_id=%d, rsrp=%d, rsrq=%d\n&amp;quot;, 
                          evt-&amp;gt;cell.mcc,
                          evt-&amp;gt;cell.mnc,
                          evt-&amp;gt;cell.id,
                          evt-&amp;gt;cell.tac,
                          evt-&amp;gt;cell.earfcn,
                          evt-&amp;gt;cell.timing_advance,
                          evt-&amp;gt;cell.measurement_time,
                          evt-&amp;gt;cell.phys_cell_id,
                          evt-&amp;gt;cell.rsrp,
                          evt-&amp;gt;cell.rsrq);
		break;
	}
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The handler is registered like so:&lt;/p&gt;
&lt;div style="background-color:#1e1e1e;color:#d4d4d4;font-family:Consolas, &amp;#39;Courier New&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#dcdcaa;"&gt;lte_lc_connect_async&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;(&lt;/span&gt;&lt;span style="color:#dcdcaa;"&gt;lte_handler&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;And this works fine. And I&amp;#39;m quite sure that it always had worked well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 connected yet not connected</title><link>https://devzone.nordicsemi.com/thread/337018?ContentTypeID=1</link><pubDate>Tue, 02 Nov 2021 09:42:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:455c382d-f6ab-428b-9c55-8b687b5f43ed</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Lukas,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I can see from the log file that it (LTE_LC_EVT_CELL_UPDATE: LTE cell changed: mcc=0, mnc=0.....) shows mcc and mnc zero but from the command AT%XMONITOR, it&amp;#39;s not zero. You can see the PLMN id 26201 which is &lt;strong&gt;MccMnc&lt;/strong&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;AT%XMONITOR: 5,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;26201&amp;quot;,&amp;quot;67B9&amp;quot;,7,3,&amp;quot;01DE9703&amp;quot;,333,1444,27,25,&amp;quot;&amp;quot;,&amp;quot;11100000&amp;quot;,&amp;quot;00000110&amp;quot;,&amp;quot;01001001&amp;quot; =&amp;gt; Registered, roaming === mcc=262 mnc=1&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you please tell where did you print&amp;nbsp;&lt;strong&gt;MccMnc&lt;/strong&gt; in your source code? I mean where it is printed, and from where it gets the mcc and mnc.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kazi Afroza Sultana&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 connected yet not connected</title><link>https://devzone.nordicsemi.com/thread/336971?ContentTypeID=1</link><pubDate>Tue, 02 Nov 2021 07:03:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:678d0ee3-a159-4a77-bdc0-7cf682b2e99e</guid><dc:creator>Lukas Kuhs</dc:creator><description>&lt;p&gt;Hello Kazi,&lt;/p&gt;
&lt;p&gt;thank Your for looking into it.&lt;/p&gt;
&lt;p&gt;I updated to 1.3.1. Problem still persists. Hardware version is 1.0.0 PCA10090 (2021.6) Application is taken from UDP sample and then extended to use MQTT-SN. So no certificates involved.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m wondering what&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;mcc=0, mnc=0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;means. How could the device do DNS and send some packets successfully without a valid connection?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Lukas Kuhs&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 connected yet not connected</title><link>https://devzone.nordicsemi.com/thread/336865?ContentTypeID=1</link><pubDate>Mon, 01 Nov 2021 12:49:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e1cfaf1-b28c-4269-9f2f-186597c54c30</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Lukas,&lt;/p&gt;
&lt;p&gt;Thanks for your query.&amp;nbsp; Sorry, It is a bit late reply because this ticket arrived in weekend.&lt;/p&gt;
&lt;p&gt;Our technical team has looked at the modem trace file and they can not find anything immediately wrong in the modem trace.&amp;nbsp;&lt;span&gt;The device connects to the network, performs a successful DNS lookup, sends a UDP packet to the server, get a reply, then sends 4 more packets without getting a reply from the server.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;**What else should I do to find out the problem?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What can I query to make the connection good again?*&lt;/strong&gt;*&lt;/p&gt;
&lt;p&gt;Is it possible to download the latest version of nRF9160-DK application and modem firmware since it shows AT+CGMR command that version is old one (mfw_nrf9160_1.3.0)? Could you also please tell us which hardware (version no) you are using and what application (for example asset tracker or at-client etc) running on it?&amp;nbsp; You&amp;nbsp;&lt;span&gt;may have to update the nRF for Cloud certificates from nRF cloud.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please try this and let us know if still same problem continues.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kazi Afroza Sultana&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>