<?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>DFU with a compressed LZ4 file</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86879/dfu-with-a-compressed-lz4-file</link><description>Hello! 
 
 I am working on a FOTA solution for the nRF52DK, I have followed this example: https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/ncs-dfu 
 The FOTA works using the nRF Device Manager application and a binary image</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Apr 2022 20:19:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86879/dfu-with-a-compressed-lz4-file" /><item><title>RE: DFU with a compressed LZ4 file</title><link>https://devzone.nordicsemi.com/thread/365040?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2022 20:19:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc1703e5-88c3-4fc1-8873-c38ef61e0f1b</guid><dc:creator>Markus Arnoldsson</dc:creator><description>&lt;p&gt;Do you mean that I can remove the call for this function completely or keep the byte array in here? The byte array depends on everything in the function so in that case&amp;nbsp;nothing can be removed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with a compressed LZ4 file</title><link>https://devzone.nordicsemi.com/thread/365036?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2022 19:54:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80d353d1-0857-4893-bdf5-a69e2dbc0b50</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;I don&amp;#39;t think you need any of that. Later in the manager only the byte array is sent. Try commenting out everything that&amp;#39;s not relevant to byte array with file content.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with a compressed LZ4 file</title><link>https://devzone.nordicsemi.com/thread/365032?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2022 19:06:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58cad3ec-aec8-4d42-bc57-7a12c960acc1</guid><dc:creator>Markus Arnoldsson</dc:creator><description>&lt;p&gt;Hi again, I looked into the manager.start function in Firmware Upgrade Manager which looks as follows:&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1650999755061v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The line in the for loop calls for fromBytes() function, which I belive is the issue, this looks as follows:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1650999842073v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;As you can see, many function in here for example getHash() will return error.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How should I go by changing this function in order to not ruin the image information being sent through DFU?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with a compressed LZ4 file</title><link>https://devzone.nordicsemi.com/thread/365015?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2022 16:30:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24c30564-2126-47a9-91b0-8149977d5169</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Perhaps you need to modify the library as well. Just follow the rabbit. Just check where it crashes and try work around.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with a compressed LZ4 file</title><link>https://devzone.nordicsemi.com/thread/365012?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2022 16:23:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5640ebf5-b5cf-43c3-8edc-eb428f8341dc</guid><dc:creator>Markus Arnoldsson</dc:creator><description>&lt;p&gt;Hi again!&lt;/p&gt;
&lt;p&gt;Were you able to find a solution of how to implement LZ4 on the bootloader?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with a compressed LZ4 file</title><link>https://devzone.nordicsemi.com/thread/364494?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2022 13:24:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:048d17d7-06b5-4943-9e8c-15c99c370071</guid><dc:creator>Markus Arnoldsson</dc:creator><description>&lt;p&gt;Hello again. I found the other invalids, I removed all checks except one which I am a little bit confused by, maybe you can help me.&lt;/p&gt;
&lt;p&gt;In ImageUpgradeViewmodel there are two invalid checks:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicSemiconductor/Android-nRF-Connect-Device-Manager/blob/main/sample/src/main/java/io/runtime/mcumgr/sample/viewmodel/mcumgr/ImageUpgradeViewModel.java"&gt;https://github.com/NordicSemiconductor/Android-nRF-Connect-Device-Manager/blob/main/sample/src/main/java/io/runtime/mcumgr/sample/viewmodel/mcumgr/ImageUpgradeViewModel.java&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;They are both in the upgrade() function, in two different try/catch.&lt;/p&gt;
&lt;p&gt;The first one I believe can just be removed by the following:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1650633573844v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The second one however has a function call at the bottom: manager.start(images, eraseSettings) which needs a catch for exception. In the catch it gives out &amp;quot;Invalid image file.&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1650633860798v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure how this check shall be removed, or if it has to do with the bootloader of the MCU (we have not implemented decompression in the bootloader yet).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with a compressed LZ4 file</title><link>https://devzone.nordicsemi.com/thread/364385?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2022 08:06:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6bd5571a-92dd-4d15-872b-b8e39973e794</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Remove the check everywhere you need. The ImageUploadFragment uploads a single bin file, while ImageUpgradeFragment is able to perform the complete DFU with validating, uploading one or more files, sending test/confirm commands and reset, using the FirmwareUpgradeManager.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with a compressed LZ4 file</title><link>https://devzone.nordicsemi.com/thread/364330?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 22:37:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3efaac32-7d3b-47e5-a440-1ea423a2f3db</guid><dc:creator>Markus Arnoldsson</dc:creator><description>&lt;p&gt;Hello I am looking into this solution.&lt;/p&gt;
&lt;p&gt;I tried removing check from ImageUploadFragment but still invalid.&lt;/p&gt;
&lt;p&gt;Noticed now there is also a ImageUpgradeFragment, should I remove check there aswell? Iif so is there a simple way to do it?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicSemiconductor/Android-nRF-Connect-Device-Manager/blob/main/sample/src/main/java/io/runtime/mcumgr/sample/fragment/mcumgr/ImageUpgradeFragment.java"&gt;https://github.com/NordicSemiconductor/Android-nRF-Connect-Device-Manager/blob/main/sample/src/main/java/io/runtime/mcumgr/sample/fragment/mcumgr/ImageUpgradeFragment.java&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicSemiconductor/Android-nRF-Connect-Device-Manager/blob/main/sample/src/main/java/io/runtime/mcumgr/sample/fragment/mcumgr/ImageUploadFragment.java"&gt;https://github.com/NordicSemiconductor/Android-nRF-Connect-Device-Manager/blob/main/sample/src/main/java/io/runtime/mcumgr/sample/fragment/mcumgr/ImageUploadFragment.java&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Appreciate the help &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: DFU with a compressed LZ4 file</title><link>https://devzone.nordicsemi.com/thread/363993?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2022 14:28:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92164b0c-fc69-4d8d-9d59-f0554168f03a</guid><dc:creator>Markus Arnoldsson</dc:creator><description>&lt;p&gt;Thanks that would be great!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with a compressed LZ4 file</title><link>https://devzone.nordicsemi.com/thread/363075?ContentTypeID=1</link><pubDate>Tue, 12 Apr 2022 21:05:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ece83b85-c62b-4944-a084-4c37db1519e2</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The app is checking few first bytes of the binary and it&amp;#39;s expecting to find there a Magic value. If your binary is compressed, encrypted, etc, it will fail and return an error.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I recommend downloading the source code of the app and removing the code with the checks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU with a compressed LZ4 file</title><link>https://devzone.nordicsemi.com/thread/363016?ContentTypeID=1</link><pubDate>Tue, 12 Apr 2022 12:20:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e20efdc7-9c85-4be1-86c1-f7dcdfc9de1c</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi Markus,&lt;/p&gt;
&lt;p&gt;I will check if/how this can be done using the nRF Device Manager.&lt;br /&gt;Since it is Easter, I might not be able to find more until next week. I will return with more information by end of Thrusday next week.&lt;/p&gt;
&lt;p&gt;In the meantime, you could try to use mcumgr to send the image over Bluetooth Low Energy instead?&lt;br /&gt;See the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html"&gt;SMP Server Sample&lt;/a&gt; for how to use this.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>