<?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 reliable is buttonless DFU, as well as can&amp;#39;t go into dfu bootloader with button?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102587/how-reliable-is-buttonless-dfu-as-well-as-can-t-go-into-dfu-bootloader-with-button</link><description>I&amp;#39;ve implemented a buttonless DFU with bonds, as well as a button-based DFU . These are in separate branches, but ultimately for my project, I want both ways integrated. However I can&amp;#39;t go into the bootloader with both methods in my project. I have some</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 17 Aug 2023 15:01:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102587/how-reliable-is-buttonless-dfu-as-well-as-can-t-go-into-dfu-bootloader-with-button" /><item><title>RE: How reliable is buttonless DFU, as well as can't go into dfu bootloader with button?</title><link>https://devzone.nordicsemi.com/thread/441912?ContentTypeID=1</link><pubDate>Thu, 17 Aug 2023 15:01:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:627618b2-c196-4234-a4fa-0db9c62ffae5</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;If the UART command will only be sent on the master service, then do you think it is secured enough&amp;nbsp;for the&amp;nbsp;UART-triggered&amp;nbsp;DFU to be without bonds?&lt;/p&gt;
&lt;p&gt;If you still decide that bonds are require, then you need to setup the Peer Manager in the bootloader, and I guess you will also need to modify the advertising implementation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How reliable is buttonless DFU, as well as can't go into dfu bootloader with button?</title><link>https://devzone.nordicsemi.com/thread/441777?ContentTypeID=1</link><pubDate>Thu, 17 Aug 2023 08:14:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f91135fe-46d7-4f23-aa89-d71d1dd9f030</guid><dc:creator>jerome.sc</dc:creator><description>&lt;p&gt;So with my product,&amp;nbsp;I have standard users that operate on a &amp;quot;user service&amp;quot;, which is in just works mode (pairing/no bonding). Master users who can access the &amp;quot;master service&amp;quot;, need to pair and bond (passkey/mitm protected). There can be up to 10 masters/bonds. Only the masters/bonds can trigger the firmware update, as it should be encrypted.&lt;br /&gt;&lt;br /&gt;The button triggering the DFU process is not a physical button, but a UART command from another processor, that only will be sent on the master service, which in turn calls the&amp;nbsp;enter_dfu_mode() function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How reliable is buttonless DFU, as well as can't go into dfu bootloader with button?</title><link>https://devzone.nordicsemi.com/thread/441754?ContentTypeID=1</link><pubDate>Thu, 17 Aug 2023 06:33:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ecdc21ae-018f-452f-857c-d4ed3bc6cf5e</guid><dc:creator>mrono</dc:creator><description>[quote userid="9456" url="~/f/nordic-q-a/102587/how-reliable-is-buttonless-dfu-as-well-as-can-t-go-into-dfu-bootloader-with-button/441723"]This means that if we want the button-triggered DFU operation to have access to the peer data, then&amp;nbsp;we will need to setup the Peer Manager on the bootloader as well.[/quote]
&lt;p&gt;If you have several peers then yes, something like that probably needs to be done. But if there is only one bonded peer, then I think it should be sufficient to simply always forward that data when entering the bootloader.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How reliable is buttonless DFU, as well as can't go into dfu bootloader with button?</title><link>https://devzone.nordicsemi.com/thread/441723?ContentTypeID=1</link><pubDate>Wed, 16 Aug 2023 22:11:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4e4d609-b81e-4908-a6f7-db9f57d651fa</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;I think &lt;a href="https://devzone.nordicsemi.com/members/mrono"&gt;mrono&lt;/a&gt;&amp;nbsp;is right! From&amp;nbsp;&lt;a title="Buttonless Secure DFU Service" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/service_dfu.html?cp=9_1_3_3_5"&gt;Buttonless Secure DFU Service&lt;/a&gt;&amp;nbsp;documentation:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;When the Buttonless Secure DFU Service enters the bootloader, the Buttonless Secure DFU Service &lt;span style="background-color:rgba(255, 255, 0, 1);"&gt;forwards the current peer data from the Peer Manager data storage to the Secure DFU bootloader&lt;/span&gt;. This data is stored in flash, and is activated when the device enters DFU mode.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Thanks a lot, mrono! You stopped me from heading into an incorrect approach.&lt;/p&gt;
&lt;p&gt;This means that if we want the button-triggered DFU operation to have access to the peer data, then&amp;nbsp;we will need to setup the Peer Manager on the bootloader as well.&lt;/p&gt;
&lt;p&gt;This leads me to&amp;nbsp;rethink about this DFU setup from a different angle.&lt;/p&gt;
&lt;p&gt;The point of&amp;nbsp;the bond requirement for performing DFU is&amp;nbsp;to protect against unauthorized update.&lt;/p&gt;
&lt;p&gt;With the button-trigger method, the&amp;nbsp;person already has access to the device.&amp;nbsp;For many use cases, this often also means that the person&amp;nbsp;can have the authority to update.&lt;/p&gt;
&lt;p&gt;Is that the&amp;nbsp;case with your product, Jerome?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How reliable is buttonless DFU, as well as can't go into dfu bootloader with button?</title><link>https://devzone.nordicsemi.com/thread/441310?ContentTypeID=1</link><pubDate>Tue, 15 Aug 2023 08:34:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:260afd6c-3c53-4abc-afb5-ff9fec678716</guid><dc:creator>mrono</dc:creator><description>&lt;p&gt;I don&amp;#39;t actually use the bootloader with bonds, but the way I understood it, the buttonless DFU will only forward the peer data of the peer that actually initiated the (buttonless) DFU.&lt;/p&gt;
[quote userid="119549" url="~/f/nordic-q-a/102587/how-reliable-is-buttonless-dfu-as-well-as-can-t-go-into-dfu-bootloader-with-button/439929"] I&amp;#39;m thinking if there is a way that I can call one of the underlying DFU service functions that will set the peer data up, before rebooting into the bootloader,[/quote]
&lt;p&gt;I think the function you need is nrf_dfu_set_peer_data(). If you look up in ble_dfu_bonded.c the functions retrieve_peer_data() and enter_bootloader() I think those are the ones you&amp;#39;d need to replicate.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How reliable is buttonless DFU, as well as can't go into dfu bootloader with button?</title><link>https://devzone.nordicsemi.com/thread/441302?ContentTypeID=1</link><pubDate>Tue, 15 Aug 2023 07:53:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:702fea91-b783-43e1-a7e5-5c6e31bf31cb</guid><dc:creator>jerome.sc</dc:creator><description>&lt;p&gt;Ok, great. I&amp;#39;m going to keep testing on my end, but I am running out of reasons why. I&amp;#39;ve created a new project based on the gls example, and used the nRF52840 DK instead of my custom PCB which has an nRF52833. Even with this, and a fresh install of the SDK I am running into the same problem. Although when I try to debug I can&amp;#39;t see debug data from the bootloader code. The normal application runs, and I&amp;#39;m in debug mode. I trigger the DFU process, by pressing a button. It calls the&amp;nbsp;enter_dfu_mode(), I created in the first post. But I can&amp;#39;t see where in the DFU process it&amp;#39;s failing from the bootloader code. But I assume it&amp;#39;s the same issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How reliable is buttonless DFU, as well as can't go into dfu bootloader with button?</title><link>https://devzone.nordicsemi.com/thread/441073?ContentTypeID=1</link><pubDate>Mon, 14 Aug 2023 07:13:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fdae19c-4409-43ec-af55-ce50e2afd6e1</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Jerome,&lt;/p&gt;
&lt;p&gt;I just want to let you know that I am still around. As a next step, I think I will have to try setting up a project myself, and with us being understaffed, it has been a little difficult to schedule&amp;nbsp;a big block of time for that.&lt;/p&gt;
&lt;p&gt;I appreciate your patience thus far. I will try to get to it as soon as I can.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How reliable is buttonless DFU, as well as can't go into dfu bootloader with button?</title><link>https://devzone.nordicsemi.com/thread/440335?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2023 13:39:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51776f03-bab0-4d6f-852c-11df127d7102</guid><dc:creator>jerome.sc</dc:creator><description>&lt;p&gt;Yes, this is enabled in the bootloader code as it&amp;#39;s not greyed out.&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1691501955200v1.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;As well as in the SDK_CONFIG file it&amp;#39;s enabled&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1691501993256v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How reliable is buttonless DFU, as well as can't go into dfu bootloader with button?</title><link>https://devzone.nordicsemi.com/thread/440307?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2023 12:36:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1cc79a0-75ce-42f4-8777-9a3233eadbeb</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Jerome,&lt;/p&gt;
[quote user=""]&lt;span style="text-decoration:underline;"&gt;How reliable is the buttonless DFU?&lt;br /&gt;&lt;/span&gt; On the tutorial &amp;quot;nRF5 SDK v17.1.0 Secure DFU Hands-on Tutorial&amp;quot;,&lt;br /&gt; it mentions at the bottom &amp;quot;&lt;span&gt;It is important if at all possible, to provide a fail-safe for the DFU process if the buttonless process becomes inoperative, usually via a programming mistake in the application code. A coding mistake that breaks the buttonless process will render the device unable to be updated&lt;/span&gt;&amp;quot;.&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/nrf5-sdk-v17-1-0-secure-dfu-hands-on-tutorial"&gt;nRF5 SDK v17.1.0 Secure DFU  Hands-on Tutorial&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The reason for having both a button-based approach and a buttonless approach is based on this statement, which makes sense if the device can&amp;#39;t do a DFU then it can be useless. I assume this mainly comes from a lack of testing, before doing a DFU out to all devices in the field. But providing that the tests pass, what are the chances that the service itself stops working?[/quote]
&lt;p&gt;DFU over BLE is quite&amp;nbsp;reliable. We rarely see report of devices&amp;nbsp;being bricked&amp;nbsp;due to a DFU reason. Among&amp;nbsp;the ones I have seen, the situations could have been prevented with enough test cases. But then again,&amp;nbsp;a fallback recovery method&amp;nbsp;would have&amp;nbsp;saved a lot of effort and cost in such cases, so it&amp;#39;s always a good idea to have it. But all of this are things you have already thought of.&lt;/p&gt;
&lt;hr /&gt;[quote user=""]How can I keep bonds when going into the bootloader to do a DFU with a button-based approach?[/quote]
&lt;p&gt;As you can see in L1157-L1170 of nrf_dfu_ble.c, the&amp;nbsp;bonds will be loaded if&amp;nbsp;NRF_DFU_BLE_REQUIRES_BONDS.&lt;/p&gt;
&lt;p&gt;Have you tried with this configuration enabled?&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How reliable is buttonless DFU, as well as can't go into dfu bootloader with button?</title><link>https://devzone.nordicsemi.com/thread/440099?ContentTypeID=1</link><pubDate>Mon, 07 Aug 2023 11:58:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb65aa6a-d51e-47d0-948f-66af9f22578b</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Jerome,&lt;/p&gt;
&lt;p&gt;Please know that I will support you&amp;nbsp;with your questions. I am a little occupied at the moment, but I will return questions soon, unless someone from the community already helped you then.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How reliable is buttonless DFU, as well as can't going into dfu bootloader with button?</title><link>https://devzone.nordicsemi.com/thread/439929?ContentTypeID=1</link><pubDate>Fri, 04 Aug 2023 13:04:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0152cf3-799c-466c-b8ba-f51afda06d7a</guid><dc:creator>jerome.sc</dc:creator><description>&lt;p&gt;I&amp;#39;ve ran the debug version of the bootloader to see what the reason why it&amp;#39;s not going into the bootloader, after doing dfu reset from my main application. It seems it can&amp;#39;t find the peer data, when going into the bootloader from the GPREGRET method. So it works if I use the DFU services in the main application, but doing with the &lt;span&gt;GPREGRET&amp;nbsp;way from the main application it can&amp;#39;t find the peer data. I&amp;#39;m thinking if there is a way that I can call one of the underlying DFU service functions that will set the peer data up, before rebooting into the bootloader, so it can find it if I trigger it by setting the GPREGRET?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1691154073317v3.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;My settings config on the bootloader project is below (screenshot). Also on the main application, I&amp;#39;ve set up these settings:&lt;/p&gt;
&lt;p&gt;#define BLE_DFU_ENABLED 1&lt;br /&gt;#define NRF_PWR_MGMT_CONFIG_AUTO_SHUTDOWN_RETRY 1&lt;br /&gt;#define NRF_SDH_BLE_SERVICE_CHANGED 1&lt;/p&gt;
&lt;p&gt;#ifndef NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS&lt;br /&gt;#define NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS 1&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1691154258547v6.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>