<?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>DTLS minimum handshake timeout</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/122457/dtls-minimum-handshake-timeout</link><description>Hi 
 It seems that the default minium DTLS handshake timeout is about 1 second. That means, there is a retransmission if a response isn&amp;#39;t received within this timeout. In NB-IoT/LTE-M this leads to many unnecessary retransmission: 
 
 The server is configured</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 28 Aug 2025 10:36:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/122457/dtls-minimum-handshake-timeout" /><item><title>RE: DTLS minimum handshake timeout</title><link>https://devzone.nordicsemi.com/thread/547063?ContentTypeID=1</link><pubDate>Thu, 28 Aug 2025 10:36:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c169d48-dd48-4736-8bec-c49a7dd272d6</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;The secure socket (TLS/DTLS) API is part of the LTE modem. This handles re-transmissions inside the modem. From our documentation:&lt;/p&gt;
&lt;div&gt;What is TLS_DTLS_HANDSHAKE_TIMEOUT_MIN compared to NRF_SO_SEC_DTLS_HANDSHAKE_TIMEO?&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;&lt;span&gt;TLS_DTLS_HANDSHAKE_TIMEOUT_MIN is a Zephyr generic TLS socket option that sets the minimum DTLS handshake retransmission timeout (in milliseconds). It works with TLS_DTLS_HANDSHAKE_TIMEOUT_MAX; the handshake timeout starts at min and doubles on each retry until max is reached (&lt;a href="https://docs.nordicsemi.com/bundle/zephyr-apis-latest/page/group_secure_sockets_options.html#ga29b47e8798b71f5444f1899343ceefd8" rel="noopener noreferrer" target="_blank"&gt;TLS_DTLS_HANDSHAKE_TIMEOUT_MIN&lt;/a&gt;).&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span&gt;NRF_SO_SEC_DTLS_HANDSHAKE_TIMEO is an nRF modem–specific socket option (NRF_SOL_SECURE) that sets the total DTLS handshake timeout (including retransmissions) using fixed, allowed values in seconds: 0, 1, 3, 7, 15, 31, 63, 123 (Zephyr alias: TLS_DTLS_HANDSHAKE_TIMEO) (&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/nrf_modem/doc/sockets/socket_options_func.html#socket_options" rel="noopener noreferrer" target="_blank"&gt;Socket options&lt;/a&gt;;&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/zephyr-apis-latest/page/socket_ncs_8h.html#a7a70eab72ecbabde5452cef5782e3dd2" rel="noopener noreferrer" target="_blank"&gt;TLS_DTLS_HANDSHAKE_TIMEO&lt;/a&gt;).&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;TLS_DTLS_HANDSHAKE_TIMEOUT_MAX is the Zephyr generic TLS socket option that sets the maximum DTLS handshake retransmission timeout (in milliseconds). Together with TLS_DTLS_HANDSHAKE_TIMEOUT_MIN, the timeout starts at MIN and doubles on each retransmission until MAX is reached (time unit: ms) (&lt;a href="https://docs.nordicsemi.com/bundle/zephyr-apis-latest/page/group_secure_sockets_options.html#ga91ab7d4f0753af71380b6d69b0cd0804" rel="noopener noreferrer" target="_blank"&gt;TLS_DTLS_HANDSHAKE_TIMEOUT_MAX&lt;/a&gt;;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://docs.nordicsemi.com/bundle/zephyr-apis-latest/page/group_secure_sockets_options.html#ga29b47e8798b71f5444f1899343ceefd8" rel="noopener noreferrer" target="_blank"&gt;TLS_DTLS_HANDSHAKE_TIMEOUT_MIN&lt;/a&gt;).&lt;/div&gt;
&lt;div&gt;This contrasts with the nRF modem–specific NRF_SO_SEC_DTLS_HANDSHAKE_TIMEO (Zephyr alias TLS_DTLS_HANDSHAKE_TIMEO), which sets a single total handshake timeout in seconds with fixed allowed values (0, 1, 3, 7, 15, 31, 63, 123) (&lt;a href="https://docs.nordicsemi.com/bundle/zephyr-apis-latest/page/socket_ncs_8h.html#a7a70eab72ecbabde5452cef5782e3dd2" rel="noopener noreferrer" target="_blank"&gt;socket_ncs.h TLS_DTLS_HANDSHAKE_TIMEO&lt;/a&gt;;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/nrf_modem/doc/sockets/socket_options_func.html#socket_options" rel="noopener noreferrer" target="_blank"&gt;Modem socket options&lt;/a&gt;).&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;In short: TLS_DTLS_HANDSHAKE_TIMEOUT_MIN/MAX control per-retry backoff (ms) in Zephyr’s generic TLS; NRF_SO_SEC_DTLS_HANDSHAKE_TIMEO sets a single total handshake timeout (s) for nRF modem sockets with predefined values.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;The nRF Connect SDK &lt;a href="https://docs.nordicsemi.com/bundle/ncs-3.1.0/page/nrfxlib/nrf_modem/doc/sockets.html"&gt;Networking Sockets, designed for nRF91-series, is part of the Modem Library&lt;/a&gt;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;
&lt;p&gt;The values in &lt;a title="https://docs.nordicsemi.com/bundle/nrfxlib-apis-latest/page/group_nrf_socket_so_sec_handshake_timeouts.html#details" href="https://docs.nordicsemi.com/bundle/nrfxlib-apis-latest/page/group_nrf_socket_so_sec_handshake_timeouts.html#details" rel="noopener noreferrer" target="_blank"&gt;https://docs.nordicsemi.com/bundle/nrfxlib-apis-latest/page/group_nrf_socket_so_sec_handshake_timeo…&lt;/a&gt; are valid configuration to socket option NRF_SO_SEC_DTLS_HANDSHAKE_TIMEO. This means timeout value for complete DTLS handshake.&lt;/p&gt;
&lt;p&gt;Supported DTLS total handshake timeouts are 1 s, 3 s, 7 s, 15 s, 31 s, 63 s and 123.&amp;nbsp;&lt;span&gt;DTLS handshake timeout is a requirement from Verizon Network.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In LTE-M:&lt;/p&gt;
&lt;p&gt;If application configures maximum DTLS handshake timeout to 15 sec, MFW uses DTLS re-transmission timeouts 1 s, 2 s, 4 s, 8 s = 15 s&lt;/p&gt;
&lt;p&gt;In NB-Iot:&lt;/p&gt;
&lt;p&gt;If application configures maximum DTLS handshake timeout to 63 sec, MFW uses DTLS re-transmission timeouts 4 s, 8 s, 16 s, 32 s = 60 s&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;Let me know if anything is unclear based on this.&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTLS minimum handshake timeout</title><link>https://devzone.nordicsemi.com/thread/546712?ContentTypeID=1</link><pubDate>Tue, 26 Aug 2025 07:22:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c344467-49a6-4060-abd0-dad135929cc8</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;With the satellite ambitions this topic will get important as well. Unless Nordic&amp;#39;s plan is not to support DTLS for NTN.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTLS minimum handshake timeout</title><link>https://devzone.nordicsemi.com/thread/546706?ContentTypeID=1</link><pubDate>Tue, 26 Aug 2025 07:07:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54dd9111-5393-4cac-86ec-ebee3c86e46e</guid><dc:creator>samuel4</dc:creator><description>&lt;p&gt;I also think that the effort isn&amp;#39;t too high. You already have a hard coded 1s minimum timeout that must be changed. A further reason to change this is that you can align to zephyr&amp;#39;s socket API. Right now, there is&amp;nbsp;the nrf socket option&lt;br /&gt;-&amp;nbsp;&lt;span&gt;NRF_SO_SEC_DTLS_HANDSHAKE_TIMEO&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;and zephyr&amp;#39;s socket options&lt;/p&gt;
&lt;p&gt;-&amp;nbsp;&lt;span&gt;TLS_DTLS_HANDSHAKE_TIMEOUT_MIN&lt;br /&gt;&lt;/span&gt;&lt;span&gt;-&amp;nbsp;TLS_DTLS_HANDSHAKE_TIMEOUT_MAX&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;which is pretty annoying, when the same code base&amp;nbsp;is used with different hardware architectures.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTLS minimum handshake timeout</title><link>https://devzone.nordicsemi.com/thread/544512?ContentTypeID=1</link><pubDate>Mon, 04 Aug 2025 17:01:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:472ad4dd-6080-4e29-8d30-e143bee2394b</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;&amp;gt;&amp;nbsp;We are also aware that 1s timeout for re-transmission in DTLS handshake is not optimal and leads to re-transmissions.&lt;/p&gt;
&lt;p&gt;Yes.&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;nbsp;There just never hasn&amp;#39;t been time to optimize it.&lt;/p&gt;
&lt;p&gt;The configuration parameters are already available in mbedTLS, so the work to do is mainly to add them to the socket option API.&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;nbsp;Also the RFC doesn&amp;#39;t take into account low bandwidth technologies such as NB-IoT.&lt;/p&gt;
&lt;p&gt;The RFC is from 2012, AFAIK, NB-IoT was in 2012 just not available.&lt;/p&gt;
&lt;p&gt;Even more, the IETF tls working group focus mainly on &amp;quot;web-usage&amp;quot; and that causes then recommendations as this 1s. The RFC refers to considering congestion and concludes, that for the web-usage, 1s will be better suited than 3s.&lt;/p&gt;
&lt;p&gt;Under normal signal conditions, and maybe using PSK and not x509, that may also apply for modem communication. Means, it causes some retransmission, but doesn&amp;#39;t harm more. But with low signals (that&amp;#39;s the domain of NB-IoT), that may change and cause the handshake even to fail, especially with the more data of x509.&lt;/p&gt;
&lt;p&gt;So all in all, maybe someone from your modem/dtls team has a look at that and is able to estimate, how much that additional socket option will cost. And then we will see, if that gets implemented once upon a day.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTLS minimum handshake timeout</title><link>https://devzone.nordicsemi.com/thread/544474?ContentTypeID=1</link><pubDate>Mon, 04 Aug 2025 13:34:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdf0aedc-3f3a-4874-8808-4007ed76fbc5</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/samuel4"&gt;samuel4&lt;/a&gt;&amp;nbsp;thanks for your patience. Our team provided the following answer:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;NRF_SO_SEC_DTLS_HANDSHAKE_TIMEO is a configurable timeout for the whole handshake.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For example if DTLS total timeout is 15 s then timeouts are 1 s, 2 s, 4 s, and 8 s.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We are also aware that 1s timeout for re-transmission in DTLS handshake is not optimal and leads to re-transmissions. There just never hasn&amp;#39;t been time to optimize it. Also the RFC doesn&amp;#39;t take into account low bandwidth technologies such as NB-IoT.&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTLS minimum handshake timeout</title><link>https://devzone.nordicsemi.com/thread/540745?ContentTypeID=1</link><pubDate>Fri, 27 Jun 2025 14:45:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62fbcd1a-09d4-4af6-adc2-a629c1e5f54f</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;&amp;quot;work week 32&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/samuel4"&gt;samuel4&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just in the case you&amp;#39;re interested in testing, if other timings changes the behavior relevant, you may do some tests with &lt;a href="https://github.com/boaks/zephyr-coaps-client"&gt;my client&lt;/a&gt;&amp;nbsp;in the meantime.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTLS minimum handshake timeout</title><link>https://devzone.nordicsemi.com/thread/540743?ContentTypeID=1</link><pubDate>Fri, 27 Jun 2025 14:42:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17ae9d06-63b0-449b-96f5-8e30ed9d84fa</guid><dc:creator>Achim Kraus</dc:creator><description>[quote userid="91135" url="~/f/nordic-q-a/122457/dtls-minimum-handshake-timeout/540562"]To ensure, we&amp;#39;re all talking about the same: Here is the DTLS RFC about the retransmission scheme:[/quote]
&lt;p&gt;Yes, that&amp;#39;s the timer values I&amp;#39;m talking about. But, I&amp;#39;m not a developer of mbedtls nor a Nordic employee, but I&amp;#39;m the project lead of eclipse/californium and I implemented the retransmission mechanism and configuration for Californium/Scandium. Mainly as outcome of some first NB-IoT experience a couple of years ago. I&amp;#39;m also a committer of Eclipse/tinydtls and so I use that for my own zephyr client in order to adjust the timers in a way adapted for NB-IoT.&lt;/p&gt;
&lt;p&gt;About mbedtls there may be others more common and experienced, I just checked the mbedtls examples and that points to&amp;nbsp;&amp;quot;void mbedtls_ssl_conf_handshake_timeout(mbedtls_ssl_config *conf, uint32_t min, uint32_t max);&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTLS minimum handshake timeout</title><link>https://devzone.nordicsemi.com/thread/540692?ContentTypeID=1</link><pubDate>Fri, 27 Jun 2025 10:36:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c54bbda-3b42-4828-bc22-3badb286a7d2</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello again,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;our team informs me that due to high work load and vacation time they are not able to provide an answer to you until work week 32.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Will get back to you when we have an answer.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTLS minimum handshake timeout</title><link>https://devzone.nordicsemi.com/thread/540682?ContentTypeID=1</link><pubDate>Fri, 27 Jun 2025 09:14:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b28a26b-2fe5-4d80-9490-151699346ca0</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hi Samuel, I have forwarded this discussion internally and will update as soon as I have more feedback.&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTLS minimum handshake timeout</title><link>https://devzone.nordicsemi.com/thread/540562?ContentTypeID=1</link><pubDate>Thu, 26 Jun 2025 09:25:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d3ce488-0cbe-4ef6-aa8b-7cacf9898077</guid><dc:creator>samuel4</dc:creator><description>&lt;p&gt;Agreed, I will look into this, too. Right now, I focus on the first handshake after the modem is registered to network.&lt;/p&gt;
&lt;p&gt;To ensure, we&amp;#39;re all talking about the same: Here is the DTLS RFC about the retransmission scheme:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://datatracker.ietf.org/doc/html/rfc6347#section-4.2.4.1"&gt;https://datatracker.ietf.org/doc/html/rfc6347#section-4.2.4.1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;They suggest a initial handshake timeout of 1 second &amp;quot;in order to improve latency for time-sensitive applications&amp;quot;. However that&amp;#39;s barely the case in NB-IoT. I don&amp;#39;t think it&amp;#39;s a good choice at the nRF91. Because of this short timeout I see avoidable retransmission on almost every handshake.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/oys"&gt;Øyvind&lt;/a&gt;&amp;nbsp;Could you check if I missed such a socket open etc. or if you plan to implement it? The best solution in my point of view would be implementing the existing zephyr socket options:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://docs.zephyrproject.org/3.7.0/connectivity/networking/api/sockets.html#c.TLS_DTLS_HANDSHAKE_TIMEOUT_MIN"&gt;BSD Sockets &amp;mdash; Zephyr Project Documentation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Samuel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTLS minimum handshake timeout</title><link>https://devzone.nordicsemi.com/thread/540531?ContentTypeID=1</link><pubDate>Thu, 26 Jun 2025 05:50:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2a0f32f-deb0-40ca-ae4b-4750eda842ab</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;I missed one important point about the start of the timeout:&lt;/p&gt;
&lt;p&gt;For the initial communication, it works fine to send the first message after the network registration.&lt;/p&gt;
&lt;p&gt;But for &amp;quot;follow up messages&amp;quot; during PSM sleep, it&amp;#39;s changing. Here it takes from 0.5s up to 10s (and more, especially for NB-IoT) to be able to transmit the message. If then a new handshake gets required, the timeouts needs to consider that. Otherwise it just &amp;quot;queues&amp;quot; the Client_Hello and flash them after getting connected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTLS minimum handshake timeout</title><link>https://devzone.nordicsemi.com/thread/540389?ContentTypeID=1</link><pubDate>Tue, 24 Jun 2025 17:18:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9421197a-cb49-4185-bf0d-80e20f307c51</guid><dc:creator>Achim Kraus</dc:creator><description>[quote userid="91135" url="~/f/nordic-q-a/122457/dtls-minimum-handshake-timeout/540370"]I don&amp;#39;t want to change anything in network registration process or similar. [/quote]
&lt;p&gt;The point will be, that the time for that handshake retransmission timeout needs to start once the modem is registered and RRC active. That doesn&amp;#39;t change the &amp;quot;process&amp;quot; it just starts the timer, when the transport will be really available.&lt;/p&gt;
&lt;p&gt;mbedtls itself uses&lt;/p&gt;
&lt;p&gt;&amp;quot;void mbedtls_ssl_conf_handshake_timeout(mbedtls_ssl_config *conf, uint32_t min, uint32_t max);&amp;quot;&lt;/p&gt;
&lt;p&gt;with the initial timeout in &amp;quot;min&amp;quot;.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know, If that is mapped to the modem&amp;#39;s mbedtls socket opts. I don&amp;#39;t use the DTLS implementation of the modem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTLS minimum handshake timeout</title><link>https://devzone.nordicsemi.com/thread/540370?ContentTypeID=1</link><pubDate>Tue, 24 Jun 2025 14:54:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1cf38570-9209-4686-a19f-45398faf8b62</guid><dc:creator>samuel4</dc:creator><description>&lt;p&gt;Surely, I want to increase the initial timeout in the handshake, only. I don&amp;#39;t want to change anything in network registration process or similar. The handshake timeouts also belong to a different domain: In mbedTLS there is a statemachine that retransmits the current handshake packet (client hello, client key exchange...) after the minimum timeout. This timeout is doubled on each retry until the timeout reaches its maximum. A similar statemachine is likely to run in the modem firmware. And I really hope that this timeouts aren&amp;#39;t hard coded, but configuable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTLS minimum handshake timeout</title><link>https://devzone.nordicsemi.com/thread/540364?ContentTypeID=1</link><pubDate>Tue, 24 Jun 2025 14:24:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:608bbce6-5a3c-4cfa-9904-dbf0a888a480</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;To be frank:&lt;/p&gt;
&lt;p&gt;Extending the initial timeouts for the &amp;quot;network registration&amp;quot; or &amp;quot;TAU&amp;quot; times, isn&amp;#39;t a that good idea either ;-).&lt;/p&gt;
&lt;p&gt;For cellular, a initial timeout of 3s does a better job, but it needs to start after registration and RRC active.&lt;/p&gt;
&lt;p&gt;Otherwise you will need a timeout, which includes/covers those network times as well, e.g. 15s. But that comes then with other downs, You will find that out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTLS minimum handshake timeout</title><link>https://devzone.nordicsemi.com/thread/540355?ContentTypeID=1</link><pubDate>Tue, 24 Jun 2025 13:56:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96fc348d-264a-4af8-af6b-6e2ee94eda44</guid><dc:creator>samuel4</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I am using&amp;nbsp;mfw_nrf91x1_2.0.2 modem firmware version and a modifed coap sample with CONFIG_NET_SOCKETS_OFFLOAD=y.&lt;/p&gt;
&lt;p&gt;In my understanding, mbedTLS is linked and used with the application, but works in conjuntion with the modem. I don&amp;#39;t use the mbedTLS implementation provided by zephyr, which is fully configurable, but does not use any hardware acceleration.&lt;/p&gt;
&lt;p&gt;To clarify the problem: There is no problem with CID or established connections at all. But when I open the socket and connect to the server, the device is not patient and retransmit messages every second:&lt;/p&gt;
&lt;p&gt;The handshake starts with:&lt;/p&gt;
&lt;p&gt;Client Hello&lt;/p&gt;
&lt;p&gt;Hello Verify Request&lt;/p&gt;
&lt;p&gt;Client Hello&lt;/p&gt;
&lt;p&gt;So far so good. After 1.5 seconds the server reponds with Server Hello. Meanwhile the Client suggested that the packet was lost and has retransmitted the Client Hello message. That&amp;#39;s why there you see two Sever Hello. And that&amp;#39;s also why there are three Certificate, Client Key Exchange... and three Change Cipher Spec... messages. The reason is, that the client retransmits messages after 1 second of timeout in the DTLS handshake.&lt;/p&gt;
&lt;p&gt;In mbedTLS this can be configured using the&amp;nbsp;&lt;code&gt;mbedtls_ssl_conf_handshake_timeout&lt;/code&gt; function. In Zephyr you can use setsockopt(sock, SOL_TLS,&amp;nbsp;TLS_DTLS_HANDSHAKE_TIMEOUT_MIN, min_hs_timeout_ms). But I don&amp;#39;t find any option for offloaded sockets. I could use zephyr&amp;#39;s mbedTLS with CONFIG_MBEDTLS_BUILTIN and do DLTS in software, but it probably will be much slower.&lt;/p&gt;
&lt;p&gt;We will use CID in the end and there will be only few handshakes, but: Retransmitting delayed (but successful transmitted) packets lead to even more packets and roundtrips in the handshake. On one hand this consumes more energy, on the other hand it increases the risk of handshake failure in bad cellular coverage. Therefore there should be an option for the minimum retransmission timeout like mbedTLS and Californium offer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Samuel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTLS minimum handshake timeout</title><link>https://devzone.nordicsemi.com/thread/540270?ContentTypeID=1</link><pubDate>Tue, 24 Jun 2025 07:46:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0abd4871-0600-469f-a669-d9dc743e5632</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hi Samuel,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you please provide more information on the DTLS solution that you are using? You are not using mbedTLS? What modem FW are you running on your device?&lt;/p&gt;
&lt;p&gt;Looking through our documentation, there should be a socket option called SO_KEEPOPEN that will keep DTLS CID enabled sessions during network outages, i.e. from&amp;nbsp;nrfxlib/nrf_modem/include/nrf_socket.h: &lt;em&gt;Keep socket open when its PDN connection is lost.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Does this provide any solution to your issue?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>