<?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: How to split and send the firmware image?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17837/dfu-how-to-split-and-send-the-firmware-image</link><description>Hello, 
 I&amp;#39;m developing firmware for a BLE central that performs a DFU on another NRF target. Right now I&amp;#39;m at the point where I need to start sending the firmware image part by part using the DFU packet characteristic. 
 My idea is that the BLE central</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 30 Nov 2016 15:08:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17837/dfu-how-to-split-and-send-the-firmware-image" /><item><title>RE: DFU: How to split and send the firmware image?</title><link>https://devzone.nordicsemi.com/thread/68737?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2016 15:08:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36aa3bb0-3f13-445b-a607-793177072682</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;I figured it out by looking at &lt;a href="https://github.com/NordicSemiconductor/Android-DFU-Library/blob/9cd78d010a38cf13743d9c9160d7e2336c8f9bd4/dfu/src/main/java/no/nordicsemi/android/dfu/internal/ArchiveInputStream.java"&gt;this file&lt;/a&gt; and &lt;a href="https://github.com/NordicSemiconductor/Android-DFU-Library/blob/9cd78d010a38cf13743d9c9160d7e2336c8f9bd4/dfu/src/main/java/no/nordicsemi/android/dfu/internal/HexInputStream.java"&gt;this file&lt;/a&gt;. Thanks for your support!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU: How to split and send the firmware image?</title><link>https://devzone.nordicsemi.com/thread/68736?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2016 14:20:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c49125b7-138f-41b1-ad38-106af4cfe527</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Im not a Java guy either, but according to our Android developer it is as simple as reading 20 bytes at the time from the bin file( I am assuming that this will be stored in flash on the nRF51), sending them and then read the next 20 bytes untill you reach the end. Doing this with hex files is another matter as you need to understand the Intelhex format.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU: How to split and send the firmware image?</title><link>https://devzone.nordicsemi.com/thread/68735?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2016 12:48:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c42f315-0797-42cb-9339-3a7dd31cb81a</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;By the way, I don&amp;#39;t know a thing about Java and I can&amp;#39;t find mFirmwareStream anywhere :/&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU: How to split and send the firmware image?</title><link>https://devzone.nordicsemi.com/thread/68734?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2016 12:41:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d50ecfd-d454-4ff4-aaa1-229a3d40dbe8</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;I found this project: &lt;a href="http://git.panaceas.org/cgit.cgi/nRF51/nrfdfu/tree/"&gt;git.panaceas.org/.../&lt;/a&gt;
Apparently it implements the DFU service in C, but it&amp;#39;s poorly documented. If I figure how to decompose the bin file, I&amp;#39;ll let you know :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU: How to split and send the firmware image?</title><link>https://devzone.nordicsemi.com/thread/68733?ContentTypeID=1</link><pubDate>Wed, 30 Nov 2016 12:39:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23a3b7f3-26ad-4228-afa0-795918822775</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;Hi Bjorn, thanks for coming back to this! I checked the function you suggested, and I get it, but the thing that I&amp;#39;m missing is how this part works:  &lt;code&gt;mFirmwareStream.read(buffer);&lt;/code&gt; I want to know how to decompose the bin/hex file into several &amp;quot;buffers&amp;quot; so that I can then send them to the DFU packet characteristic&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU: How to split and send the firmware image?</title><link>https://devzone.nordicsemi.com/thread/68732?ContentTypeID=1</link><pubDate>Mon, 28 Nov 2016 11:55:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f76d9506-6bf1-44a9-9c23-6005481c8a22</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Andy, have you made any progress? I suggest that you take a look at the uploadFirmwareImage function in the Android DFU library, &lt;a href="https://github.com/NordicSemiconductor/Android-DFU-Library/blob/9cd78d010a38cf13743d9c9160d7e2336c8f9bd4/dfu/src/main/java/no/nordicsemi/android/dfu/BaseCustomDfuImpl.java"&gt;here&lt;/a&gt; is the link.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU: How to split and send the firmware image?</title><link>https://devzone.nordicsemi.com/thread/68731?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2016 15:03:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:994c6ad6-8aac-4581-8ee2-fd2b32ecfcd5</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;Ok, I&amp;#39;ll also look into it. Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU: How to split and send the firmware image?</title><link>https://devzone.nordicsemi.com/thread/68730?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2016 15:01:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af772dc6-2ac0-44bd-928e-e9c57be6b1c6</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Ok, I understand.  My answer is still the same, we have not implemented a DFU controller on a nRF5x device( except our nRF OpenMesh, but its not using our DFU service), so my best advice would be to see how its done in the DFU libraries. I will also look into how this could be implemented, but it won&amp;#39;t be able to come back to you before sometime next week.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU: How to split and send the firmware image?</title><link>https://devzone.nordicsemi.com/thread/68729?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2016 14:49:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8111ece-8336-4f84-96b1-4aa8bd1cc11c</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;Hi Bjorn, you got everything right but the smartphone part. I have a processor running Linux and an nRF51822, that I use for BLE, on the same board. I want the processor to send the image to the nRF via UART, so that I can then perform the DFU on nearby devices. I can understand most of the DFU process with the documentation, but I don&amp;#39;t understand the actual image transmission part.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU: How to split and send the firmware image?</title><link>https://devzone.nordicsemi.com/thread/68728?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2016 14:20:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:510c89dc-67e6-4816-931f-442e4d0444f8</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Andy,&lt;/p&gt;
&lt;p&gt;if I understood you correctly, you have a nRF51822 that acts as a central. This central will receive the firmware image from a 3rd party( e.g. a Smartphone?) and update another nRF51822. If this is the case, then I am afraid that we do not have any example showing how to update a nRF5x device with another nRF5x device via DFU as this is usually done with a smartphone as the central, and not a nRF5x device.&lt;/p&gt;
&lt;p&gt;However, I would recommend that you take a look at our DFU libraries for iOS or Android and see how they send the firmware image 20 bytes at the time. You can find the DFU libraries on GitHub, &lt;a href="https://github.com/NordicSemiconductor/IOS-Pods-DFU-Library"&gt;here&lt;/a&gt; is the link for the iOS library and &lt;a href="https://github.com/NordicSemiconductor/Android-DFU-Library"&gt;here&lt;/a&gt; is the link for the Android library.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>