<?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>lwm2m client nrf9160 - custom board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103131/lwm2m-client-nrf9160---custom-board</link><description>Good day 
 I am currently running a lwm2m based client that sends lwm2m messages after every 10 min. The process of sending is handled in another thread and the data that doesn&amp;#39;t send is saved inside a buffer. When the client detects that there is connection</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Nov 2023 15:34:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103131/lwm2m-client-nrf9160---custom-board" /><item><title>RE: lwm2m client nrf9160 - custom board</title><link>https://devzone.nordicsemi.com/thread/457630?ContentTypeID=1</link><pubDate>Mon, 27 Nov 2023 15:34:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f61a10a-b3d5-4dd8-b717-62851f72f064</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
[quote user="Hkhan7861"] The device will suffer a network error, suspend the lwm2m client and then enter the LTE_OFFLINE client_state. Following this it will never attempt to look for a network connection again.&amp;nbsp; How do i stop this from happening?[/quote]
&lt;p&gt;If you get a network error, it will try to reconnect:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.5.0/samples/cellular/lwm2m_client/src/main.c#L787"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v2.5.0/samples/cellular/lwm2m_client/src/main.c#L787&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lwm2m client nrf9160 - custom board</title><link>https://devzone.nordicsemi.com/thread/449984?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2023 08:40:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d30d1b50-bf82-4a54-ba9a-3e5e10538b3c</guid><dc:creator>Hkhan7861</dc:creator><description>&lt;p&gt;I have discovered what happens.&amp;nbsp; The device will suffer a network error, suspend the lwm2m client and then enter the LTE_OFFLINE client_state. Following this it will never attempt to look for a network connection again.&amp;nbsp; How do i stop this from happening?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lwm2m client nrf9160 - custom board</title><link>https://devzone.nordicsemi.com/thread/448576?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2023 19:17:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1339aeb8-c002-420e-b290-a38f0a105026</guid><dc:creator>Hkhan7861</dc:creator><description>&lt;p&gt;Hi Sigurd&lt;/p&gt;
&lt;p&gt;Any updates on this ? the issue still seems to be apparent. Ant news on this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lwm2m client nrf9160 - custom board</title><link>https://devzone.nordicsemi.com/thread/448310?ContentTypeID=1</link><pubDate>Fri, 29 Sep 2023 10:15:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4117537a-a6a1-4853-8b83-a8e9c38fccdb</guid><dc:creator>Hkhan7861</dc:creator><description>&lt;p&gt;Hi Sigurd&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately i dont have any logs however i do suspect it is the same issue.&amp;nbsp; The client is unchanged and everything ive written runs independently.&amp;nbsp; When the device was reset, the flash was full of data that should have been sent which is what my code does in a separate thread.&amp;nbsp; I just wanted to confirm if the issue has been reported by anybody else ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lwm2m client nrf9160 - custom board</title><link>https://devzone.nordicsemi.com/thread/448156?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2023 12:26:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c231ca86-2ea6-4183-b17d-ddde5758ffce</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
[quote user="sigurdon"]Håkon is out of office, so I&amp;#39;m replying instead.[/quote]
&lt;p&gt;Håkon is back in office now, so I will re-assign this to him.&lt;/p&gt;
[quote user="Hkhan7861"]I wasn&amp;#39;t logging initially when I made this change.&amp;nbsp; When I run into an error again I will come back to this post.&amp;nbsp;[/quote]
&lt;p&gt;Do you have any logs to share? is it the exact same error as last time,&amp;nbsp;&lt;span&gt;or is it a different error you see now?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lwm2m client nrf9160 - custom board</title><link>https://devzone.nordicsemi.com/thread/447854?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2023 06:06:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac80b2f2-6785-44b2-bbd5-891c7fd016cb</guid><dc:creator>Hkhan7861</dc:creator><description>&lt;p&gt;Good day&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I seem to have run into the same issue again.&amp;nbsp; Just wondering if you have any updates on this?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Hassan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lwm2m client nrf9160 - custom board</title><link>https://devzone.nordicsemi.com/thread/445377?ContentTypeID=1</link><pubDate>Mon, 11 Sep 2023 11:00:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7a54478-d173-4fec-9c0d-387f40c601de</guid><dc:creator>Hkhan7861</dc:creator><description>&lt;p&gt;Hi SIgurd&lt;/p&gt;
&lt;p&gt;I wasn&amp;#39;t logging initially when I made this change.&amp;nbsp; When I run into an error again I will come back to this post.&amp;nbsp; At the moment I am using state_trigger_and_unlock instead of state_set_and_unlock&amp;nbsp; .&amp;nbsp; This is the most recent change I made last week.&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Hassan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lwm2m client nrf9160 - custom board</title><link>https://devzone.nordicsemi.com/thread/444897?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 11:21:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdf0395b-33d9-41ad-941c-cee26697824c</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Håkon is out of office, so I&amp;#39;m replying instead.&lt;/p&gt;
&lt;p&gt;Did you apply both PRs?&amp;nbsp;&lt;br /&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/12144/files"&gt;https://github.com/nrfconnect/sdk-nrf/pull/12144/files&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/12178/files"&gt;https://github.com/nrfconnect/sdk-nrf/pull/12178/files&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Do you still see this error with these PR&amp;#39;s applied, or is it a different error you see now?&lt;/p&gt;
[quote user="Hkhan7861"]&lt;p&gt;I did some testing and found that when the lwm2m client triggers a NETWORK_ERROR, the client&amp;nbsp; enters the START client_state.&amp;nbsp; But when it enters :&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;lwm2m_rd_client_start&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;client&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;endpoint_name&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;bootstrap_flags&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;rd_client_event&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;NULL&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&amp;quot;Client is already running in state 9&amp;quot; (referring to the engine state) is logged and the client remains in state 1(START)&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;However, the client is not connected to the internet and now a lwm2m_send function will fail every time due to it not being connected.&amp;nbsp;&lt;/div&gt;[/quote]&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lwm2m client nrf9160 - custom board</title><link>https://devzone.nordicsemi.com/thread/444235?ContentTypeID=1</link><pubDate>Mon, 04 Sep 2023 07:59:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b829bdf-cc67-4643-85bb-e799c2c8bc91</guid><dc:creator>Hkhan7861</dc:creator><description>&lt;p&gt;hi MIchal&lt;/p&gt;
&lt;p&gt;I tested the code over the weekend and it appears that the client still gets stuck in that state.&amp;nbsp; Has any issues on this fix been reported?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Hassan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lwm2m client nrf9160 - custom board</title><link>https://devzone.nordicsemi.com/thread/443992?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2023 06:35:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e47c950c-ef46-42a1-9697-11617e131b99</guid><dc:creator>Hkhan7861</dc:creator><description>&lt;p&gt;Thank you ! Will update it accordingly.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Hassan.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lwm2m client nrf9160 - custom board</title><link>https://devzone.nordicsemi.com/thread/443925?ContentTypeID=1</link><pubDate>Thu, 31 Aug 2023 12:57:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ac91f02-507b-4a9e-8ad1-d351a5624864</guid><dc:creator>Hakon</dc:creator><description>[quote user="Hkhan7861"]I added the code stated in the link of the PR that you sent me and it seems to have worked.&amp;nbsp; Was this not supposed to be done for SDK 2.4.0?&amp;nbsp;[/quote]
&lt;p&gt;Well that&amp;#39;s great then. Here is a link to the most recent fix, &lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/12178"&gt;https://github.com/nrfconnect/sdk-nrf/pull/12178&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lwm2m client nrf9160 - custom board</title><link>https://devzone.nordicsemi.com/thread/443639?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2023 05:52:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:489c4816-314a-4007-b757-bbb5be15b407</guid><dc:creator>Hkhan7861</dc:creator><description>&lt;p&gt;Hi Hakon&lt;/p&gt;
&lt;p&gt;I added the code stated in the link of the PR that you sent me and it seems to have worked.&amp;nbsp; Was this not supposed to be done for SDK 2.4.0?&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Hassan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lwm2m client nrf9160 - custom board</title><link>https://devzone.nordicsemi.com/thread/443557?ContentTypeID=1</link><pubDate>Tue, 29 Aug 2023 12:30:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7fb88152-71aa-4e9a-a696-48f8e96d2b2b</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;The fix is not working for NCS 2.4 yet (it is still being worked on), but you can make these changes to fix it&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;@@ -447,7 +447,7 @@ static void rd_client_event(struct lwm2m_ctx *client, enum lwm2m_rd_client_event
     case LWM2M_RD_CLIENT_EVENT_DISCONNECT:
         LOG_DBG(&amp;quot;Disconnected&amp;quot;);
         if (client_state != UPDATE_FIRMWARE) {
-            state_set_and_unlock(START);
+            state_trigger_and_unlock(START);
         } else {
             k_mutex_unlock(&amp;amp;lte_mutex);
         }
(1/2) Stage this hunk [y,n,q,a,d,j,J,g,/,e,?]? y
@@ -686,9 +686,9 @@ int main(void)
             ret = lwm2m_rd_client_start(&amp;amp;client, endpoint_name, bootstrap_flags,
                             rd_client_event, NULL);
             if (ret) {
-                state_set_and_unlock(NETWORK_ERROR);
+                state_trigger_and_unlock(NETWORK_ERROR);
             } else {
-                state_set_and_unlock(CONNECTING);
+                state_trigger_and_unlock(CONNECTING);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lwm2m client nrf9160 - custom board</title><link>https://devzone.nordicsemi.com/thread/443323?ContentTypeID=1</link><pubDate>Mon, 28 Aug 2023 09:27:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d500174-b877-4afc-b072-90ef7a35116b</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;The fix is ready. Please try &lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/12144"&gt;this PR&lt;/a&gt; and see if it works for you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lwm2m client nrf9160 - custom board</title><link>https://devzone.nordicsemi.com/thread/443280?ContentTypeID=1</link><pubDate>Mon, 28 Aug 2023 06:54:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec72792c-36ee-4dcd-a3c1-b8802b9e03f0</guid><dc:creator>Hkhan7861</dc:creator><description>&lt;p&gt;Hi Hakon&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for the update ! Please let me know as soon as its available.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Hassan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lwm2m client nrf9160 - custom board</title><link>https://devzone.nordicsemi.com/thread/443166?ContentTypeID=1</link><pubDate>Fri, 25 Aug 2023 12:24:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffdec1b8-c092-4dc3-b9fa-87bb567d0d89</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I asked the developer, and he said there is a PR with this fix. He will make a smaller one on Monday that you can apply.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lwm2m client nrf9160 - custom board</title><link>https://devzone.nordicsemi.com/thread/443103?ContentTypeID=1</link><pubDate>Fri, 25 Aug 2023 07:31:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4d89114-bb3a-42ca-bfc6-efa94bc5a49a</guid><dc:creator>Hkhan7861</dc:creator><description>&lt;p&gt;ADDITIONAL INFORMATION:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I did some testing and found that when the lwm2m client triggers a NETWORK_ERROR, the client&amp;nbsp; enters the START client_state.&amp;nbsp; But when it enters :&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;lwm2m_rd_client_start&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;client&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;endpoint_name&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;bootstrap_flags&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;rd_client_event&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;NULL&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&amp;quot;Client is already running in state 9&amp;quot; (referring to the engine state) is logged and the client remains in state 1(START)&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;However, the client is not connected to the internet and now a lwm2m_send function will fail every time due to it not being connected.&amp;nbsp; How do I stop this from happening a force reconnection.&amp;nbsp; Again , I would like to reiterate that I have not changed anything with the standard lwm2m client nrf9160 sample.&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>