<?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>Understanding the message sequence chart for doing a firmware update</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101348/understanding-the-message-sequence-chart-for-doing-a-firmware-update</link><description>I&amp;#39;m looking at using a custom phone application to do a firmware update on my nRF52833. I&amp;#39;m not using the library from Nordic, as it is written in a different language then what the rest of the application is in. 
 
 I was looking at the message sequence</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 Jul 2023 09:37:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101348/understanding-the-message-sequence-chart-for-doing-a-firmware-update" /><item><title>RE: Understanding the message sequence chart for doing a firmware update</title><link>https://devzone.nordicsemi.com/thread/434896?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 09:37:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eeded7a2-eba2-4e5c-a443-23747a20d082</guid><dc:creator>jerome.sc</dc:creator><description>&lt;p&gt;Ok, thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Understanding the message sequence chart for doing a firmware update</title><link>https://devzone.nordicsemi.com/thread/434870?ContentTypeID=1</link><pubDate>Thu, 06 Jul 2023 08:34:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0417b20d-67ba-481a-a21f-055f0a52833b</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;The documentation is a bit unclear. Execute should be called for every object, but behaves differently depending on the state. I suggest taking a look at the implementation in the old nrfutil (mostly in &lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/blob/master/nordicsemi/dfu/dfu_transport_ble.py"&gt;dfu_transport_ble.py&lt;/a&gt;) for a working reference implementation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Understanding the message sequence chart for doing a firmware update</title><link>https://devzone.nordicsemi.com/thread/434394?ContentTypeID=1</link><pubDate>Tue, 04 Jul 2023 09:00:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:366d1507-9e8f-4dd3-9e26-638eebb359b2</guid><dc:creator>jerome.sc</dc:creator><description>&lt;p&gt;Ok, that makes sense.&lt;br /&gt;&lt;br /&gt;I have one last question to do with the message sequence chart, about&amp;nbsp;transferring a firmware image. Does the execute command happen only once (i.e. when the full firmware image has been sent), or multiple times, as from the chart it looks like it&amp;#39;s called within the repeat statement.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m confused because of the line about the chart saying &amp;quot;When all packets are transferred, the DFU controller issues an Execute command to trigger the actual firmware update.&amp;quot;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Understanding the message sequence chart for doing a firmware update</title><link>https://devzone.nordicsemi.com/thread/434380?ContentTypeID=1</link><pubDate>Tue, 04 Jul 2023 08:42:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4f59357-e220-4b6a-ab8e-5c9037708c28</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, packets can be larger. In BLE, you can have larger physical packets (with data length extension), and also larger packets at the ATT layer (given by the ATT MTU), and this can span several physical packets. The GATT MTU size refer to the GATT layer, which can be up to 512 bytes.&lt;/p&gt;
&lt;p&gt;Regarding the MTU get command that has no use in BLE (as this is not handled by the DFU protocol in this case), but it is used for other transports, specifically serial (UART) and ANT. As MTU is handled on the Bluetooth layer, you will need to use the Bluetooth APIs on iOS/Android (if that is the platform for your app) to operate on that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Understanding the message sequence chart for doing a firmware update</title><link>https://devzone.nordicsemi.com/thread/434377?ContentTypeID=1</link><pubDate>Tue, 04 Jul 2023 08:32:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c61ca95-ea7a-4bf1-a84f-e82992548330</guid><dc:creator>jerome.sc</dc:creator><description>&lt;p&gt;I&amp;#39;m a bit confused about the last point. When doing a firmware update over BLE, can the packets being sent be bigger than the standard 20 bytes? If so is that from setting it in the code NRF_SDH_BLE_GATT_MAX_MTU_SIZE, and using the MTU get MTU command [07], to see what the size is set to?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Understanding the message sequence chart for doing a firmware update</title><link>https://devzone.nordicsemi.com/thread/434372?ContentTypeID=1</link><pubDate>Tue, 04 Jul 2023 08:16:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c98cad6-0ee9-44a5-b65f-c818faee203d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The response always contain the response code (0x60), the op code and the result (in that order). So&amp;nbsp;&lt;span&gt;[60 01 01] means that it is a response to create (0x01) and the result is 0x01 (success). You can refer to &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__sdk__nrf__dfu__req__handler.html?cp=9_1_6_10_7_0_5_20#ga654d8446f2996253016f7c7713124094"&gt;nrf_dfu_result_t&amp;nbsp; &lt;/a&gt;for a list of result codes.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regarding the other questions, there are two key points that should help to explain most of them. First of all, the every request has a format and set of parameters defined in &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_dfu_transport.html?cp=9_1_3_5_2"&gt;this table&lt;/a&gt;. And when looking at the data, you need to be aware that this is little endian. This is for instance why&amp;nbsp;[02 00 01] sets RPN to 256, as 0x0100 is 256.&lt;/p&gt;
&lt;p&gt;Lastly, MTU that is handled ad the BLE level and not in the DFU protocol itself when using Bluetooth as transport. When using UART, it is handled in the DFU protocol, as there is no ;MTU concept in UART. (You can see that MTU is done at Bluetooth level if you search for MTU in&amp;nbsp;components\libraries\bootloader\ble_dfu\nrf_dfu_ble.c).&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>