<?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: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110038/lwm2m-client-registration-sometimes-fails-observers-not-set</link><description>We&amp;#39;re developing an LwM2M application based on the lwm2m client sample with the goal of sending data to ThingsBoard as our main telemetry platform. 
 The Application in based on the v2.4.2 SDK, running modem firmware mfw_nrf9160_1.3.4 on the nRF9160 SICA</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 12 Jun 2024 15:26:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110038/lwm2m-client-registration-sometimes-fails-observers-not-set" /><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/488547?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2024 15:26:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7396f7b-bee5-4771-8927-21f7b662fe8d</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;I have made a new ticket describing behaviour that leads to crazy high power draw. I&amp;#39;d be thankful if you could have a look. I&amp;#39;ll try to provide the modem trace tomorrow as I&amp;#39;ll try to capture everything over night.&lt;/p&gt;
&lt;p&gt;thanks :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/487463?ContentTypeID=1</link><pubDate>Wed, 05 Jun 2024 09:32:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aac5be1d-e2bc-4b99-9870-b76683723c1f</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;Our MNO increased the APN&amp;#39;s idle timeout and we no longer get the service reject. Also, testing with the Leshan M14 public server using composite observe we no longer face any issues.&lt;/p&gt;
&lt;p&gt;As for now, I think we can consider this issue solved, so I will recap:&lt;/p&gt;
&lt;p&gt;a.) The initial issue on toolchain v2.4.2 and mfw v1.3.4 was that the Server had no congestion control and just spammed the device with requests upon registration. The Device then at one point just closed its RX window, causing it to stop answering. Solutions are:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;1. reducing requests from the server by configuring the server to send very few requests upon registration&lt;/p&gt;
&lt;p&gt;OR&lt;/p&gt;
&lt;p&gt;&amp;nbsp;2. Using a Server with congestion control (e.g. Leshan v2.0.0-M14)&lt;/p&gt;
&lt;p&gt;OR&lt;/p&gt;
&lt;p&gt;&amp;nbsp;3. Update Application to toolchain v2.6.0 or higher and mfw v1.3.6 or higher (paying attention to the compatibility matrix, of course) and use Seppo&amp;#39;s recommended settings:&lt;/p&gt;
[quote userid="97896" url="~/f/nordic-q-a/110038/lwm2m-client-registration-sometimes-fails-observers-not-set/482503"]So for this traffic profile and servers, I recommend that you update clients to use DTLS CID and&amp;nbsp;&lt;span&gt;CONFIG_LWM2M_RD_CLIENT_LISTEN_AT_IDLE=y&lt;/span&gt;[/quote]
&lt;p&gt;b.) CID is immensely helpful and reduces transmission times as well as improving functionality.&lt;/p&gt;
&lt;p&gt;c.) After issue a. was solved, we had the issue that the device was unable to connect to the network after being in PSM for ~1h or longer and would perform a full reconnection and reregistration to the lwm2m server. This led to the discovery of unintended client behaviour, which Seppo created a PR for:&lt;/p&gt;
[quote userid="97896" url="~/f/nordic-q-a/110038/lwm2m-client-registration-sometimes-fails-observers-not-set/484626"]&lt;p&gt;Application should not react to registration timeout as it is something the engine itself should recover.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can you try refactoring the main.c so that for events&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;LWM2M_RD_CLIENT_EVENT_REGISTRATION_FAILURE and LWM2M_RD_CLIENT_EVENT_REG_TIMEOUT&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;just call `k_mutex_unlock(&amp;amp;lte_mutex);` instead of this `state_trigger_and_unclock(NETWORK_ERROR)`&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;d.) After that, we discovered that our device was being detached from the network with the `Service reject (implicitly detached)` message in the modem trace. After contacting our Mobile Network Operator we have confirmed that the Access Point Name&amp;#39;s (APN) idle timeout ignored the requested PSM timer and simply detached our device from the Network after 1h. They have now set the idle timeout to 24h which should allow for proper PSM behaviour. Also, our active devices with a 6h sending interval have stopped doing full reregistrations and are doing normal registration updates, which means that they no longer detach from the network.&lt;/p&gt;
&lt;p&gt;e.) now testing everything with the Leshan M14 server, using toolchain version 2.6.0, mfw 1.3.6 and utilising the ObserveComposite function, everything is working as expected. Thingsboard will release their 3.7 Update with the updated LwM2M components (from Leshan v2.0.0-M5 to v2.0.0-M14) by the end of next week and we expect (and hope) that our application will run smoothly from then on out. Hopefully we can start using LwM2M as intended without all the workarounds and hacks we had to resort to until now.&lt;/p&gt;
&lt;p&gt;Thank you so much Seppo and Achim for your valuable help and support, it was a pleasure learning from you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/487379?ContentTypeID=1</link><pubDate>Tue, 04 Jun 2024 18:21:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd2ab59c-d062-4ebb-b4e1-697786f00f40</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;That&amp;#39;s really great news.&lt;/p&gt;
&lt;p&gt;With that new FW 2.0.1 it gets now possible to disable the HPPLMN search (if the use-case is indicating it) and to keep the DTLS context on network loss.&lt;/p&gt;
&lt;p&gt;So only one of my &amp;quot;energy eater&amp;quot; tickets is not addressed. What&amp;#39;s about the IDLE on failing network searches (for rescue calls). Is there also a plan to get rid of that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/487272?ContentTypeID=1</link><pubDate>Tue, 04 Jun 2024 10:36:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc3ab484-a9b1-4c49-98db-5c0865beff8c</guid><dc:creator>SeppoTakalo</dc:creator><description>[quote userid="5203" url="~/f/nordic-q-a/110038/lwm2m-client-registration-sometimes-fails-observers-not-set/486588"]there is no reason for DTLS 1.2 CID to do a full handshake again. Your statement addresses only some Nordic implementation limits, and is not in general true.&amp;nbsp;[/quote]
&lt;p&gt;That is correct.&lt;/p&gt;
&lt;p&gt;In nRF91 family devices, DTLS stack is inside modem and sockets are bind to PDN connections. So when network is lost, socket handles are closed, and so are DTLS sessions lost.&lt;br /&gt;&lt;br /&gt;However, in modem firmware 2.0.1 there is a socket option SO_KEEPOPEN that will not close the socket while PDN is down.&amp;nbsp;See&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/nrf_modem/doc/sockets/socket_options_func.html#:~:text=modem%20firmware%20v2.0.0.-,NRF_SO_KEEPOPEN,-Keep%20the%20socket"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/nrf_modem/doc/sockets/socket_options_func.html#:~:text=modem%20firmware%20v2.0.0.-,NRF_SO_KEEPOPEN,-Keep%20the%20socket&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;When this is used with DTLS CID, it keeps the LwM2M session even when network is temporary lost.&lt;/p&gt;
&lt;p&gt;But it requires different hardware as Modem FW 2.0.1 runs on nRF9161, nRF9151, nRF9131, which is not the case here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/486588?ContentTypeID=1</link><pubDate>Thu, 30 May 2024 08:30:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab0b920e-a15e-42a2-81eb-b99b428b8d1f</guid><dc:creator>Achim Kraus</dc:creator><description>[quote userid="97896" url="~/f/nordic-q-a/110038/lwm2m-client-registration-sometimes-fails-observers-not-set/485796"]Their answer is that network is rejecting the re-attach after the sleep. There is nothing the modem can do, other than full handshake. But it looks like network induced issue.[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Just check my &lt;a href="https://github.com/boaks/zephyr-coaps-client"&gt;Zephyr coaps-client with tinydtls&lt;/a&gt; example and you will see, that even in cases of network loss and closed UDP sockets, there is no reason for DTLS 1.2 CID to do a full handshake again. Your statement addresses only some Nordic implementation limits, and is not in general true.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/486363?ContentTypeID=1</link><pubDate>Wed, 29 May 2024 09:42:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b98a9ad5-6d64-4de6-bada-22a154bdebb8</guid><dc:creator>SeppoTakalo</dc:creator><description>&lt;p&gt;Try if you can request smaller TAU period. Preferably the same as your LwM2M update period.&lt;/p&gt;
&lt;p&gt;Check following Kconfigs&lt;/p&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;LTE_PSM_REQ&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span&gt;LTE_PSM_REQ_FORMAT_SECONDS&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;LTE_PSM_REQ_RPTAU_SECONDS&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/486330?ContentTypeID=1</link><pubDate>Wed, 29 May 2024 08:27:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25287e6d-ca61-4a8b-a447-af6e7b1c1448</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;Small update:&lt;/p&gt;
&lt;p&gt;I still haven&amp;#39;t heard from our MNO, but I did do some research on LTE network procedures and the main suspect is the APN idle timer as described on page 12 of this document: &lt;a href="https://www.gsma.com/solutions-and-impact/technologies/internet-of-things/wp-content/uploads/2017/09/LTE-M-Deployment-Guide-CLP.29-v1.0.pdf"&gt;GSMA LTE-M deployment guide&lt;/a&gt;, and on this page: &lt;a href="https://www.cisco.com/c/en/us/td/docs/wireless/upc/21-28/cups-cp-admin/21-28-upc-cups-cp-admin-guide/m_idle_timer_for_saegw_sessions.pdf"&gt;Cisco idle timer&lt;/a&gt;. It seems like our device (the UE) is implicitly detached from the network within less than an hour of inactivity. This idle timer should be configurable in the Access Point Name (APN), which we will check with our MNO as soon as they find the time.&lt;/p&gt;
&lt;p&gt;hope this helps someone in the future.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/485799?ContentTypeID=1</link><pubDate>Fri, 24 May 2024 11:51:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:191ddadf-5573-4803-b164-e290ce69c021</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;Thanks Seppo, I was just writing my next comment as your message arrived.&lt;/p&gt;
&lt;p&gt;We took a step back and started testing with the unmodified LwM2M client sample. Using only the vanilla client sample of the v2.6.0 toolchain with mfw v1.3.6, we can regularly recreate the issue using a update time of 1 h and sometimes less.&lt;/p&gt;
&lt;p&gt;using the overlay-lwm2m-1.1-core-interop.conf and the overlay-lwm2m-1.1.conf overlays as well as the following configs to connect to the open leshan server, the issue happened every time.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_APP_LWM2M_PSK=&amp;quot;&amp;quot;

CONFIG_LWM2M_CLIENT_UTILS_SERVER=&amp;quot;coap://leshan.eclipseprojects.io&amp;quot;

CONFIG_LWM2M_PEER_PORT=5683

CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP=n

CONFIG_APP_ENDPOINT_PREFIX=&amp;quot;urn:imei:&amp;quot;

CONFIG_LWM2M_DTLS_SUPPORT=y

  


CONFIG_LWM2M_DTLS_CID=y

CONFIG_LWM2M_CLIENT_UTILS_DTLS_CON_MANAGEMENT=n

CONFIG_LTE_LC_MODEM_SLEEP_NOTIFICATIONS=y

CONFIG_LWM2M_RD_CLIENT_LISTEN_AT_IDLE=n


CONFIG_LWM2M_UPDATE_PERIOD=3600

CONFIG_LWM2M_ENGINE_DEFAULT_LIFETIME=43260

CONFIG_LWM2M_SECONDS_TO_UPDATE_EARLY=60

  

CONFIG_LWM2M_LOG_LEVEL_DBG=y

  

CONFIG_THREAD_MONITOR=n

CONFIG_USE_SEGGER_RTT=y

CONFIG_STDOUT_CONSOLE=n

CONFIG_THREAD_NAME=n

CONFIG_NRF_MODEM_LIB_TRACE=n&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here you can see the corresponding device log:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:00.258,941] &amp;lt;err&amp;gt; SHT4X: Failed to reset the device.
*** Booting nRF Connect SDK v3.5.99-ncs1 ***
[00:00:00.261,260] &amp;lt;dbg&amp;gt; net_lwm2m_engine: lwm2m_engine_init: LWM2M engine socket receive thread started
[00:00:00.261,383] &amp;lt;dbg&amp;gt; net_lwm2m_obj_security: security_create: Create LWM2M security instance: 0
[00:00:00.261,535] &amp;lt;dbg&amp;gt; net_lwm2m_obj_server: server_create: Create LWM2M server instance: 0
[00:00:00.261,627] &amp;lt;dbg&amp;gt; net_lwm2m_obj_device: device_create: Create LWM2M device instance: 0
[00:00:00.261,962] &amp;lt;dbg&amp;gt; net_lwm2m_obj_conn_mon: connmon_create: Create LWM2M connectivity monitoring instance: 0
[00:00:00.262,023] &amp;lt;dbg&amp;gt; net_lwm2m_obj_firmware: firmware_create: Create LWM2M firmware instance: 0
[00:00:00.262,420] &amp;lt;inf&amp;gt; app_lwm2m_client: Run LWM2M client
[00:00:00.504,302] &amp;lt;inf&amp;gt; app_lwm2m_client: endpoint: urn:imei:350457793131176
[00:00:00.511,413] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:0/0/2, buf:0x20021337, len:1
[00:00:00.511,474] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:0/0/3, buf:0x2001b132, len:25
[00:00:00.619,323] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:0/0/10, buf:0x2002138e, len:2
[00:00:00.619,384] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:1/0/0, buf:0x2002138e, len:2
[00:00:00.656,005] &amp;lt;dbg&amp;gt; net_lwm2m_obj_portfolio: portfolio_create: Create LwM2M Portfolio instance: 0
[00:00:00.656,158] &amp;lt;inf&amp;gt; lwm2m_lte_notification: Registering ncell notification handler
[00:00:00.656,219] &amp;lt;inf&amp;gt; lwm2m_firmware: Image is confirmed OK
[00:00:00.656,250] &amp;lt;inf&amp;gt; app_lwm2m_client: Connecting to network.
[00:00:00.656,250] &amp;lt;inf&amp;gt; app_lwm2m_client: This may take several minutes.
[00:00:02.647,430] &amp;lt;dbg&amp;gt; app_lwm2m_client: lwm2m_lte_reg_handler_notify: LTE NW status: 2
[00:00:02.647,491] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/0, buf:0x20025aff, len:1
[00:00:04.201,141] &amp;lt;dbg&amp;gt; app_lwm2m_client: lwm2m_lte_reg_handler_notify: LTE NW status: 1
[00:00:04.202,148] &amp;lt;inf&amp;gt; app_lwm2m_client: Connected to LTE network
[00:00:04.202,301] &amp;lt;inf&amp;gt; app_lwm2m_client: Client connect to server
[00:00:04.202,362] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Start LWM2M Client: urn:imei:350457793131176
[00:00:04.202,880] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 1
[00:00:04.203,308] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 6
[00:00:04.203,369] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x2001f358, buflen:4
[00:00:04.203,399] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/0/0, level 3, buf:0x2001f378, buflen:2
[00:00:04.203,460] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: RD Client started with endpoint &amp;#39;urn:imei:350457793131176&amp;#39; with client lifetime 43260 using server object 0
[00:00:04.203,521] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_parse_peerinfo: Parse url: coap://leshan.eclipseprojects.io
[00:00:04.204,711] &amp;lt;inf&amp;gt; app_lwm2m_client: LwM2M is connecting to server
[00:00:04.244,934] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/4, buf:0x20012c9a, len:13
[00:00:04.245,025] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/7, buf:0x20012f3a, len:14
[00:00:04.245,086] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/3, buf:0x20013172, len:18
[00:00:04.245,147] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/8, buf:0x20025b7c, len:4
[00:00:04.245,178] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/9, buf:0x20025b7e, len:2
[00:00:04.245,239] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/10, buf:0x20025b7e, len:2
[00:00:04.245,300] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/12, buf:0x20025b7e, len:2
[00:00:04.282,653] &amp;lt;inf&amp;gt; net_lwm2m_engine: Connected, sock id 2
[00:00:04.283,233] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x2001f328, buflen:4
[00:00:04.283,691] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: sm_send_registration: registration sent [23.97.187.154]
[00:00:04.284,942] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 8
[00:00:04.293,304] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/2, buf:0x20025bd6, len:2
[00:00:04.434,417] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: do_registration_reply_cb: Registration callback (code:2.1)
[00:00:04.435,272] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x2001f190, buflen:4
[00:00:04.435,882] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Registration complete
[00:00:04.436,035] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Registration Done (EP=&amp;#39;I9vE74GufA&amp;#39;)
[00:00:04.436,187] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_udp_receive: reply 0x2000d1d0 handled and removed
[00:00:04.436,248] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 9
[00:00:04.436,889] &amp;lt;inf&amp;gt; app_lwm2m_client: LwM2M is connected to server
[00:00:04.436,920] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x200213f8, buflen:4
[00:00:04.437,042] &amp;lt;inf&amp;gt; app_lwm2m_client: Obtained date-time from modem
[00:00:04.437,103] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/13, buf:0x2001fa9c, len:4
[00:00:34.284,973] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 9
[00:00:34.285,034] &amp;lt;inf&amp;gt; lwm2m_rai: RAI enabled
[00:00:34.285,034] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Queue mode RX window closed
[00:01:01.033,020] &amp;lt;inf&amp;gt; app_lwm2m_client: Modem Enter PSM, time 46769950
[01:00:04.434,570] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 10
[01:00:04.434,661] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Registration update started
[01:00:04.535,064] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 11
[01:00:04.535,095] &amp;lt;dbg&amp;gt; net_lwm2m_engine: lwm2m_engine_connection_resume: Resume suspended connection
[01:00:04.535,644] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x2001f330, buflen:4
[01:00:04.535,797] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: sm_send_registration: registration sent [23.97.187.154]
[01:00:04.535,919] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 12
[01:00:04.625,549] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/2, buf:0x20025bd6, len:2
[01:00:06.455,169] &amp;lt;err&amp;gt; net_lwm2m_engine: Poll reported a socket error, 08.
[01:00:06.455,200] &amp;lt;err&amp;gt; net_lwm2m_rd_client: RD Client socket error: 5
[01:00:06.455,596] &amp;lt;inf&amp;gt; lwm2m_rai: RAI disabled
[01:00:06.455,596] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Registration update failure!
[01:00:06.455,657] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 18
[01:00:06.455,688] &amp;lt;err&amp;gt; net_lwm2m_rd_client: sm_do_network_error, retries 0
[01:00:06.456,329] &amp;lt;err&amp;gt; net_lwm2m_engine: Cannot connect UDP (-114)
[01:00:06.456,604] &amp;lt;err&amp;gt; net_lwm2m_rd_client: Failed to start socket -114
[01:00:06.457,122] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Stop LWM2M Client: urn:imei:350457793131176
[01:00:06.457,183] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 17
[01:00:06.457,672] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 0
[01:00:06.459,228] &amp;lt;inf&amp;gt; app_lwm2m_client: Client connect to server
[01:00:06.459,259] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Start LWM2M Client: urn:imei:350457793131176
[01:00:06.459,381] &amp;lt;dbg&amp;gt; app_lwm2m_client: lwm2m_lte_reg_handler_notify: LTE NW status: 2
[01:00:06.459,625] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 1
[01:00:06.459,838] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 6
[01:00:06.459,869] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x2001f358, buflen:4
[01:00:06.459,930] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/0/0, level 3, buf:0x2001f378, buflen:2
[01:00:06.459,991] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: RD Client started with endpoint &amp;#39;urn:imei:350457793131176&amp;#39; with client lifetime 43260 using server object 0
[01:00:06.460,052] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_parse_peerinfo: Parse url: coap://leshan.eclipseprojects.io
[01:00:06.460,327] &amp;lt;inf&amp;gt; app_lwm2m_client: LwM2M is connecting to server
[01:00:06.460,479] &amp;lt;err&amp;gt; net_lwm2m_message_handling: Unable to resolve address
[01:00:06.460,479] &amp;lt;err&amp;gt; net_lwm2m_rd_client: Cannot init LWM2M engine (-2)
[01:00:06.460,845] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 18
[01:00:06.460,845] &amp;lt;err&amp;gt; net_lwm2m_rd_client: sm_do_network_error, retries 0
[01:00:07.460,815] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 18
[01:00:07.460,876] &amp;lt;err&amp;gt; net_lwm2m_rd_client: sm_do_network_error, retries 0
[01:00:07.461,029] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 6
[01:00:07.461,059] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x2001f358, buflen:4
[01:00:07.461,120] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/0/0, level 3, buf:0x2001f378, buflen:2
[01:00:07.461,181] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: RD Client started with endpoint &amp;#39;urn:imei:350457793131176&amp;#39; with client lifetime 43260 using server object 0
[01:00:07.461,242] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_parse_peerinfo: Parse url: coap://leshan.eclipseprojects.io
[01:00:07.461,547] &amp;lt;err&amp;gt; net_lwm2m_message_handling: Unable to resolve address
[01:00:07.461,547] &amp;lt;err&amp;gt; net_lwm2m_rd_client: Cannot init LWM2M engine (-2)
[01:00:07.461,914] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 18
[01:00:07.461,944] &amp;lt;err&amp;gt; net_lwm2m_rd_client: sm_do_network_error, retries 1
[01:00:08.462,890] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 18
[01:00:08.462,951] &amp;lt;err&amp;gt; net_lwm2m_rd_client: sm_do_network_error, retries 1
[01:00:08.463,256] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 6
[01:00:08.463,287] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x2001f358, buflen:4
[01:00:08.463,317] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/0/0, level 3, buf:0x2001f378, buflen:2
[01:00:08.463,378] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: RD Client started with endpoint &amp;#39;urn:imei:350457793131176&amp;#39; with client lifetime 43260 using server object 0
[01:00:08.463,439] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_parse_peerinfo: Parse url: coap://leshan.eclipseprojects.io
[01:00:08.463,745] &amp;lt;err&amp;gt; net_lwm2m_message_handling: Unable to resolve address
[01:00:08.463,745] &amp;lt;err&amp;gt; net_lwm2m_rd_client: Cannot init LWM2M engine (-2)
[01:00:08.463,958] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 18
[01:00:08.464,019] &amp;lt;err&amp;gt; net_lwm2m_rd_client: sm_do_network_error, retries 2
[01:00:08.520,477] &amp;lt;dbg&amp;gt; app_lwm2m_client: lwm2m_lte_reg_handler_notify: LTE NW status: 1
[01:00:08.520,660] &amp;lt;inf&amp;gt; app_lwm2m_client: LwM2M is connecting to server
[01:00:08.563,659] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/4, buf:0x20012c9a, len:13
[01:00:08.563,720] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/7, buf:0x20012f3a, len:14
[01:00:08.563,781] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/3, buf:0x20013172, len:18
[01:00:08.563,812] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/8, buf:0x20025b7c, len:4
[01:00:08.563,873] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/9, buf:0x20025b7e, len:2
[01:00:08.563,903] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/10, buf:0x20025b7e, len:2
[01:00:08.563,934] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/12, buf:0x20025b7e, len:2
[01:00:08.564,117] &amp;lt;inf&amp;gt; app_lwm2m_client: Obtained date-time from modem
[01:00:08.564,178] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/13, buf:0x20025b14, len:4
[01:00:10.464,965] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 18
[01:00:10.465,026] &amp;lt;err&amp;gt; net_lwm2m_rd_client: sm_do_network_error, retries 2
[01:00:10.465,332] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 6
[01:00:10.465,362] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x2001f358, buflen:4
[01:00:10.465,393] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/0/0, level 3, buf:0x2001f378, buflen:2
[01:00:10.465,454] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: RD Client started with endpoint &amp;#39;urn:imei:350457793131176&amp;#39; with client lifetime 43260 using server object 0
[01:00:10.465,515] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_parse_peerinfo: Parse url: coap://leshan.eclipseprojects.io
[01:00:10.466,613] &amp;lt;inf&amp;gt; net_lwm2m_engine: Connected, sock id 2
[01:00:10.467,163] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x2001f328, buflen:4
[01:00:10.467,620] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: sm_send_registration: registration sent [23.97.187.154]
[01:00:10.468,780] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 8
[01:00:12.172,027] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: do_registration_reply_cb: Registration callback (code:2.1)
[01:00:12.173,004] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x2001f190, buflen:4
[01:00:12.174,285] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Registration complete
[01:00:12.174,438] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Registration Done (EP=&amp;#39;qtLEAQMa6z&amp;#39;)
[01:00:12.174,591] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_udp_receive: reply 0x2000d1d0 handled and removed
[01:00:12.174,652] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 9
[01:00:12.175,262] &amp;lt;inf&amp;gt; app_lwm2m_client: LwM2M is connected to server
[01:00:12.175,323] &amp;lt;inf&amp;gt; app_lwm2m_client: Obtained date-time from modem
[01:00:12.175,384] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/13, buf:0x2001fa9c, len:4
[01:00:40.468,353] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 9
[01:00:40.468,414] &amp;lt;inf&amp;gt; lwm2m_rai: RAI enabled
[01:00:40.468,414] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Queue mode RX window closed
[01:01:08.709,533] &amp;lt;inf&amp;gt; app_lwm2m_client: Modem Enter PSM, time 50369950&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If someone would be willing to test this with a thingy91 in a different country, we would be grateful, although it is really starting to look like it might be specific to our local Network Provider or something like that.&lt;/p&gt;
&lt;p&gt;We will now start experimenting some more with PSM (haven&amp;#39;t really been using eDRX) and will contact our network provider.&lt;/p&gt;
&lt;p&gt;Thanks for investigating some more&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/485796?ContentTypeID=1</link><pubDate>Fri, 24 May 2024 11:33:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:014ea468-18ab-4e78-9594-25c3c4d99b3f</guid><dc:creator>SeppoTakalo</dc:creator><description>&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/pastedimage1716550104484v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried to ask modem guys about this highlighted part.&lt;/p&gt;
&lt;p&gt;Their answer is that network is rejecting the re-attach after the sleep. There is nothing the modem can do, other than full handshake. But it looks like network induced issue.&lt;br /&gt;&lt;br /&gt;This is not really anymore my expertise by I would try to evaluate different PSM and eDRX configurations if you can find a combination that does not cause network to drop the modem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/485420?ContentTypeID=1</link><pubDate>Wed, 22 May 2024 12:42:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8d63389-6095-48d9-8ccf-7186ae401d0c</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;Thank you Seppo&lt;/p&gt;
&lt;p&gt;We will start investigating network timeouts and resume testing with other servers then. I will let you know as soon as we learn the cause of the error.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the corresponding modem trace anyway&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/202405221431_5F00_2h_5F00_probable_5F00_socket_5F00_error_5F00_recovery_5F00_wo_5F00_decryption.pcapng"&gt;devzone.nordicsemi.com/.../202405221431_5F00_2h_5F00_probable_5F00_socket_5F00_error_5F00_recovery_5F00_wo_5F00_decryption.pcapng&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/485396?ContentTypeID=1</link><pubDate>Wed, 22 May 2024 12:01:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0ceed8b-449a-4184-a771-5860d4396956</guid><dc:creator>SeppoTakalo</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;net_lwm2m_engine: Poll reported a socket error, 08.
app_lwm2m_client: lwm2m_lte_reg_handler_notify: LTE NW status: 2
net_lwm2m_engine: Cannot connect UDP (-114)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;These all are indications that modem has lost the network connection.&lt;/p&gt;
&lt;p&gt;Usually then network is lost, poll() returns POLLERR for the socket. This is because sockets are tied to specific PDN on the modem, so when PDN is lost, socket is lost too.&lt;/p&gt;
&lt;p&gt;Same indication is from the lte_reg_handler&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	/**
	 * Not registered, but UE is currently trying to attach or searching for an operator to
	 * register to.
	 */
	LTE_LC_NW_REG_SEARCHING			= 2,&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So the network is lost and modem is searching the network.&lt;/p&gt;
&lt;p&gt;The UDP erro -114 is&amp;nbsp;ENETUNREACH from the same reason, network is lost.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So try to find the reason why the LTE connection is lost. This does not seem LwM2M issue anymore.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/485355?ContentTypeID=1</link><pubDate>Wed, 22 May 2024 10:16:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c30803bc-bbfd-4817-9b21-20b0dddf951d</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;Hi Seppo&lt;/p&gt;
&lt;p&gt;So we implemented the State Machine change (Unlock instead of trigger Network_error) and the device no longer performs full reregistrations. It does recover from the UDP -114 Error without a full reregistration, however, the Error seems to happen every time.&lt;/p&gt;
&lt;p&gt;Until I can provide the Modemtrace, here&amp;#39;s the device log:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[02:00:09.449,005] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3316/0/5700, buf:0x2002f5e0, len:8
Battery voltage is 2958 mV

[02:00:11.433,258] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/7, buf:0x2002f614, len:4
[02:00:16.004,730] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: generate_notify_message: [AUTO] NOTIFY MSG START: 3316/0/5700(3) token:&amp;#39;fd5aea5ae5863ebe&amp;#39; [34.65.106.240] 7216004
[02:00:16.006,530] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: generate_notify_message: NOTIFY MSG: SENT
[02:00:16.006,713] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 9
[02:00:16.019,042] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Registration update started
[02:00:16.119,598] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 11
[02:00:16.119,628] &amp;lt;dbg&amp;gt; net_lwm2m_engine: lwm2m_engine_connection_resume: Resume suspended connection
[02:00:16.120,208] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x20028d78, buflen:4
[02:00:16.120,361] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: sm_send_registration: registration sent [34.65.106.240]
[02:00:16.129,394] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 12
[02:00:16.209,716] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/2, buf:0x2002f61e, len:2
[02:00:17.674,316] &amp;lt;err&amp;gt; net_lwm2m_engine: Poll reported a socket error, 08.
[02:00:17.674,346] &amp;lt;err&amp;gt; net_lwm2m_rd_client: RD Client socket error: 5
[02:00:17.675,140] &amp;lt;inf&amp;gt; lwm2m_rai: RAI disabled
[02:00:17.675,170] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Registration update failure!
[02:00:17.675,201] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 18
[02:00:17.675,231] &amp;lt;err&amp;gt; net_lwm2m_rd_client: sm_do_network_error, retries 0
[02:00:17.675,323] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:0/0/2/0, level 3, buf:0x20028d7b, buflen:1
[02:00:17.677,856] &amp;lt;dbg&amp;gt; app_lwm2m_client: lwm2m_lte_reg_handler_notify: LTE NW status: 2
[02:00:17.758,361] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:0/0/2/0, level 3, buf:0x20028d43, buflen:1
[02:00:17.759,002] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:0/0/2/0, level 3, buf:0x20028d7b, buflen:1
[02:00:17.759,643] &amp;lt;err&amp;gt; net_lwm2m_engine: Cannot connect UDP (-114)
[02:00:17.759,887] &amp;lt;err&amp;gt; net_lwm2m_rd_client: Failed to start socket -114
[02:00:17.760,131] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_pause: lwm2m_rd_client_pause()
[02:00:17.760,162] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Suspend client
[02:00:17.760,192] &amp;lt;inf&amp;gt; lwm2m_rai: RAI enabled
[02:00:17.760,192] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: LwM2M engine suspended
[02:00:17.769,439] &amp;lt;inf&amp;gt; net_lwm2m_engine: LWM2M engine thread paused
[02:00:17.769,470] &amp;lt;inf&amp;gt; app_lwm2m_client: LTE Offline
[02:00:19.589,782] &amp;lt;dbg&amp;gt; app_lwm2m_client: lwm2m_lte_reg_handler_notify: LTE NW status: 1
[02:00:19.589,996] &amp;lt;inf&amp;gt; app_lwm2m_client: Resume LwM2M engine
[02:00:19.590,118] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Resume Client state
[02:00:19.590,423] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 18
[02:00:19.590,423] &amp;lt;err&amp;gt; net_lwm2m_rd_client: sm_do_network_error, retries 1
[02:00:19.593,017] &amp;lt;inf&amp;gt; app_lwm2m_client: LwM2M is connecting to server
[02:00:19.632,507] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/4, buf:0x20015af2, len:13
[02:00:19.632,568] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/7, buf:0x20015d92, len:14
[02:00:19.632,629] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/3, buf:0x20015fca, len:18
[02:00:19.632,690] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/8, buf:0x2002f5c4, len:4
[02:00:19.632,751] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/9, buf:0x2002f5c6, len:2
[02:00:19.632,781] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/10, buf:0x2002f5c6, len:2
[02:00:19.632,812] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:4/0/12, buf:0x2002f5c6, len:2
[02:00:19.632,995] &amp;lt;inf&amp;gt; app_lwm2m_client: Obtained date-time from modem
[02:00:19.633,026] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/13, buf:0x2002f55c, len:4
[02:00:20.590,728] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 18
[02:00:20.590,789] &amp;lt;err&amp;gt; net_lwm2m_rd_client: sm_do_network_error, retries 1
[02:00:20.590,881] &amp;lt;inf&amp;gt; lwm2m_rai: RAI disabled
[02:00:20.590,881] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:0/0/2/0, level 3, buf:0x20028d7b, buflen:1
[02:00:20.660,308] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:0/0/2/0, level 3, buf:0x20028d43, buflen:1
[02:00:20.661,071] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:0/0/2/0, level 3, buf:0x20028d7b, buflen:1
[02:00:20.949,798] &amp;lt;inf&amp;gt; net_lwm2m_engine: Connected, sock id 2
[02:00:20.949,829] &amp;lt;inf&amp;gt; lwm2m_rai: RAI enabled
[02:00:20.949,859] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Registration update started
[02:00:20.950,164] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 11
[02:00:20.950,683] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x20028d78, buflen:4
[02:00:20.950,836] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: sm_send_registration: registration sent [34.65.106.240]
[02:00:20.950,958] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 12
[02:00:21.094,604] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Update callback (code:2.4)
[02:00:21.094,665] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Registration update complete
[02:00:21.094,787] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Update Done
[02:00:21.095,001] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_udp_receive: reply 0x2000e268 handled and removed
[02:00:21.095,062] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 9
[02:00:21.095,855] &amp;lt;inf&amp;gt; app_lwm2m_client: LwM2M is connected to server
[02:00:21.096,038] &amp;lt;inf&amp;gt; app_lwm2m_client: Obtained date-time from modem
[02:00:21.096,069] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/13, buf:0x200294e4, len:4
[02:00:21.253,326] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: notify_message_reply_cb: NOTIFY ACK type:2 code:0.0 reply_token:&amp;#39;fd5aea5ae5863ebe&amp;#39;
[02:00:21.253,540] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_udp_receive: reply 0x2000e250 handled and removed
[02:00:23.953,002] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 9
[02:00:24.096,527] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: lwm2m_rd_client_service: State: 9
[02:00:24.105,651] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Queue mode RX window closed
[02:00:39.437,774] &amp;lt;inf&amp;gt; app_lwm2m_client: Modem Enter PSM, time 50383950
[02:01:05.362,670] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: current client_state: 3
[02:01:05.362,701] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: current retry_state: 100
[02:01:05.362,701] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: last lwm2m_rd_client_event: 10
[02:01:05.362,731] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: last lte_lc_nw_reg_status: 1
[02:01:05.362,762] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: modem_connected_to_network: 1
[02:01:05.362,762] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: current_uptime: 7265362
[02:01:05.362,792] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: ts_last_reg_complete: 15711
[02:01:05.362,823] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: ts_last_reg_timeout: 7217675
[02:01:05.362,823] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: ts_last_reg_update: 7220949
[02:01:05.362,854] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: ts_last_reg_update_complete: 7221094
[02:01:05.362,884] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: ts_last_rx_off: 7224105
[02:01:05.362,915] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: ts_last_engine_suspended: 7217760&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;By the way: I stumbled upon the OMA LwM2M Object 22 (Virtual Observe Notify Object), which would fit our needs. However, it is not implemented in the zephyr client, right? do you know if there is some implementation somewhere or has it become deprecated with the ObserveComposite operation?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/485000?ContentTypeID=1</link><pubDate>Tue, 21 May 2024 08:29:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe366828-14a2-4e7d-8fbd-087c85edecd8</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;Yeah, my mistake, had a mixup with the firmware, devices and the 2 different servers... as you say, the credentials were not correctly defined on the server.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/484996?ContentTypeID=1</link><pubDate>Tue, 21 May 2024 08:08:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8532af0e-c0d4-4982-93ce-c67df5d5a824</guid><dc:creator>SeppoTakalo</dc:creator><description>[quote userid="131108" url="~/f/nordic-q-a/110038/lwm2m-client-registration-sometimes-fails-observers-not-set/484985"]I managed to capture the observer update with wireshark and the joulescope.[/quote]
&lt;p&gt;I don&amp;#39;t think this is a correct capture.&lt;/p&gt;
&lt;p&gt;What I see there in the Wireshark is just two failed DTLS handshakes and some HTTPS traffic from 172.217.168.42 which the device is trying to reply with RST.&lt;/p&gt;
&lt;p&gt;So clearly the device is not registered.&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t know where the TLS/HTTPS traffic is coming from.. has there been FOTA download ongoing and it has not been closed succesfully, or is this some weird form of port scanning.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/484985?ContentTypeID=1</link><pubDate>Tue, 21 May 2024 07:39:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c82a5669-35e6-4806-92ad-a23173004c05</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;Hi Achim&lt;/p&gt;
&lt;p&gt;Thanks for the Input.&lt;/p&gt;
&lt;p&gt;I managed to capture the observer update with wireshark and the joulescope.&lt;/p&gt;
&lt;p&gt;here&amp;#39;s the wireshark capture of the modem trace (Observer update from lines 191 to 204):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/202405210923_5F00_CID_5F00_key_5F00_exchange_5F00_retries_5F00_with_5F00_observer_5F00_update.pcapng"&gt;devzone.nordicsemi.com/.../202405210923_5F00_CID_5F00_key_5F00_exchange_5F00_retries_5F00_with_5F00_observer_5F00_update.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And the joulescope output (Observer update in red):&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt="Update marked in red, periodic modem acitivity marked in green." src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/2024_2D00_05_2D00_21-092614_5F00_cid_5F00_key_5F00_exchange_5F00_joulescope.png" /&gt;&lt;/p&gt;
&lt;p&gt;edit: i think it might be user error, give me a second to investigate. maybe just wrong credentials on platform.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;edit2: yup, my bad. I&amp;#39;ll leave it up in case it helps anyone else.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/484822?ContentTypeID=1</link><pubDate>Fri, 17 May 2024 14:02:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0748396e-4e93-43e0-a364-4e0f46cac04e</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;The capture shows the retransmission of the last client&amp;#39;s flight. For PSK that indicates mostely, that the &amp;quot;pre shared secret&amp;quot; is different. Please check that.&lt;/p&gt;
&lt;p&gt;Sometime it&amp;#39;s even that simple, that one side takes a &amp;quot;hex-string&amp;quot; as text, while the other decode it to binary.&lt;/p&gt;
&lt;p&gt;e.g.&lt;/p&gt;
&lt;p&gt;&amp;quot;abcd&amp;quot; is either&lt;/p&gt;
&lt;p&gt;two bytes 0xab 0xcd or&lt;/p&gt;
&lt;p&gt;four bytes 0x61 0x62 0x63 0x64&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/484821?ContentTypeID=1</link><pubDate>Fri, 17 May 2024 13:52:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a37d295-51f2-4063-ba94-041ecf7e2933</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;So we&amp;#39;ve managed to observe a device just doing a normal registration instead of a full reregistration after 2 hours, which is great.&lt;/p&gt;
&lt;p&gt;On the other hand, we&amp;#39;ve just started to get a weird registration behaviour on multiple of our devices that might be linked to CID.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the trace file:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/202405171546_5F00_CID_5F00_registration_5F00_problems.pcapng"&gt;devzone.nordicsemi.com/.../202405171546_5F00_CID_5F00_registration_5F00_problems.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And the corresponding current measurement:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:205px;max-width:543px;" height="205" src="https://devzone.nordicsemi.com/resized-image/__size/1086x410/__key/communityserver-discussions-components-files/4/pastedimage1715953894361v1.png" width="543" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Seppo or Achim, are you familiar with what is going on?&lt;/p&gt;
&lt;p&gt;Thanks for your continued support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/484752?ContentTypeID=1</link><pubDate>Thu, 16 May 2024 15:29:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5178ee32-45ba-4838-a4b6-5dd7efe52364</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/202405161621_5F00_testserver_5F00_v2.6.0.pcapng"&gt;devzone.nordicsemi.com/.../202405161621_5F00_testserver_5F00_v2.6.0.pcapng&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks Seppo&lt;/p&gt;
&lt;p&gt;I have made a tracefile, but I haven&amp;#39;t had the time to capture a reregistration after the 2h. I hope to get around to that tomorrow.&lt;/p&gt;
&lt;p&gt;Maybe you can find something in this file, else the file tomorrow should be more interesting.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/484639?ContentTypeID=1</link><pubDate>Thu, 16 May 2024 10:07:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ec64577-43a5-48ae-81f9-8d5ba5af4b84</guid><dc:creator>SeppoTakalo</dc:creator><description>&lt;p&gt;I created a PR for these events&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://github.com/nrfconnect/sdk-nrf/pull/15338"&gt;https://github.com/nrfconnect/sdk-nrf/pull/15338&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It is enough that client restarts the LTE when LwM2M engine runs out of retries&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:20:16.631,77] &amp;lt;er&amp;gt; net_lwm2m_engine: Cannot connect UDP (-116)
[00:20:16.632,751] &amp;lt;err&amp;gt; net_lwm2m_rd_client: Cannot init LWM2M engine (-116)
[00:20:16.633,087] &amp;lt;err&amp;gt; net_lwm2m_rd_client: sm_do_network_error, retries 5
uart:~$ [00:20:32.633,392] &amp;lt;err&amp;gt; net_lwm2m_rd_client: sm_do_network_error, retries 5
[00:20:32.633,483] &amp;lt;err&amp;gt; net_lwm2m_rd_client: Network error, max retries reached (6)
[00:20:32.633,514] &amp;lt;err&amp;gt; net_lwm2m_obj_server: No server candidate found
[00:20:32.633,544] &amp;lt;err&amp;gt; app_lwm2m_client: LwM2M engine reported a network error.
[00:20:32.634,307] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Stop LWM2M Client: urn:imei:351358814369747
[00:20:32.634,887] &amp;lt;inf&amp;gt; app_lwm2m_client: LwM2M restart requested. The sample will try to re-establish network connection.
[00:20:33.358,459] &amp;lt;dbg&amp;gt; app_lwm2m_client: lwm2m_lte_reg_handler_notify: LTE NW status: 0
[00:20:34.744,628] &amp;lt;inf&amp;gt; app_lwm2m_client: Connecting to network.
[00:20:34.744,659] &amp;lt;inf&amp;gt; app_lwm2m_client: This may take several minutes.
[00:20:35.888,549] &amp;lt;dbg&amp;gt; app_lwm2m_client: lwm2m_lte_reg_handler_notify: LTE NW status: 2
[00:20:36.616,058] &amp;lt;dbg&amp;gt; app_lwm2m_client: lwm2m_lt_hndler_notify: LTE NW status: 1
[00:20:36.617,126] &amp;lt;inf&amp;gt; app_lwm2m_client: Connected to LTE network
[00:20:36.617,248] &amp;lt;inf&amp;gt; app_lwm2m_client: Client connect to server
[00:20:36.617,309] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Start LWM2M Client: urn:imei:351358814369747
[00:20:36.618,408] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: RD Client started with endpoint &amp;#39;urn:imei:351358814369747&amp;#39; with client lifetime 43200 using server0
[00:20:36.619,171] &amp;lt;inf&amp;gt; app_lwm2m_client: LwM2M is connecting to server
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/484626?ContentTypeID=1</link><pubDate>Thu, 16 May 2024 08:17:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:442b4ae1-f513-469d-aaa0-97a7bb3aaf28</guid><dc:creator>SeppoTakalo</dc:creator><description>[quote userid="131108" url="~/f/nordic-q-a/110038/lwm2m-client-registration-sometimes-fails-observers-not-set/484612"]What&amp;#39;s happening, is that the client times out trying to do the registration update, which triggers the NETWORK_ERROR state:[/quote]
&lt;p&gt;I think this is a bug in the nRF SDK&amp;#39;s LwM2M sample.&lt;/p&gt;
&lt;p&gt;I believe it is not accurately following the state machine described here:&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/connectivity/networking/api/lwm2m.html#lwm2m-engine-and-application-events"&gt;https://docs.zephyrproject.org/latest/connectivity/networking/api/lwm2m.html#lwm2m-engine-and-application-events&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Application should not react to registration timeout as it is something the engine itself should recover.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can you try refactoring the main.c so that for events&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;LWM2M_RD_CLIENT_EVENT_REGISTRATION_FAILURE and LWM2M_RD_CLIENT_EVENT_REG_TIMEOUT&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;just call `k_mutex_unlock(&amp;amp;lte_mutex);` instead of this `state_trigger_and_unclock(NETWORK_ERROR)`&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/484612?ContentTypeID=1</link><pubDate>Thu, 16 May 2024 06:32:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81291063-6a2b-4ef5-8eca-cc41093f142c</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;Hi Seppo&lt;/p&gt;
&lt;p&gt;I let the new application run overnight with a 2h CONFIG_LWM2M_UPDATE_PERIOD with no observers set, and we got full registrations each time.&lt;/p&gt;
[quote userid="97896" url="~/f/nordic-q-a/110038/lwm2m-client-registration-sometimes-fails-observers-not-set/483461"]There is also `net_lwm2m_rd_client: Suspend client`. What is causing those? Current client at lest does suspending when the LTE connection is lost. If this the case? Poor network/antenna? Or different application?[/quote]
&lt;p&gt;What&amp;#39;s happening, is that the client times out trying to do the registration update, which triggers the NETWORK_ERROR state:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	case LWM2M_RD_CLIENT_EVENT_REG_TIMEOUT:
		#if defined(CONFIG_PRIOT_CONNECTION_DEBUGGING)
			ts_last_reg_timeout = k_uptime_get(); 
			last_rd_event = LWM2M_RD_CLIENT_EVENT_REG_TIMEOUT;
		#endif
		LOG_DBG(&amp;quot;Registration update failure!&amp;quot;);
		state_trigger_and_unlock(NETWORK_ERROR);
		break;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Which in turn stops the rd client with lwm2m_rd_client_stop():&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;		case NETWORK_ERROR:
			/* Stop the LwM2M engine. */
			state_trigger_and_unlock(START);
			lwm2m_rd_client_stop(&amp;amp;client, rd_client_event, false);
			
			etc.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This timeout happens after ~1.6 seconds. You can see this in the device logs that record the timestamps (k_uptime_get() in ms) of the last rd_client_events:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[15:00:05.362,670] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: current client_state: 3
[15:00:05.362,731] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: current retry_state: 100
[15:00:05.362,731] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: last lwm2m_rd_client_event: 10
[15:00:05.362,762] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: last lte_lc_nw_reg_status: 1
[15:00:05.362,792] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: modem_connected_to_network: 1
[15:00:05.362,792] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: current_uptime: 54005362
[15:00:05.362,823] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: ts_last_reg_complete: 50451607
[15:00:05.362,854] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: ts_last_reg_timeout: 50447829
[15:00:05.362,854] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: ts_last_reg_update: 50446183
[15:00:05.362,884] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: ts_last_rx_off: 50455087&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So what&amp;#39;s happening is definitely that the registration update times out, triggers the network_error state which restarts the client and modem and triggers a full reregistration.&lt;/p&gt;
&lt;p&gt;Question is now, why that timeout occurs and if it&amp;#39;s too short.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Would a modem trace help?&lt;/p&gt;
&lt;p&gt;I will also test what happens if the device connects after 2h with an observer set, instead of triggering the update with UPDATE_PERIOD.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/483506?ContentTypeID=1</link><pubDate>Wed, 15 May 2024 12:50:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1307c4bd-4bcd-475e-aa44-96b032408919</guid><dc:creator>AlanIoT</dc:creator><description>[quote userid="97896" url="~/f/nordic-q-a/110038/lwm2m-client-registration-sometimes-fails-observers-not-set/483461"]DTLS CID should help this, because just LwM2M Update should refresh the NAT mappings and allow end to end connection.[/quote]
&lt;p&gt;I&amp;#39;m testing this in the next couple of days and will let you know if any problems occur with the updated application. &lt;/p&gt;
&lt;p&gt;I&amp;#39;ll also look into the `net_lwm2m_rd_client: Suspend client` message. Same application, with the same modifications as before. I&amp;#39;ll have a look later.&lt;/p&gt;
&lt;p&gt;Thanks for the insight on the LwM2M engine and the confirmation &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/483461?ContentTypeID=1</link><pubDate>Wed, 15 May 2024 10:48:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc2e4dbc-c104-499f-b924-8699bb01ab80</guid><dc:creator>SeppoTakalo</dc:creator><description>[quote userid="131108" url="~/f/nordic-q-a/110038/lwm2m-client-registration-sometimes-fails-observers-not-set/483453"]With the previous application we also had the error -115 on registration updates, where the device kept falling back to a full re-registration[/quote]
&lt;p&gt;-115 is&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define ENETDOWN 115     /**&amp;lt; Network is down */&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m now unsure if this is caused by actual network problem, or just somehow error coming from DTLS stack when it times out during the handshake.&lt;/p&gt;
&lt;p&gt;The logic on client side is that when CoAP retry does not recover the situation, it&amp;nbsp; needs to tear down the DTLS session and start from full handshake. If the issue was just NAT timeout, then this resolves the situation. DTLS CID should help this, because just LwM2M Update should refresh the NAT mappings and allow end to end connection.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;There is also `net_lwm2m_rd_client: Suspend client`. What is causing those? Current client at lest does suspending when the LTE connection is lost. If this the case? Poor network/antenna? Or different application?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="131108" url="~/f/nordic-q-a/110038/lwm2m-client-registration-sometimes-fails-observers-not-set/483453"]Now, observing all the resources individually, they start to diverge after a day or week or month and instead of the ~7 observed values being sent at once, the device sends one value, ends transmission, drops connection and then immediately starts a new connection to send the next value. [/quote]
&lt;p&gt;I see the problem.&lt;/p&gt;
&lt;p&gt;Composite observation would be the answer.&lt;/p&gt;
&lt;p&gt;This is really an issue on how the Zephyr&amp;#39;s LwM2M engine is designed. Each observation have their individual timestamps. Technically it is correct, but for better energy use the timestamp accuracy should be lower, meaning there is some granularity, so that timestamps with same pMax would trigger on same timestamp, instead of 1 second apart. I think this should be reported to Zephyr side. Someone might be able to work on this in the future.&lt;/p&gt;
&lt;p&gt;Regarding the Observer-Composite, at least the current Leshan should support it. I have already tested this&lt;/p&gt;
&lt;p&gt;&lt;a id="i1" href="https://github.com/zephyrproject-rtos/zephyr/blob/main/tests/net/lib/lwm2m/interop/README.md"&gt;https://github.com/zephyrproject-rtos/zephyr/blob/main/tests/net/lib/lwm2m/interop/README.md&lt;/a&gt;&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;LightweightM2M-1.1-int-304 - Observe-Composite Operation&lt;/td&gt;
&lt;td&gt;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/2705.svg" title="White check mark"&gt;&amp;#x2705;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LightweightM2M-1.1-int-305 - Cancel Observation-Composite Operation&lt;/td&gt;
&lt;td&gt;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/2705.svg" title="White check mark"&gt;&amp;#x2705;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LightweightM2M-1.1-int-308 - Observe-Composite and Creating Object Instance&lt;/td&gt;
&lt;td&gt;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/2705.svg" title="White check mark"&gt;&amp;#x2705;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/64634" data-hovercard-type="issue" data-hovercard-url="/zephyrproject-rtos/zephyr/issues/64634/hovercard"&gt;&lt;del&gt;#64634&lt;/del&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LightweightM2M-1.1-int-309 - Observe-Composite and Deleting Object Instance&lt;/td&gt;
&lt;td&gt;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/2705.svg" title="White check mark"&gt;&amp;#x2705;&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/64634" data-hovercard-type="issue" data-hovercard-url="/zephyrproject-rtos/zephyr/issues/64634/hovercard"&gt;&lt;del&gt;#64634&lt;/del&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LightweightM2M-1.1-int-310 - Observe-Composite and modification of parameter values&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If your server does not support it, then I would recommend to use LwM2M SEND and have the triggering logic on device side. It is true, that it is less flexible, but it still straight forward to implement, and leads to best energy efficiency. There is also a hack (can be enabled by Kconfig) that allows skipping the LwM2M Update when sending data. Some servers seem to support this, at least when DTLS CID is used.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;config LWM2M_QUEUE_MODE_NO_MSG_BUFFERING
	bool &amp;quot;Disable buffering notifications and messages on queue mode&amp;quot;
	select EXPERIMENTAL
	help
	  Messages are sent right away instead of waiting for next registration update.
	  This might not be supported on all servers.&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/483453?ContentTypeID=1</link><pubDate>Wed, 15 May 2024 09:50:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27976ce3-5711-4aa8-929e-b014ef9d7d6c</guid><dc:creator>AlanIoT</dc:creator><description>&lt;p&gt;Thank you for looking further into the issue, Seppo&lt;/p&gt;
&lt;p&gt;I have finally had the time to update the application, which is now running on MFW v1.3.6 and SDK v2.6.0.&lt;/p&gt;
&lt;p&gt;CID is looking good, energy consumption is down by quite a bit. I have also not encountered the Issue above, but I have also not really been able to test the issue specifically.&lt;/p&gt;
&lt;p&gt;With the previous application we also had the error -115 on registration updates, where the device kept falling back to a full re-registration. It happened very often for devices with a registration update time of 2, 3, 4, 5 and 6 hours (did not test lower intervals). I hope this will be fixed with the new client with CID and will keep you updated. See the following device log of a device with a 6h registration update time:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[06:00:35.228,607] &amp;lt;inf&amp;gt; app_lwm2m_client: Obtained date-time from modem
[06:00:35.228,668] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/13, buf:0x2003184c, len:4
[06:00:35.795,104] &amp;lt;err&amp;gt; net_lwm2m_engine: Cannot connect UDP (-115)
[06:00:35.796,447] &amp;lt;err&amp;gt; net_lwm2m_rd_client: Failed to update registration. Falling back to full registration
[06:00:36.296,691] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Suspend client
[06:00:36.296,722] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: LwM2M engine suspended
[06:00:36.306,579] &amp;lt;inf&amp;gt; net_lwm2m_engine: LWM2M engine thread paused
[06:00:36.306,610] &amp;lt;inf&amp;gt; app_lwm2m_client: Resume LwM2M engine
[06:00:36.306,671] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Resume Client state
[06:00:36.306,762] &amp;lt;inf&amp;gt; net_lwm2m_engine: LWM2M engine thread resume
[06:00:36.306,793] &amp;lt;inf&amp;gt; app_lwm2m_client: LwM2M is connecting to server
[06:00:36.307,067] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:0/0/1/0, level 3, buf:0x2002b167, buflen:1
[06:00:36.307,128] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:0/0/10/0, level 3, buf:0x2002b196, buflen:2
[06:00:36.307,159] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x2002b150, buflen:4
[06:00:36.307,250] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: RD Client started with endpoint &amp;#39;urn:imei:350457793131259&amp;#39; with client lifetime 25200
[06:00:36.307,312] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_parse_peerinfo: Parse url: coaps://prod.lwm2m.measuremind.ch
[06:00:36.397,644] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:0/0/2/0, level 3, buf:0x2002b0e3, buflen:1
[06:00:36.479,431] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:0/0/2/0, level 3, buf:0x2002b0ab, buflen:1
[06:00:36.898,773] &amp;lt;inf&amp;gt; net_lwm2m_engine: Connected, sock id 0
[06:00:36.899,444] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x2002b100, buflen:4
[06:00:36.900,756] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: sm_send_registration: registration sent [34.65.106.240]
[06:00:37.099,670] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: do_registration_reply_cb: Registration callback (code:2.1)
[06:00:37.099,731] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Registration complete
[06:00:37.099,792] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Registration Done (EP=&amp;#39;ahL2AsEXDu&amp;#39;)
[06:00:37.099,975] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_udp_receive: reply 0x20015674 handled and removed
[06:00:37.100,128] &amp;lt;inf&amp;gt; app_lwm2m_client: LwM2M is connected to server
[06:00:37.100,189] &amp;lt;inf&amp;gt; app_lwm2m_client: Obtained date-time from modem
[06:00:37.100,250] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3/0/13, buf:0x2002b7dc, len:4
[06:00:37.402,221] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Registration update started
[06:00:37.903,015] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_get: path:1/0/1/0, level 3, buf:0x2002b110, buflen:4
[06:00:37.903,106] &amp;lt;dbg&amp;gt; net_lwm2m_rd_client: sm_send_registration: registration sent [34.65.106.240]
[06:00:38.160,186] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Update callback (code:2.4)
[06:00:38.160,247] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Registration update complete
[06:00:38.160,278] &amp;lt;inf&amp;gt; net_lwm2m_rd_client: Update Done
[06:00:38.160,430] &amp;lt;dbg&amp;gt; net_lwm2m_message_handling: lwm2m_udp_receive: reply 0x20015674 handled and removed
[06:00:42.404,296] &amp;lt;dbg&amp;gt; app_lwm2m_client: rd_client_event: Queue mode RX window closed
[06:01:00.259,613] &amp;lt;inf&amp;gt; hw_watchdog: feeding hw_watchdog
[06:01:06.260,772] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: current client_state: 3
[06:01:06.260,803] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: current retry_state: 101
[06:01:06.260,803] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: last lwm2m_rd_client_event: 10
[06:01:06.260,833] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: last lte_lc_nw_reg_status: 1
[06:01:06.260,833] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: modem_connected_to_network: 1
[06:01:06.260,864] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: current_uptime: 21666260
[06:01:06.260,894] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: ts_last_reg_complete: 21637099
[06:01:06.260,925] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: ts_last_reg_update: 21637402
[06:01:06.260,925] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: ts_last_reg_update_complete: 21638160
[06:01:06.260,955] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: ts_last_rx_off: 21642404
[06:01:06.260,955] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: ts_last_engine_suspended: 21636296
[06:01:06.261,016] &amp;lt;dbg&amp;gt; app_lwm2m_client: debug_connection_work_cb: after_last_mutex: 21637100
--- 1 messages dropped ---
The circuit board temperature value is: 26.116197

[06:01:25.242,431] &amp;lt;dbg&amp;gt; net_lwm2m_registry: lwm2m_engine_set: path:3303/0/5518, buf:0x20031840, len:8&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I know that LwM2M is specifically meant for such applications, but still I don&amp;#39;t find it very intuitive how to best handle our requirements. So here is another more general and only semi-related question that I hope you can answer for me:&lt;/p&gt;
&lt;p&gt;We have various different sensors whose data we want to periodically send to the platform. Battery voltage, temperature, humidity, a different voltage sensor, RSS etc.&lt;/p&gt;
&lt;p&gt;Ideally, we send a message every 12 hours (pmax) containing all that information. If the temperature value crosses a certain threshold (gt), we want to start sending every 2 hours (pmin).&lt;/p&gt;
&lt;p&gt;Now, observing all the resources individually, they start to diverge after a day or week or month and instead of the ~7 observed values being sent at once, the device sends one value, ends transmission, drops connection and then immediately starts a new connection to send the next value. So we end up with ~7 times the energy consumption if all 7 resources are sent individually. At least that is the behaviour we have observed in the past.&lt;/p&gt;
&lt;p&gt;I am aware of the ObserveComposite functionality, which should solve exactly that Problem, right? However, I&amp;#39;m not sure that our server supports the function.&lt;/p&gt;
&lt;p&gt;So: Is ObserveComposite the only way to accomplish this behaviour, or is there a way to configure the observed resources to just send their data whenever a connection is already established?&lt;/p&gt;
&lt;p&gt;If ObserveComposite is not an option, the three possibilities I see are:&lt;/p&gt;
&lt;p&gt;1. Using a ReadComposite request on registration update --&amp;gt; higher energy consumption than necessary and chance to fail on restrictive PSM uptime. Logic on device, less flexible&lt;/p&gt;
&lt;p&gt;2. Using the Send operation to send all the required resources --&amp;gt; Logic on device, less flexible&lt;/p&gt;
&lt;p&gt;3. &amp;quot;Hacking&amp;quot; LwM2M and making a custom object with only the required resources and Observing the entire Object --&amp;gt; Logic on server, flexible, very ugly&lt;/p&gt;
&lt;p&gt;I guess my question is, if there is a way to make the resources &amp;quot;piggy back&amp;quot; off of an already established connection and not triggering immediate connections a few seconds later as a consequence?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll of course see if I can get ObserveComposite to work, but I feel like, since LwM2M (correct me if I&amp;#39;m wrong) targets constrained devices with limited battery life, that I&amp;#39;m missing something. Shouldn&amp;#39;t it be the default or easier to configure this &amp;quot;piggy back&amp;quot; functionality, or is it just a feature that made it into the protocol a bit later with the ObserveComposite function?&lt;/p&gt;
&lt;p&gt;Sorry about the rant, but I hope you understand what I&amp;#39;m saying &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LwM2M client: registration SOMETIMES fails; observers not set.</title><link>https://devzone.nordicsemi.com/thread/482555?ContentTypeID=1</link><pubDate>Wed, 08 May 2024 14:01:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d432f8b9-c26d-403f-8b6c-c991b7b9ed62</guid><dc:creator>SeppoTakalo</dc:creator><description>&lt;p&gt;&lt;span&gt;When LwM2M client goes into Queue mode, it stops listening, and assumes that all NAT mappings have been timed out (which happens in 30 seconds of idle period on networks that I have tested).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When it resumes, there is differences:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;If&amp;nbsp;&lt;/span&gt;CONFIG_LWM2M_TLS_SESSION_CACHING=y then it opens a new DTLS session by trying Session resumption first, and silently drops into full DTLS handshake if the resumption fails. Effect of this option that you save probably 1-2 UDP packets during the DTLS handshake.&lt;/li&gt;
&lt;li&gt;If DTLS CID is used, then same DTLS session is kept, no new handshakes. Server learns the new IP address as it sees a familiar DTLS Connection ID.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I don&amp;#39;t think there is issues on server side regarding this. Leshan have supported CID and Session resumption quite some time already.&lt;/p&gt;
&lt;p&gt;I assumed originally that DTLS session caching was not enabled, but I believe it is. It does not much help in this situation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>