<?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 code for the lesson5 exercise1 of Cellular IoT Fundamentals in the DevAcademy could not be able to connect to the lte network</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/108421/the-code-for-the-lesson5-exercise1-of-cellular-iot-fundamentals-in-the-devacademy-could-not-be-able-to-connect-to-the-lte-network</link><description>Dear Support Team 
 I found that the code for the lesson5 exercise1 of Cellular IoT Fundamentals could not be able to connect to the lte network, the log has been always like the screenshot below. And the lesson4 exercise2 has the same issue. 
 
 But</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 26 Feb 2024 09:36:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/108421/the-code-for-the-lesson5-exercise1-of-cellular-iot-fundamentals-in-the-devacademy-could-not-be-able-to-connect-to-the-lte-network" /><item><title>RE: The code for the lesson5 exercise1 of Cellular IoT Fundamentals in the DevAcademy could not be able to connect to the lte network</title><link>https://devzone.nordicsemi.com/thread/470650?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2024 09:36:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac484dd5-321a-485e-b250-eef1c3862167</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;&amp;quot;-2&amp;quot;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That may be caused by a &amp;quot;none existing CONFIG_COAP_SERVER_HOSTNAME&amp;quot;, e.g. &amp;quot;californium.eclipseprojects.org&amp;quot; instead of &amp;quot;californium.eclipseprojects.io&amp;quot;. I would recommend, that you add that hostname to the error message with something similar as (&amp;quot;ERROR: getaddrinfo for &amp;#39;%s&amp;#39; failed %d&amp;quot;, CONFIG_COAP_SERVER_HOSTNAME, err).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The code for the lesson5 exercise1 of Cellular IoT Fundamentals in the DevAcademy could not be able to connect to the lte network</title><link>https://devzone.nordicsemi.com/thread/470636?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2024 08:53:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdc9f621-0cfa-419c-8b2d-30b1c5fe382f</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Tom,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is very strange that lesson5 does not work, while lesson4 does work on your end.&lt;/p&gt;
&lt;p&gt;Both of these are default setup with LTE-M, so unless you have done changes specifically for lesson4, they should both behave equally.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-2 is an errno, which you can check here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.4.99-ncs1-2/lib/libc/minimal/include/errno.h#L41"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v3.4.99-ncs1-2/lib/libc/minimal/include/errno.h#L41&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you added the steps required for exercise 1? for instance setting the hostname for the CoAP server?&lt;/p&gt;
&lt;p&gt;Try running&amp;nbsp;&amp;quot;cellfund_less5_exer1_solution&amp;quot; and see if that one runs.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The code for the lesson5 exercise1 of Cellular IoT Fundamentals in the DevAcademy could not be able to connect to the lte network</title><link>https://devzone.nordicsemi.com/thread/470356?ContentTypeID=1</link><pubDate>Fri, 23 Feb 2024 05:49:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2708845-f5e6-4215-8a23-2aed2ea18b21</guid><dc:creator>Tom.Fu</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s good to see that It can connect to the LTE network now after I set&amp;nbsp;&lt;span&gt;CONFIG_LTE_NETWORK_MODE_NBIOT_GPS=y. But it failed to get the address information. I don&amp;#39;t know what does the return value -2 mean and how to resolve this problem. Many thanks.&lt;/span&gt;&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/pastedimage1708667248328v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The code for the lesson5 exercise1 of Cellular IoT Fundamentals in the DevAcademy could not be able to connect to the lte network</title><link>https://devzone.nordicsemi.com/thread/469972?ContentTypeID=1</link><pubDate>Wed, 21 Feb 2024 09:34:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c735cfbf-8a31-480c-85d1-f0a7d57ac235</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You are getting +CEREG: 4 back, are you certain you have coverage for LTE M in your area?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/nw_service/cereg_read.html?cp=2_2_0_7_6_1"&gt;https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/nw_service/cereg_read.html?cp=2_2_0_7_6_1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Should you set NB-IoT instead?&lt;/p&gt;
&lt;p&gt;CONFIG_LTE_NETWORK_MODE_NBIOT_GPS=y&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The code for the lesson5 exercise1 of Cellular IoT Fundamentals in the DevAcademy could not be able to connect to the lte network</title><link>https://devzone.nordicsemi.com/thread/469919?ContentTypeID=1</link><pubDate>Wed, 21 Feb 2024 02:19:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a261e2cf-d554-4316-9985-1b1e0cc6435d</guid><dc:creator>Tom.Fu</dc:creator><description>&lt;p&gt;Hi,&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/pastedimage1708481524050v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;If I issuing the at command by the at_client, does the modem keep the configuration after I program the exercise code to the chip? I have tried this way, but the issue still could not be resolved.&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/pastedimage1708495610994v2.png" /&gt;&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/pastedimage1708495388431v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;I enable the AT host library in the exercise, but it responded ERROR after the&amp;nbsp;AT%XFACTORYRESET=0 was sent.&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/pastedimage1708497261940v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The code for the lesson5 exercise1 of Cellular IoT Fundamentals in the DevAcademy could not be able to connect to the lte network</title><link>https://devzone.nordicsemi.com/thread/469719?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2024 09:07:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:223bf272-93c0-4cf4-a8c1-587271140c07</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Tom.Fu"]Sorry, I am not quite understand how to implement&amp;nbsp;&lt;span&gt;running &amp;quot;AT+CFUN=0&amp;quot; &lt;/span&gt;[/quote]
&lt;p&gt;Sorry, this was recently changed. Prior versions could reset the modem reset loop restriction by issuing AT+CFUN=0, but recent versions require factory reset.&lt;/p&gt;
&lt;p&gt;If you have issues related to issuing at commands, try to use at_client to issue it.&lt;/p&gt;
&lt;p&gt;In your case, you need to look at the response, -7, which corresponds to E2BIG:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/**
 * @brief Send a formatted AT command to the modem
 *	  and receive the response into the supplied buffer.
 *
 * @param buf Buffer to receive the response into.
 * @param len Buffer length.
 * @param fmt Command format.
 * @param ... Format arguments.
 *
 * @retval  0 On &amp;quot;OK&amp;quot; responses.
 * @returns A positive value On &amp;quot;ERROR&amp;quot;, &amp;quot;+CME ERROR&amp;quot;, and &amp;quot;+CMS ERROR&amp;quot; responses.
 *	    The type of error can be distinguished using @c nrf_modem_at_err_type.
 *	    The error value can be retrieved using @c nrf_modem_at_err.
 * @retval -NRF_EPERM The Modem library is not initialized.
 * @retval -NRF_EFAULT @c buf or @c fmt are @c NULL.
 * @retval -NRF_EINVAL Bad format @c fmt, or @c len is zero.
 * @retval -NRF_ENOMEM Not enough shared memory for this request.
 * @retval -NRF_E2BIG The response is larger than the supplied buffer @c buf.
 * @retval -NRF_ESHUTDOWN If the modem was shut down.
 */
int nrf_modem_at_cmd(void *buf, size_t len, const char *fmt, ...);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This means that the buffer you provided was too small for the response.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The code for the lesson5 exercise1 of Cellular IoT Fundamentals in the DevAcademy could not be able to connect to the lte network</title><link>https://devzone.nordicsemi.com/thread/469667?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2024 03:35:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5bfc9a1-5cee-4946-b0db-6851adf8acf6</guid><dc:creator>Tom.Fu</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sorry, I am not quite understand how to implement&amp;nbsp;&lt;span&gt;running &amp;quot;AT+CFUN=0&amp;quot; before running a reset of the nRF9160 in this code. I tried to send the AT command of&amp;nbsp;%XFACTORYRESET=0 to remove this restriction, but it failed to set this command like the screenshot below. And I also tried send the AT+CFUN=0 like this way, it can success to set but the log still freezing in the state like the screenshot below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1708399872771v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The code for the lesson5 exercise1 of Cellular IoT Fundamentals in the DevAcademy could not be able to connect to the lte network</title><link>https://devzone.nordicsemi.com/thread/469452?ContentTypeID=1</link><pubDate>Mon, 19 Feb 2024 10:50:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:767ee6e2-371b-4450-b50e-8864f7ddff3c</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I used your .hex file, with mfw v1.3.6:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.3.99-ncs1 ***
[00:00:00.404,571] &amp;lt;inf&amp;gt; Lesson5_Exercise1: Initializing modem library
[00:00:00.646,179] &amp;lt;inf&amp;gt; Lesson5_Exercise1: Connecting to LTE network
[00:00:01.777,008] &amp;lt;inf&amp;gt; Lesson5_Exercise1: RRC mode: Connected
[00:00:02.915,527] &amp;lt;inf&amp;gt; Lesson5_Exercise1: Network registration status: Connected - home network
[00:00:02.915,679] &amp;lt;inf&amp;gt; Lesson5_Exercise1: Connected to LTE network
[00:00:03.182,220] &amp;lt;inf&amp;gt; Lesson5_Exercise1: IPv4 Address found 20.47.97.44

[00:00:03.182,708] &amp;lt;inf&amp;gt; Lesson5_Exercise1: Successfully connected to server
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you check the former link?&lt;/p&gt;
[quote user="hkn"]&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Could it be that you&amp;#39;re seeing this restriction?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/nwp_042/WP/nwp_042/intro.html?cp=2_3_1"&gt;https://infocenter.nordicsemi.com/topic/nwp_042/WP/nwp_042/intro.html?cp=2_3_1&lt;/a&gt;&lt;/p&gt;[/quote]
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is quite common that you run into this restriction, especially if you do not run &amp;quot;AT+CFUN=0&amp;quot; before running a reset of the nRF9160.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The code for the lesson5 exercise1 of Cellular IoT Fundamentals in the DevAcademy could not be able to connect to the lte network</title><link>https://devzone.nordicsemi.com/thread/469423?ContentTypeID=1</link><pubDate>Mon, 19 Feb 2024 09:38:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee5ce0d9-1347-4994-bc06-fb4ad18cda90</guid><dc:creator>Tom.Fu</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But other code could connect normally every time after I programmed and it still could not connect normally after I tried to update the modem firmware to v1.3.6.&lt;/p&gt;
&lt;p&gt;The NCS version I currently use is v2.4.0.&lt;/p&gt;
&lt;h2 class="name"&gt;&lt;/h2&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The code for the lesson5 exercise1 of Cellular IoT Fundamentals in the DevAcademy could not be able to connect to the lte network</title><link>https://devzone.nordicsemi.com/thread/469410?ContentTypeID=1</link><pubDate>Mon, 19 Feb 2024 08:53:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99974e32-c599-43eb-b840-22a131887178</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The code worked out of the box at my end (both with your precompiled .hex and on ncs v2.5.2):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting nRF Connect SDK v2.5.2 ***
[00:00:00.397,338] &amp;lt;inf&amp;gt; Lesson5_Exercise1: Initializing modem library  
[00:00:00.638,214] &amp;lt;inf&amp;gt; Lesson5_Exercise1: Connecting to LTE network   
[00:00:01.569,519] &amp;lt;inf&amp;gt; Lesson5_Exercise1: RRC mode: Connected         
[00:00:02.948,089] &amp;lt;inf&amp;gt; Lesson5_Exercise1: Network registration status: Connected - home network
[00:00:02.948,211] &amp;lt;inf&amp;gt; Lesson5_Exercise1: Connected to LTE network    
[00:00:03.249,725] &amp;lt;inf&amp;gt; Lesson5_Exercise1: IPv4 Address found 20.47.97.44

[00:00:03.250,213] &amp;lt;inf&amp;gt; Lesson5_Exercise1: Successfully connected to server
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could it be that you&amp;#39;re seeing this restriction?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/nwp_042/WP/nwp_042/intro.html?cp=2_3_1"&gt;https://infocenter.nordicsemi.com/topic/nwp_042/WP/nwp_042/intro.html?cp=2_3_1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>