<?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>Memfault certificate challenges on nRF9160</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/104883/memfault-certificate-challenges-on-nrf9160</link><description>Dear support, 
 We have challenges with the Memfault implementation on the nRF9160, we also have questions regarding Memfault on the nRF52833. We are experiencing unknown setbacks with the SSL certificates and authentication process; this is related to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 05 Nov 2023 14:33:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/104883/memfault-certificate-challenges-on-nrf9160" /><item><title>RE: Memfault certificate challenges on nRF9160</title><link>https://devzone.nordicsemi.com/thread/454088?ContentTypeID=1</link><pubDate>Sun, 05 Nov 2023 14:33:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c86a318-0c1d-4b1e-841f-734b9b045a32</guid><dc:creator>Raoul</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;I have now heard back from a developer working on our Memfault integration.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll try to address your issues point by point:&lt;/p&gt;
[quote user=""]However the problem is that the NCS FOTA download start function doesn&amp;#39;t seem to check the validity of the certificate so the first certificate tried is always deemed the right one.&lt;br /&gt; This proved to be the cause of the problem because the first certificate tried is &lt;a href="https://www.amazontrust.com/repository/AmazonRootCA1.pem"&gt;Amazon Root CA 1&lt;/a&gt; which is not valid to obtain connection to the MemFault FOTA server. Looking at the HTTPS certificate MemFault FOTA server on the browser it seemed to be &lt;a href="https://global-root-g2.chain-demos.digicert.com/"&gt;DigiCert Global Root G2&lt;/a&gt; which is the last on the list of certificate to be tried for FOTA connection.&lt;br /&gt; After changing the &lt;strong&gt;memfault-sdk-library&lt;/strong&gt; code to first use certificate &lt;strong&gt;DigiCert Global Root G2&lt;/strong&gt; to start the FOTA connection the FOTA connection was ssuccessfullyestablished. After that we were able to perform a successful FOTA.[/quote]
&lt;p&gt;After testing for themselves, the developer says:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I think we need more details from the customer on what exactly is going wrong here, and preferably a modem trace. When testing, the TLS connection is successful with AWS Root CA 1.&lt;/p&gt;
&lt;p&gt;The TLS stack always checks the validity of the server certificate. The connection would fail if an unrecognized root CA was used.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So if you are able to reproduce the issue, a modem trace would be great.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regarding:&lt;/p&gt;
[quote user=""]However during the FOTA download the connection needed to be reconnected multiple times because of an error (EMSGSIZE) indicating the TLS fragment sent by the MemFault FOTA server is larger than what the modem is able to store in its internal buffers. After a bit of research it seems that modem can only support TLS fragments up to 2 kB in size and not larger.&lt;br /&gt; The solution proposed is to decrease the maximum FOTA server TLS fragment size to work around this constraint. &lt;br /&gt; There doesn&amp;#39;t seem to be a way to configure the FOTA server on our own so we would need your help with this.&lt;br /&gt; Do you know of any other possible solutions to this problem?[/quote]
&lt;p&gt;The dev says:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The only way to increase the TLS fragment size is to run the TLS stack on the application core. That&amp;#39;s possible, but takes up a lot of flash and RAM, and certificates will have to be stored and handled in the application code. I would not recommend that if they can get away with the method described below:&lt;/p&gt;
&lt;p&gt;If they&amp;#39;re using Memfault server for downloads, I don&amp;#39;t think they can configure it in anyway. I&amp;#39;m assuming that the download is done over HTTP, though. Then they can use range requests to limit the size of the TLS fragments. It&amp;#39;s not controlling the TLS fragment size directly, but rather indirectly by limiting the HTTP content length in each response. The downside is that it doesn&amp;#39;t take into account the HTTP header size, which is unknown, so careful tuning of the requested content size is required. Note that this feature is supported already in the download client and can be set using Kconfig options.&amp;nbsp;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]The plan is to test MemFault FOTA tomorrow with the latest &lt;strong&gt;memfault-firmware-sdk&lt;/strong&gt; release &lt;strong&gt;1.3.5&lt;/strong&gt; and see how it behaves.&lt;br /&gt; Can you confirm it is okay to use the latest &lt;strong&gt;memfault-firmware-sdk&lt;/strong&gt; release even though the NCS we are using recommends to use the release &lt;strong&gt;0.43.3&lt;/strong&gt;?[/quote]
&lt;p&gt;According to the dev, you may cherry-pick the commits in: &lt;a title="https://github.com/nrfconnect/sdk-nrf/pull/12254" href="https://github.com/nrfconnect/sdk-nrf/pull/12254" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-nrf/pull/12254&lt;/a&gt;. These should be fine with NCS v2.4.2.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]Can you confirm this and supply us with the working FOTA over BLE sample if it exists.[/quote]
&lt;p&gt;No, we don&amp;#39;t have any code showing how to use Memfault&amp;#39;s own FOTA solution.&lt;/p&gt;
&lt;p&gt;One important thing to note is that FOTA using Memfault is not a feature that Nordic officially supports. It&amp;#39;s a feature in Memfault&amp;#39;s SDK that they have implemented. Nordic has their own FOTA solution, using nRF Cloud. Still, if many customers have issues with integrating Memfault FOTA, I think our developers might have interest in knowing, and taking a closer look.&lt;/p&gt;
&lt;p&gt;But I do recommend checking if Memfault provides some support channel for their FOTA solution.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Raoul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Memfault certificate challenges on nRF9160</title><link>https://devzone.nordicsemi.com/thread/452100?ContentTypeID=1</link><pubDate>Tue, 24 Oct 2023 23:07:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67d359e4-2a37-4b18-b188-4e6a4d58eda7</guid><dc:creator>Raoul</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I apologise for taking longer than usual! For the past few days we&amp;#39;ve been short on people who might handle this sort of case. I&amp;#39;ll try to find someone to answer you as soon as possible.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Raoul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>