<?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 reject buttonless DFU attempt ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39530/how-to-reject-buttonless-dfu-attempt</link><description>Hi, 
 
 Is there a way to reject a buttonless DFU attempt (nRF52832, SDK14.2) ? 
 I want my application to allow DFU only when certain conditions are met. 
 I thought using case BLE_DFU_EVT_BOOTLOADER_ENTER_PREPARE: in ble_dfu_evt_handler(). 
 However</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 17 Oct 2018 14:06:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39530/how-to-reject-buttonless-dfu-attempt" /><item><title>RE: How to reject buttonless DFU attempt ?</title><link>https://devzone.nordicsemi.com/thread/153270?ContentTypeID=1</link><pubDate>Wed, 17 Oct 2018 14:06:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a86e3e4-6609-4426-bc92-ce95f9e5038c</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hei eyalasko,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Yes, the&amp;nbsp;ble_dfu_evt_handler is only used to notify the application which state the DFU Service module is in, there&amp;#39;s no events that needs to be confirmed etc. So I am afraid that you will have to modify the DFU service implementation to do this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You should be able to check if the conditions are met when the&amp;nbsp;DFU_OP_ENTER_BOOTLOADER opcode is written to the Buttonless DFU Control point, see&amp;nbsp;ble_dfu_buttonless_on_ctrl_pt_write() in ble_dfu_unbonded.c or&amp;nbsp;&lt;span&gt;ble_dfu_bonded.c if you support bonds.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Bjørn&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>