<?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 to switch to bootloader when OTA?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18439/how-to-switch-to-bootloader-when-ota</link><description>Hi, 
 I&amp;#39;m using nRF5_SDK_12.2.0_f012efa and s132_nrf52_3.0.0_softdevice. We want to do the OTA on it. However, I found that there is no DFU service in the HRS example.If I want to switch to the bootloader in the application like HRS example in nRF5_SDK_11</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 27 Dec 2016 15:44:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18439/how-to-switch-to-bootloader-when-ota" /><item><title>RE: How to switch to bootloader when OTA?</title><link>https://devzone.nordicsemi.com/thread/71161?ContentTypeID=1</link><pubDate>Tue, 27 Dec 2016 15:44:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:676541d5-8647-4d1f-8b11-6a31ca06ad0d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;How would I test, Alice ? It simply works with both NRFToolbox and nRFConnect with the buttonless example in our SDK.
You need to check and compare why it works when you test with NRFConnect and not when with nRFToolbox.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to switch to bootloader when OTA?</title><link>https://devzone.nordicsemi.com/thread/71160?ContentTypeID=1</link><pubDate>Tue, 27 Dec 2016 12:52:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1dc9708e-ce09-4f59-bd10-024df7643934</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Hi Hung,it would reach the code where I write to GPREGRET when I use the nRFToolbox try to do DFU. Could you help to test it? Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to switch to bootloader when OTA?</title><link>https://devzone.nordicsemi.com/thread/71159?ContentTypeID=1</link><pubDate>Tue, 27 Dec 2016 12:41:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad9724a2-36a2-411b-b54d-2af126df74de</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Alice,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s a little bit strange because both nRFConnect and nRFToolbox uses the same DFU library. You may want to capture a sniffer trace when you test with nRFToolbox, it could tell what when wrong.&lt;/p&gt;
&lt;p&gt;You can also add a break point in the application code where you write to GPREGRET before you jump to bootloader, to see if it reach there when the nRFToolbox try to do DFU.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to switch to bootloader when OTA?</title><link>https://devzone.nordicsemi.com/thread/71158?ContentTypeID=1</link><pubDate>Tue, 27 Dec 2016 09:15:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c45e80a0-9d97-418d-bbec-f761ce5d8481</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Hi Hung, now I can use nRF Connect in IOS to write the characteristic(write 0x01 value) to make it switch to bootloader. I do it as follow, in the ble_dfu_evt_handler function, I will write the GPREGRET register:
&lt;code&gt;case BLE_DFU_EVT_ENTERING_BOOTLOADER:			 sd_power_gpregret_set(0,0xB1); NVIC_SystemReset(); printf(&amp;quot;Device is entering bootloader mode!\r\n&amp;quot;); break;&lt;/code&gt;
Then in the bootloader, I will check the GPREGRET register in nrf_dfu_enter_check() function:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;__WEAK bool nrf_dfu_enter_check(void)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	if(NRF_POWER-&amp;gt;GPREGRET==0x01)	
	{	
		NRF_POWER-&amp;gt;GPREGRET =0x00;		
		return true;
	}

if (nrf_gpio_pin_read(BOOTLOADER_BUTTON) == 0)
{
    return true;
}

if (s_dfu_settings.enter_buttonless_dfu == 1)
{
    s_dfu_settings.enter_buttonless_dfu = 0;
    (void)nrf_dfu_settings_write(NULL);
    return true;
}
return false;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;After that, it will switch to bootloader and then update the fireware. However, the DFU app in the nRF Toolbox cann&amp;#39;t make it switch to bootloader. If I want to use it to make it switch to bootloader, what should I do? Could I use the APP to do OTA?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to switch to bootloader when OTA?</title><link>https://devzone.nordicsemi.com/thread/71157?ContentTypeID=1</link><pubDate>Tue, 27 Dec 2016 08:43:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9189954b-ca88-409a-8c12-d1eb66029045</guid><dc:creator>John</dc:creator><description>&lt;p&gt;No, this case hasn&amp;#39;t been solved. &lt;a href="https://devzone.nordicsemi.com/question/100609/sdk-12-bootloader-erased-after-programming/"&gt;link text&lt;/a&gt;  I have read it and I test experimental_ble_app_buttonless_dfu example, it also cann&amp;#39;t switch to bootloader.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to switch to bootloader when OTA?</title><link>https://devzone.nordicsemi.com/thread/71156?ContentTypeID=1</link><pubDate>Tue, 27 Dec 2016 08:36:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8fea3aa-4923-4d8c-94a5-98cbae708796</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Alice, I saw that you accepted the answer in the other case, could you confirm this case is also solved ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to switch to bootloader when OTA?</title><link>https://devzone.nordicsemi.com/thread/71155?ContentTypeID=1</link><pubDate>Mon, 26 Dec 2016 08:31:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0e60965-5a70-45e9-a05f-d163d6c85474</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Yes, I have program the bootloader. Only it  switch to the bootloader mode so that I can do other things. I have known how to do if it switch to bootloader mode. I test experimental_ble_app_buttonless_dfu example, I meet the same probelm that it cann&amp;#39;t switch to the bootloader mode.  I can see the log information &amp;quot;Device is entering bootloader mode &amp;quot; and then it resets.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to switch to bootloader when OTA?</title><link>https://devzone.nordicsemi.com/thread/71154?ContentTypeID=1</link><pubDate>Wed, 21 Dec 2016 09:42:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a4ec0c4-de76-42eb-95ba-9c4bc5455cd1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Have you programmed the bootloader, Alice ? Please follow the instruction on how to use the bootloader example in the documentation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to switch to bootloader when OTA?</title><link>https://devzone.nordicsemi.com/thread/71153?ContentTypeID=1</link><pubDate>Wed, 21 Dec 2016 09:36:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f3062cc-0f0c-4ac0-b577-fd820a24240f</guid><dc:creator>John</dc:creator><description>&lt;p&gt;Hi Hung, now I have added the write properties and use nRF connect APP in IOS to write it. I can see the log information &amp;quot;Device is entering bootloader mode &amp;quot; and then reset, but it doesn&amp;#39;t switch to the bootloader mode. Could you tell me what problem would be? Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to switch to bootloader when OTA?</title><link>https://devzone.nordicsemi.com/thread/71152?ContentTypeID=1</link><pubDate>Fri, 16 Dec 2016 13:12:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6301112c-dd20-4ccf-9c36-caf577923765</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Alice,
Please find the example in \examples\ble_peripheral\experimental_ble_app_buttonless_dfu\ instead.&lt;/p&gt;
&lt;p&gt;Note that you would need to add the write properties as described &lt;a href="https://devzone.nordicsemi.com/question/93414/sdk12-ble_app_buttonless_dfu/?answer=93756#post-id-93756"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>