<?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>nrf mesh dfu all in application code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68827/nrf-mesh-dfu-all-in-application-code</link><description>Hello, I am looking at the mesh dfu example code on nRF mesh SDK-4.2.0 on an dk_nrf52840 and I have some questions. 
 Rather than having both a bootloader and main application that supports both mesh dfu, what if I want just the application to do so.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Dec 2020 16:15:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68827/nrf-mesh-dfu-all-in-application-code" /><item><title>RE: nrf mesh dfu all in application code</title><link>https://devzone.nordicsemi.com/thread/286120?ContentTypeID=1</link><pubDate>Mon, 21 Dec 2020 16:15:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:beda18a8-cfcb-4ebb-b660-21cac6c9dd22</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Regarding the &amp;quot;missing&amp;quot; states in the state diagram: The bootloader uses a different enum, &lt;code&gt;dfu_state_t&lt;/code&gt;, which is defined at &amp;lt;mesh sdk root&amp;gt;/mesh/bootloader/include/dfu_types_mesh.h line 225. The two enums do not match entirely, but it matches to the extent required for the communication between bootloader and application.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf mesh dfu all in application code</title><link>https://devzone.nordicsemi.com/thread/285681?ContentTypeID=1</link><pubDate>Thu, 17 Dec 2020 15:18:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12d05855-9efe-4738-86ce-36c81ed16010</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks. I see. I need to consult our mesh team regarding that. (The unused states and their appearance in the MSCs.)&lt;/p&gt;
[quote user="Richard R"]2.&amp;nbsp;Why can&amp;#39;t DFU messages be&amp;nbsp;processed by &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrf_mesh_dfu_rx&lt;/span&gt;() while &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;mesh_flash_in_progress&lt;/span&gt;() is true? my understanding is that mesh_flash eventually calls &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;bearer_handler_action_enqueue&lt;/span&gt;() - which schedules the job. is there a resource conflict I am missing?[/quote]
&lt;p&gt;The mesh stack and the bootloader have separate low-level flash drivers. If the stack provides context to the bootloader without finishing the ongoing flash related activity it will cause conflicted access to the non-volatile memory controller. The separation is for the bootloader to be able to operate without an applicaiton (i.e. in bootloader only mode.)&lt;/p&gt;
&lt;p&gt;In order to coexist with the SoftDevice, the mesh stack only operates within the timeslots provided by the SoftDevice through the timeslot API. &lt;code&gt;mesh_flash&lt;/code&gt; is a component responsible for managing flash related operation with regards to timeslots. The actual access to the non-volatile memory controller happens through &lt;code&gt;nrf_flash&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf mesh dfu all in application code</title><link>https://devzone.nordicsemi.com/thread/285397?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2020 15:27:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe108444-671d-47a3-8f30-de062261cd2a</guid><dc:creator>Richard R</dc:creator><description>&lt;p&gt;The message diagrams (that still have the missing states are here):&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v4.2.0/md_doc_user_guide_modules_dfu_integrating_into_app.html"&gt;infocenter.nordicsemi.com/.../md_doc_user_guide_modules_dfu_integrating_into_app.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf mesh dfu all in application code</title><link>https://devzone.nordicsemi.com/thread/285301?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2020 12:23:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14ebf479-1d95-479c-9da4-3b065f87f6a1</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;1. There are several values in &lt;code&gt;nrf_mesh_dfu_state_t&lt;/code&gt; that I cannot find to be set anywhere in the nRF5 SDK for Mesh codebase:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;NRF_MESH_DFU_STATE_UNINITIALIZED&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;NRF_MESH_DFU_STATE_FIND_FWID&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;NRF_MESH_DFU_STATE_READY&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;NRF_MESH_DFU_STATE_VALIDATE&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;NRF_MESH_DFU_STATE_STABILIZE&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Of those,&amp;nbsp;&lt;code&gt;NRF_MESH_DFU_STATE_UNINITIALIZED&lt;/code&gt; is checked a few places, and might appear if the state is memset to 0. I only find the enum definition when grepping for the others. They may have been used previously and disappeared in refactoring, but I have not looked further back than to nRF5 SDK for Mesh v3.0.0.&lt;/p&gt;
&lt;p&gt;Where do I find the message state diagram that you refer to?&lt;/p&gt;
&lt;p&gt;3. The solution is running in parallel to the Bluetooth mesh network, and as such forms a separate network. The &amp;quot;time to live&amp;quot; mechanism in Bluetooth mesh is that of the maximum number of &amp;quot;hops&amp;quot; that a message can take through the network. I can see a few potential congestion issues, but that would be mitigated as long as the source sends the upgrade at a maintainable speed.&lt;/p&gt;
&lt;p&gt;I share your understanding that &lt;code&gt;NRF_MESH_DFU_TX_SLOTS&lt;/code&gt; defines the max number of DFU packets that the node can hold at any instant in time. When it receives a new DFU packet, it puts it in an empty slot and retransmits it a number of times before the slot becomes empty again.&lt;/p&gt;
&lt;p&gt;4. There is no confirmation of reception. The proprietary mesh DFU solution relies solely on the capabilities of a &amp;quot;flooding mesh&amp;quot; to propagate the upgrade to all nodes, given the parameters of the network (mainly topology and number of retransmits).&lt;/p&gt;
&lt;p&gt;I will get back to you regarding your question 2.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf mesh dfu all in application code</title><link>https://devzone.nordicsemi.com/thread/284850?ContentTypeID=1</link><pubDate>Mon, 14 Dec 2020 15:38:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76fdac3a-95bf-4e2a-b840-fd28bf9d31ce</guid><dc:creator>Richard R</dc:creator><description>&lt;p&gt;Thanks for the pointers Terje,&lt;/p&gt;
&lt;p&gt;I am looking at the proprietary nRF mesh DFU solution and trying to understand it and have some questions. My codebase is SDK 4.2.0&lt;/p&gt;
&lt;p&gt;1. in &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrf_mesh_dfu_state_t&lt;/span&gt; - I don&amp;#39;t see some states being used (&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;NRF_MESH_DFU_STATE_READY&lt;/span&gt; or&amp;nbsp;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;NRF_MESH_DFU_STATE_STABILIZE&lt;/span&gt;)&amp;nbsp; - It is mentioned in the message state diagram in documentation. Am I missing something?&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;Why can&amp;#39;t DFU messages be&amp;nbsp;processed by &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrf_mesh_dfu_rx&lt;/span&gt;() while &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;mesh_flash_in_progress&lt;/span&gt;() is true? my understanding is that mesh_flash eventually calls &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;bearer_handler_action_enqueue&lt;/span&gt;() - which schedules the job. is there a resource conflict I am missing?&lt;/p&gt;
&lt;p&gt;3. NRF_MESH_DFU_TX_SLOTS - If I understand this correctly, because the solution is implemented at the bearer layer, there is no concept of &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;TimeToLive&lt;/span&gt; and the Tx slots also determine the number of Tx packets each node can `cache` and relay? I am a bit concerned about message flooding to the network with this approach.&lt;/p&gt;
&lt;p&gt;4. Similarly, due to the implementation at the bearer layer, I am having a hard time&amp;nbsp;understanding how a target node can report its status to the originator device. At the &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;access layer&lt;/span&gt;, this can be done using a unicast message, but at the bearer layer, any message would have to be broadcasted and relayed back to the originator, correct?. Any insight on this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf mesh dfu all in application code</title><link>https://devzone.nordicsemi.com/thread/284495?ContentTypeID=1</link><pubDate>Fri, 11 Dec 2020 11:20:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e343c448-f1c0-4364-9cd8-3d9b30c8fc57</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Actually, we do have an example of using BLE DFU (from nRF5 SDK) with an nRF5 SDK for Mesh example (but without the mesh DFU solution): &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v5.0.0%2Fmd_examples_lpn_dfu_ble.html"&gt;Configuring DFU over BLE using the LPN example&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf mesh dfu all in application code</title><link>https://devzone.nordicsemi.com/thread/283862?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2020 14:48:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:766d8f4a-d6c3-4ae9-aed1-29defceb828a</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Our proprietary mesh DFU solution is based on having a bootloader separate from the application, partly because it allows it to operate even if the application is not present, e.g. if the update is too large to fit in flash without erasing the current application first. In order to &amp;quot;port&amp;quot; it over to run fully on the mesh application, the most important patch would be to not accept such &amp;quot;application deleting&amp;quot; updates.&lt;/p&gt;
&lt;p&gt;We have done some preliminary studies in the past to add BLE DFU to mesh projects, and from what I understand some customers have successfully implemented that in the past, but I do not remember to have seen any combined project using both DFU methods concurrently.&lt;/p&gt;
&lt;p&gt;BLE DFU is significantly faster than mesh DFU, for updating a single device, due to the large difference in point-to-point throughput. Mesh DFU on the other hand can update the whole network in parallel, which also means less manual work for performing the update.&lt;/p&gt;
&lt;p&gt;In the case where some nodes for some reason are left on a previous version of the firmware: Note that as long as the updated nodes still support relaying the messages (and you have at least one node that supports being source for the update), the remaining nodes can still be updated. The nodes will relay DFU updates regardless of whether they themselves are a target for the update or has already been updated to the current update.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf mesh dfu all in application code</title><link>https://devzone.nordicsemi.com/thread/282547?ContentTypeID=1</link><pubDate>Mon, 30 Nov 2020 20:29:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2377d14e-38d3-4d5e-b4ac-b9e4c8e6a541</guid><dc:creator>Richard R</dc:creator><description>&lt;p&gt;In the current DFU-Mesh solution that nRF offers (&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v5.0.0%2Fmd_doc_user_guide_modules_dfu_protocol.html"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v5.0.0%2Fmd_doc_user_guide_modules_dfu_protocol.html&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;The implementation requires both the mesh-bootloader and the sample-application to be loaded in flash.&lt;/p&gt;
&lt;p&gt;The sample-application receives mesh messages and if it receives mesh-DFU messages, it then calls the bootloader via the shared RAM function to process it. I am looking for a simpler solution where everything can be done on the application side.&lt;/p&gt;
&lt;p&gt;In such a system, the application will handle all mesh-DFU functions (and it can be loaded and tested separately). The bootloader in this case will only support BLE-DFU and not be mesh-capable at all.&lt;/p&gt;
&lt;p&gt;If there are other useful references&amp;nbsp;outside of nrf-dfu-protocol to do application-only mesh-DFU I am also interested.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf mesh dfu all in application code</title><link>https://devzone.nordicsemi.com/thread/282510?ContentTypeID=1</link><pubDate>Mon, 30 Nov 2020 15:48:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2dcf047-e733-4e78-b0d0-f2681c9e158b</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Rather than having both a bootloader and main application that supports both mesh dfu, what if I want just the application to do so. &lt;br /&gt;The bootloader can for example only handle BLE communications.[/quote]
&lt;p&gt;I&amp;#39;m not completely sure what you mean, can you elaborate/give more details?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>