<?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>Reconnect to LWM2M server that has restarted</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84789/reconnect-to-lwm2m-server-that-has-restarted</link><description>I have a project with a nRF9160 and using its LTE modem to connect to a LWM2M server, based on the eclipse Leshan. I am using the lwm2m_rd_client. I have noticed some problems when the server has restarted. If the server restarts the connection seems</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Feb 2022 15:58:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84789/reconnect-to-lwm2m-server-that-has-restarted" /><item><title>RE: Reconnect to LWM2M server that has restarted</title><link>https://devzone.nordicsemi.com/thread/353434?ContentTypeID=1</link><pubDate>Wed, 16 Feb 2022 15:58:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fa023ed-e50d-45c6-aa2a-b6a2b17b62d3</guid><dc:creator>Achim Kraus</dc:creator><description>[quote userid="108025" url="~/f/nordic-q-a/84789/reconnect-to-lwm2m-server-that-has-restarted/353421#353421"]I am not too familiar with TLS, [/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;That&amp;#39;s DTLS (1.2) &lt;a href="https://datatracker.ietf.org/doc/html/rfc6347"&gt;RFC6347&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The nasty point is, assuming ip-address spoofing, the server should really just ignore the message. That have been discussed so often in the last years in Eclipse/Californium, I don&amp;#39;t want to repeat my self too often. So just read the last one &lt;a href="https://github.com/eclipse/californium/issues/1879"&gt;NAK when DTLS session isn&amp;#39;t recognized&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Eclipse/Californium is able to do a&amp;nbsp;&lt;a href="https://github.com/eclipse/californium/tree/master/demo-apps/cf-extplugtest-server#benchmarks---dtls-graceful-restart"&gt;DTLS graceful restart&lt;/a&gt; . AFAIK, leshan has not implemented it in their (demo-)server. Even with just the dtls stuff, it would then be possible, to send back a error-response.&lt;/p&gt;
&lt;p&gt;My experience using Eclipse/Californium with DTLS 1.2 CID, graceful restart and cid-load-balancing is very, very promising. Unfortunately, it seems, that I&amp;#39;m the only one, who believes that &amp;quot;strong enough to move the mountains&amp;quot; ;-). Hope I can polish my tinydtls client-cid zephyr example for the thingy 91, publish it Q2 (or Q3, depending on other jobs) and we see, if someone else get convinced. That is limited to CoAP, so for LwM2M it may take some additional time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reconnect to LWM2M server that has restarted</title><link>https://devzone.nordicsemi.com/thread/353421?ContentTypeID=1</link><pubDate>Wed, 16 Feb 2022 14:59:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7db0420d-9ed6-4c48-81e8-28d125baff85</guid><dc:creator>AndreasPettersson</dc:creator><description>&lt;p&gt;Yes I use coaps.&lt;br /&gt;&lt;br /&gt;Hmm, yeah I mean, the server is restarted so that is reasonable, that we have lost the DTLS context.&amp;nbsp;I am not too familiar with TLS, and the Leshan server, but is it common for servers to ignore requests if the client has not done a TLS handshake? Or should my server actually respond with something, some error, like &amp;quot;missing TLS...&amp;quot;? And in that case, would the modem forward that in some way to the lwm2m_engine so that we could react to it?&lt;/p&gt;
&lt;p&gt;/Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reconnect to LWM2M server that has restarted</title><link>https://devzone.nordicsemi.com/thread/353416?ContentTypeID=1</link><pubDate>Wed, 16 Feb 2022 14:48:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b35e09f2-448e-4ea8-844a-d1315bbfb196</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;Do you use coaps/dtls?&lt;/p&gt;
&lt;p&gt;If so, then Eclipse/Leshan may has lost the DTLS context and so the request is ignored, if no new dtls handshake is used.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>