<?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>nRF52832 DFU downgrade fails</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112570/nrf52832-dfu-downgrade-fails</link><description>Hello, I am using nRF52832, nRF5 SDK, s132, and DFU-OTA with private keys and secure bootloader I am trying to enable the DFU Downgrade by disabling the define NRF_DFU_APP_DOWNGRADE_PREVENTION (set to 0) in secure_bootloader . But I notice a strange behaviour</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Jul 2024 13:31:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112570/nrf52832-dfu-downgrade-fails" /><item><title>RE: nRF52832 DFU downgrade fails</title><link>https://devzone.nordicsemi.com/thread/493924?ContentTypeID=1</link><pubDate>Mon, 15 Jul 2024 13:31:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ad4157b-93db-4c29-b562-088ad74f514e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Please make sure to bump the version number of the bootloader in your DFU package. Otherwise, the bootloader update will be rejected with the &amp;quot;FW version failure&amp;quot; error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 DFU downgrade fails</title><link>https://devzone.nordicsemi.com/thread/491746?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2024 07:54:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5d14a78-fd58-4443-a6b8-bfad36ae9d65</guid><dc:creator>DimitraN</dc:creator><description>&lt;p&gt;No I do not increase any version on the booloader. In fact, I didn&amp;#39;t change anything in the config file, other than the downgade prevention. Here is the config file from the secure_bootloader/pca10040_s132_ble_debug example, which I changed this configuration only, and added on my zip file for DFU (along with softdevice and application).&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/70348.sdk_5F00_config.h"&gt;devzone.nordicsemi.com/.../70348.sdk_5F00_config.h&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 DFU downgrade fails</title><link>https://devzone.nordicsemi.com/thread/491637?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2024 14:09:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68d667ac-577a-43c1-b60d-0c14280a0785</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Are you also increasing the bootloader version? Note that turning off downgrade prevention only applies to the application version.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 DFU downgrade fails</title><link>https://devzone.nordicsemi.com/thread/491579?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2024 11:57:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88b0296a-c282-44bf-987b-92d8204cd688</guid><dc:creator>DimitraN</dc:creator><description>[quote userid="15146" url="~/f/nordic-q-a/112570/nrf52832-dfu-downgrade-fails/491557"]Could you share this log?[/quote]
&lt;p&gt;The log from my phone - nRF Cnnect app:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Log-2024_2D00_07_2D00_01-14_5F00_47_5F00_01.txt"&gt;devzone.nordicsemi.com/.../Log-2024_2D00_07_2D00_01-14_5F00_47_5F00_01.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="15146" url="~/f/nordic-q-a/112570/nrf52832-dfu-downgrade-fails/491557"]Also, if you use the _debug-suffixed bootloader project, then logging is enabled in that project, so we can see the logs from the bootloader.[/quote]
&lt;p&gt;I used to do DFU with a zip that contains the secure bootloader hex file, the softdevice and the application.&amp;nbsp;&lt;br /&gt;I changed it now and included the _debug bootloader (after setting 0 downgrade prevention) and run the RTT Viewer to see logs, but only the normal ones appeared , which originate from the application.&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Function for handling all dfu related events.
 *
 * @param[in] event DFU events
 */

static void ble_dfu_evt_handler(ble_dfu_buttonless_evt_type_t event)
{
  switch (event)
  {
    case BLE_DFU_EVT_BOOTLOADER_ENTER_PREPARE:
      NRF_LOG_INFO(&amp;quot;Device is preparing to enter bootloader mode.&amp;quot;);
    break;

    case BLE_DFU_EVT_BOOTLOADER_ENTER:
      NRF_LOG_INFO(&amp;quot;Device will enter bootloader mode.&amp;quot;);
    break;

    case BLE_DFU_EVT_BOOTLOADER_ENTER_FAILED:
      NRF_LOG_ERROR(&amp;quot;Request to enter bootloader mode failed asynchroneously.&amp;quot;);
      APP_ERROR_CHECK(false);
      
    break;

    case BLE_DFU_EVT_RESPONSE_SEND_ERROR:
      NRF_LOG_ERROR(&amp;quot;Request to send a response to client failed.&amp;quot;);
      APP_ERROR_CHECK(false);
      
    break;

    default:
      NRF_LOG_ERROR(&amp;quot;Unknown event from ble_dfu_buttonless.&amp;quot;);
    break;
  }
}

/**@brief Function for handling power management events. We use it just to enter DFU.
 *
 * @param[in] event power management event
 */

static bool app_shutdown_handler(nrf_pwr_mgmt_evt_t event)
{
  switch (event)
  {
    case NRF_PWR_MGMT_EVT_PREPARE_DFU:
      NRF_LOG_INFO(&amp;quot;Power management wants to reset to DFU mode.&amp;quot;);
    break;

    default:
      return true;
  }

  NRF_LOG_INFO(&amp;quot;Power management allowed to reset to DFU mode.&amp;quot;);
  return true;
}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;From this section of my code from the application, these log messages appeared:&amp;nbsp;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2024_2D00_07_2D00_01-144907_2D00_dfu.png" /&gt;&lt;/p&gt;
&lt;p&gt;and then the logs stopped, so I don&amp;#39;t see any logs from the bootloader. Is there another way to do it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 DFU downgrade fails</title><link>https://devzone.nordicsemi.com/thread/491557?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2024 10:35:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6bffd188-b897-4b0e-aa34-e2927913b7c7</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Could you share this log?&lt;/p&gt;
&lt;p&gt;Also, if you use the _debug-suffixed bootloader project, then logging is enabled in that project, so we can see the logs from the bootloader.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 DFU downgrade fails</title><link>https://devzone.nordicsemi.com/thread/491536?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2024 09:23:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43f6358c-b320-40cc-9eb3-96d0c90465e2</guid><dc:creator>DimitraN</dc:creator><description>&lt;p&gt;I see it at the logs of nRF Connect app on my mobile phone.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 DFU downgrade fails</title><link>https://devzone.nordicsemi.com/thread/491397?ContentTypeID=1</link><pubDate>Fri, 28 Jun 2024 15:17:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e17c35f6-9910-4fe3-9604-74da82cff52e</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
[quote user=""]it disconnects and gives FW failure code 5.&amp;nbsp;[/quote]
&lt;p&gt;Where do you see this code 5? Do you have any logs from the bootloader for this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>