<?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>TLS 2303 Bytes Packet Limit</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68601/tls-2303-bytes-packet-limit</link><description>I have been testing out HTTPS with the http_application_update . 
 I have been able to successfully setup a TLS 1.2 connection, but I was seeing a lot of &amp;quot;Peer closed connection!&amp;quot; warnings after any request was made over the socket. 
 Swapping the request</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 20 Nov 2020 14:37:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68601/tls-2303-bytes-packet-limit" /><item><title>RE: TLS 2303 Bytes Packet Limit</title><link>https://devzone.nordicsemi.com/thread/281143?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2020 14:37:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60146c82-34de-4afb-b5b0-fdcc223b013b</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi GNotman,&lt;br /&gt;It documented as a limitation in the mfw release notes.&lt;br /&gt;&lt;em&gt;That can be found in the .zip for the modem firmware.&lt;/em&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Limitations
***************
- TLS/DTLS
    - Up to three simultaneous TLS/DTLS connections are possible.
    - Server certificate expiry time is not verified.
    - pkcs#8 is not supported.
    - Absolute maximum number of supported credentials is 32. The actual amount depends on size of
      credentials as memory area reserved for credentials may be a limiting factor as well.
    - DTLS supports PSK authentication only.
    - 2kB secure socket buffer size.
- Maximum number of raw sockets is 4.
- User plane data is supported in Cat M1 mode only.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It is listed 2kB, however 2303 is for the server you are connected to.&amp;nbsp;&lt;br /&gt;There are some variances in overhead for TLS, but documented limit is set to 2kB.&lt;br /&gt;Setting higher could be possible, but is &amp;quot;out of spec&amp;quot; and therefore you could see some issues.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;best regards,&lt;br /&gt;Martin L.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TLS 2303 Bytes Packet Limit</title><link>https://devzone.nordicsemi.com/thread/281107?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2020 13:07:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5598c82-a426-45fe-9dde-7a36464d6452</guid><dc:creator>GNotman</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;Thanks, I understand that I can control the amount of file data requested in the &lt;em&gt;Range&lt;/em&gt; header. I have been able to successfully download the FW file by applying a fragment size limit which leaves enough space for the header.&lt;/p&gt;
&lt;p&gt;However, my main question is what is imposing the 2303 byte limit, and equally important is that limit constant?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TLS 2303 Bytes Packet Limit</title><link>https://devzone.nordicsemi.com/thread/281101?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2020 12:53:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24214eba-29d8-433b-8fc3-fe00020dac08</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi GNotman,&lt;br /&gt;The problem is that the HTTP-header is not a part of &amp;quot;CONFIG_DOWNLOAD_CLIENT_HTTP_FRAG_SIZE_2048&amp;quot;,&lt;/p&gt;
&lt;p&gt;so the fragment at 2048 + the HTTP header will be to big for the modem to receive.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div&gt;Optimally you should use the&amp;nbsp;&lt;em&gt;fragment_size&lt;/em&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/master/include/net/fota_download.h#L106"&gt;https://github.com/nrfconnect/sdk-nrf/blob/master/include/net/fota_download.h#L106&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;And do it dynamically as we do it in e.g. the Azure FOTA Sample:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/master/subsys/net/lib/azure_fota/azure_fota.c#L529"&gt;https://github.com/nrfconnect/sdk-nrf/blob/master/subsys/net/lib/azure_fota/azure_fota.c#L529&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards;&lt;br /&gt;Martin L.&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>