<?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 start / stop a DFU service from an application?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83096/how-to-start-stop-a-dfu-service-from-an-application</link><description>Hi, I have several services running in the application. one of them is DFU. 
 I have to hide / stop DFU service for example when the SOC of the battery is less than 50%. And show/start it again when the user plugs in the charger, for example 
 here is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Dec 2021 14:32:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83096/how-to-start-stop-a-dfu-service-from-an-application" /><item><title>RE: How to start / stop a DFU service from an application?</title><link>https://devzone.nordicsemi.com/thread/345126?ContentTypeID=1</link><pubDate>Mon, 27 Dec 2021 14:32:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:163b5584-f5db-4854-8942-7cc45320b967</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Rakhneko,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In our softdevice architecture it&amp;#39;s only possible to dynamically add a new service to the ATT table and not possible to remove a service/attribute.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The only way to remove a service/attribute is to uninitialize and reinitialize the BLE stack.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The other option is to add a condition in the DFU buttonless service telling the DFU master to stop the process (do not accept the command to switch to bootloader) if the battery is lower than a certain level. This way you don&amp;#39;t need to modify the ATT table and doesn&amp;#39;t need to reset the BLE connection.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>