<?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>Problems in transfer of a firmware image</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71858/problems-in-transfer-of-a-firmware-image</link><description>Hi All, 
 I have transferred an init packet and now prepare to transfer a firmware image. 
 Both central master and peripheral are nrf52840. 
 However, I have two questions. 
 1.When I send create command{0x01,0x02,0xb8,0xb9},I get {0x60,0x01,0x04} which</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 09 Mar 2021 03:26:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71858/problems-in-transfer-of-a-firmware-image" /><item><title>RE: Problems in transfer of a firmware image</title><link>https://devzone.nordicsemi.com/thread/298550?ContentTypeID=1</link><pubDate>Tue, 09 Mar 2021 03:26:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:653b3f83-70fd-433b-8c90-e8ede3d2e28b</guid><dc:creator>lolifrog</dc:creator><description>&lt;p&gt;I have successfully transferred the&lt;span&gt;&amp;nbsp;firmware image.Now I am glad to share my experience.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Background&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1.Both central master and&amp;nbsp;peripheral&amp;nbsp;are nRF52840 devices. SDK: nRF5_SDK_16.0.0&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2.Init packet and firmware image&amp;nbsp;are stored in central master.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3.Central master can find DFU service&amp;nbsp;and its characteristics from the peripheral as below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you can find DFU service but can&amp;#39;t find any&amp;nbsp;characteristics, &lt;span style="color:#ff0000;"&gt;m&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;aybe you need to change the characteristic UUID(128 bits) in your application and bootloader programs to ensure that both service and characteristics&amp;nbsp;are based on the same 128 bits UUID.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/960x720/__key/communityserver-discussions-components-files/4/pastedimage1615254515179v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Prepare to enter&amp;nbsp;bootLoader&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;1.Enable indications.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can&amp;nbsp;refer to this :&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/71069/how-to-enable-indication-and-get-cccd-value-to-check"&gt;How to enable indications&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2.Sending 0x01 to&amp;nbsp;&lt;span&gt;Buttonless DFU without bonds characteristic(0x03).&lt;/span&gt;The&amp;nbsp;&lt;span&gt;peripheral will restart and MAC address + 1&amp;nbsp;if&amp;nbsp;entering bootloader.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Transfer init packet and firmware image&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1.Transfer init packet&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can&amp;nbsp;refer to&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/50438/init-packet"&gt;How to transfer init packet&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Flib_dfu_transport_ble.html&amp;amp;cp=7_5_0_3_5_2_2"&gt;Transfer of an init packet&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;.dat file will be transfered.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2.Transfer firmware image&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Flib_dfu_transport_ble.html&amp;amp;cp=7_5_0_3_5_2_2"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can&lt;/span&gt;&lt;span&gt;&amp;nbsp;refer to&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Flib_dfu_transport_ble.html&amp;amp;cp=7_5_0_3_5_2_2"&gt;Transfer of a firmware image&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;.bin file will be transfered.The flow chart is as follows&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/960x720/__key/communityserver-discussions-components-files/4/pastedimage1615259159600v2.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;tips:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1.Enable notification to check return code.&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. .bin file size is bigger than the maximum object size.&lt;/span&gt;&lt;span&gt;Therefore,if the image size is 10 kB and the maximum object size is 4 kB, 3 data objects must be transferred.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems in transfer of a firmware image</title><link>https://devzone.nordicsemi.com/thread/298284?ContentTypeID=1</link><pubDate>Mon, 08 Mar 2021 09:28:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99cf0110-6048-4968-9036-7cc8b6a505e1</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;You can either post it here or create a new thread with a more relevant topic, where you describe your process and include the project/code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems in transfer of a firmware image</title><link>https://devzone.nordicsemi.com/thread/298281?ContentTypeID=1</link><pubDate>Mon, 08 Mar 2021 09:25:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf139709-d8d5-4ad6-a525-9d00819dd6c3</guid><dc:creator>lolifrog</dc:creator><description>&lt;p&gt;Yes, I&amp;#39;m glad to share the experience and where can I post it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems in transfer of a firmware image</title><link>https://devzone.nordicsemi.com/thread/298275?ContentTypeID=1</link><pubDate>Mon, 08 Mar 2021 08:57:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3dfcf0e-38de-4f19-8241-e69ce051712a</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I&amp;#39;m glad to hear! Feel free to post your solution if it is not confidential. I&amp;#39;m sure it would be helpful to a lot of other users, since Nordic does not provide any solution for this as of today.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems in transfer of a firmware image</title><link>https://devzone.nordicsemi.com/thread/298254?ContentTypeID=1</link><pubDate>Mon, 08 Mar 2021 07:43:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7696e62-3311-43fb-bfd5-4e79c2d64bc1</guid><dc:creator>lolifrog</dc:creator><description>&lt;p&gt;Thanks for your help, it works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems in transfer of a firmware image</title><link>https://devzone.nordicsemi.com/thread/297243?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 14:51:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97b903c7-fd12-4bab-b516-630d7e3ccb34</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>[quote user="lolifrog"]I guess I need to create another object to send the rest .bin file? I wonder if I need to send create command(01-02-00-10-00-00) every time before sending&amp;nbsp;firmware image(.bin file)?[/quote]
&lt;p&gt;Yes, that should work.&lt;/p&gt;
&lt;p&gt;I would recommend you to capture a sniffer trace of the DFU process with the same ZIP package from a mobile phone running nRF Connect or nRF Toolbox applications. Then you can see the exact commands used by our implementation, and replicate this in your own DFU central implementation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems in transfer of a firmware image</title><link>https://devzone.nordicsemi.com/thread/295735?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2021 06:53:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8e760d7-e133-4593-afe1-081a36352146</guid><dc:creator>lolifrog</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;J&amp;oslash;rgen,&lt;/span&gt;&lt;/p&gt;
[quote userid="14926" url="~/f/nordic-q-a/71858/problems-in-transfer-of-a-firmware-image/295678#295678"]Are you implementing a BLE central for performing DFU between two nRF52840 devices?[/quote]
&lt;p&gt;Yes I want to send firmware image from central to&amp;nbsp;&lt;span&gt;peripheral&amp;nbsp;by BLE, both of them are nRF52840 devices.&lt;/span&gt;&lt;/p&gt;
[quote userid="14926" url="~/f/nordic-q-a/71858/problems-in-transfer-of-a-firmware-image/295678#295678"]Which SDK version are you using?[/quote]
&lt;p&gt;nRF5_SDK_16.0.0&lt;/p&gt;
[quote userid="14926" url="~/f/nordic-q-a/71858/problems-in-transfer-of-a-firmware-image/295678#295678"]Do you have much free space in the device?[/quote]
&lt;p&gt;&lt;span&gt;After I send select command (0x06 0x02), I receive&amp;nbsp;60-06-01-00-10-00-00-00-00-00-00-00-00-00-00.I know&amp;nbsp;the maximum object size is 4kB (0x1000 bytes). However,my&amp;nbsp;firmware image(.bin file&lt;/span&gt;&lt;span&gt;) is about 47kB, if I send all 47kB file and 0x03 to the peripheral, I will&amp;nbsp;receive 60-03-01-f0-0f-00-00-66-ee-47-e7. I guess I need to create another object to send the rest .bin file? I wonder if I need to send create command(01-02-00-10-00-00) every time before sending&amp;nbsp;firmware image(.bin file)?&lt;/span&gt;&lt;/p&gt;
[quote userid="14926" url="~/f/nordic-q-a/71858/problems-in-transfer-of-a-firmware-image/295678#295678"]Do you mean .bin file? You should send the binary data in pieces as described in the MSC.[/quote]
&lt;p&gt;Yes,I mean .bin file.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Steven&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems in transfer of a firmware image</title><link>https://devzone.nordicsemi.com/thread/295678?ContentTypeID=1</link><pubDate>Mon, 22 Feb 2021 16:37:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed7fd70c-95da-4558-b81d-1e50086cc34c</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Are you implementing a BLE central for performing DFU between two nRF52840 devices? Which SDK version are you using?&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;&lt;a title="Message sequence charts" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_dfu_transport_ble.html?cp=7_1_3_5_2_2_3#lib_dfu_transport_msc"&gt;Message sequence charts&lt;/a&gt;&amp;nbsp;for Secure DFU over BLE can be found in the SDK documentation. If you get a response that the object cannot be created due to it being too big, there is most likely not enough free space in flash to store the object. Do you have much free space in the device?&lt;/p&gt;
[quote user=""]2.If I get a correct return after sending create command, Which file should I send?(I guess only .bat flie?)&amp;nbsp;[/quote]
&lt;p&gt;Do you mean .bin file? You should send the binary data in pieces as described in the MSC.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>