<?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>How to send .bin file in custom bootloader?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107230/how-to-send-bin-file-in-custom-bootloader</link><description>Hello everyone! 
 
 I work on custom bootloader over spi. As a starting point I took nrf_dfu_ble example, this tutorial and this example for spis bootloader (I need spi in master mode). With nrfutill I created .zip file with test app I try to understand</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 17 Jan 2024 15:15:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107230/how-to-send-bin-file-in-custom-bootloader" /><item><title>RE: How to send .bin file in custom bootloader?</title><link>https://devzone.nordicsemi.com/thread/464651?ContentTypeID=1</link><pubDate>Wed, 17 Jan 2024 15:15:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d07f406-2ebb-453d-b8a2-3674769ab131</guid><dc:creator>AlexVrubel</dc:creator><description>&lt;p&gt;The initial problem was with displaying the data. Next, write data to a flash drive. Everything works and answering my original question - you need to transfer the raw application bin file. Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send .bin file in custom bootloader?</title><link>https://devzone.nordicsemi.com/thread/463676?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2024 08:46:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10cc7a41-c79c-4477-b6ea-88aa39d8426d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Alex,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m taking over the ticket as I was the one who made the SPI master demo code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;My suggestion is to try DFU a very simple app as small as possible (blink an LED for example) so that the size of the app is as small as possible. I assume you can get to an image with a few kB.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What you can do is to get to understand the protocol is to spy the communication on a successful DFU update. If you use my example as-is can you do a DFU update ? If it doesn&amp;#39;t work out of the box, you can also use nrfutil application to do DFU according to the DFU documentation and the nRFutil documentation:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrfutil/UG/nrfutil/nrfutil_dfu_ble_serial.html?cp=11_8_4"&gt;https://infocenter.nordicsemi.com/topic/ug_nrfutil/UG/nrfutil/nrfutil_dfu_ble_serial.html?cp=11_8_4&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The DFU protocol is described here:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_dfu_transport_serial.html?cp=9_1_3_5_2_3"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_dfu_transport_serial.html?cp=9_1_3_5_2_3&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can start with UART and after you are familiar with UART you can&amp;nbsp;switch to SPI.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send .bin file in custom bootloader?</title><link>https://devzone.nordicsemi.com/thread/463403?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2024 15:46:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bbf009a-c910-4a27-9712-a855b933f90b</guid><dc:creator>AlexVrubel</dc:creator><description>&lt;p&gt;Hello, thanks for reply.&lt;/p&gt;
&lt;p&gt;Already done this steps, prefer handlers and etc. So I have to send raw .bin file or should make some preprocess of it?&lt;/p&gt;
&lt;p&gt;Now the sequence is as follows:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;0601            // NRF_DFU_OP_OBJECT_SELECT
01018D000000    // NRF_DFU_OP_OBJECT_CREATE - 141 bytes len of .dat file for validation
020000          // NRF_DFU_OP_RECEIPT_NOTIF_SET - ??? from ble_dfu example
0840080110341a0281..... // NRF_DFU_OP_OBJECT_WRITE - write 141 bytes of .dat file
03              // NRF_DFU_OP_CRC_GET
04              // NRF_DFU_OP_OBJECT_EXECUTE
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Apps validates. Then I send:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;020C00          // NRF_DFU_OP_RECEIPT_NOTIF_SET
0602            // NRF_DFU_OP_OBJECT_SELECT
0102001000000   // NRF_DFU_OP_OBJECT_CREATE - create 4096 (one page) object&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And then I try to understand how exactly I should parse and send .bin file of application? Should I encrypt it or add crc or something else? Should be something like in SPIS example:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;083a30323030303030.... // My app begins with 3a 30 32 30 30 30 30 30&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send .bin file in custom bootloader?</title><link>https://devzone.nordicsemi.com/thread/463371?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2024 14:09:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:668efe91-ff25-416e-ad76-771a401481bf</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please refer to the d&lt;span&gt;ocumentation for SPI DFU Master:&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4431.DFU_5F00_SPI_5F00_readme.docx"&gt;DFU_SPI_readme.docx&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>