<?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>When should the peripheral device should disconnect itself?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34347/when-should-the-peripheral-device-should-disconnect-itself</link><description>I&amp;#39;m trying to understand what is meant in section 5 of the BLE on Android primer: &amp;quot;The peripheral device should disconnect itself when it gets disconnected by the client.&amp;quot; 
 
 In the reference project: ble_app_uart_s130_pca10028, I understand that I can</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 May 2018 14:07:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34347/when-should-the-peripheral-device-should-disconnect-itself" /><item><title>RE: When should the peripheral device should disconnect itself?</title><link>https://devzone.nordicsemi.com/thread/132085?ContentTypeID=1</link><pubDate>Tue, 15 May 2018 14:07:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f19db27-9b95-4877-8c9f-7e1ec4d0fa4d</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I think a better description would be: &amp;quot;The peripheral device &lt;strong&gt;will&lt;/strong&gt; disconnect itself when it gets disconnected by the client.&amp;quot;&lt;/p&gt;
&lt;p&gt;Because the softdevice will generate a&amp;nbsp;BLE_GAP_EVT_DISCONNECTED event to inform the link is disconnected. There is no further action required by the application, since the link is closed, typically the peripheral can now go to&amp;nbsp;sleep&amp;nbsp;after the BLE_GAP_EVT_DISCONNECTED event, until user press a button and start advertising again.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;sd_ble_gap_disconnect() can be used for the peripheral to disconnect the link for instance if battery is low or the user is&amp;nbsp;turning OFF&amp;nbsp;the peripheral.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>