<?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>Peripheral initiates disconnection</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13278/peripheral-initiates-disconnection</link><description>How can a peripheral initiate a disconnection after it has connected to a central? 
 Update: I use mbed.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Apr 2016 20:34:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13278/peripheral-initiates-disconnection" /><item><title>RE: Peripheral initiates disconnection</title><link>https://devzone.nordicsemi.com/thread/50618?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2016 20:34:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4aff3ab-2842-4df4-a59f-4cd29e75bb59</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;To complete the correct answer given by @rols:&lt;/p&gt;
&lt;p&gt;Mbed use internally SDK/SoftDevice functions provided by Nordic. To disconnect, you can use the following method of the &lt;code&gt;nRF5xGap&lt;/code&gt; class:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ble_error_t nRF5xGap::disconnect(Handle_t connectionHandle, DisconnectionReason_t reason)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Which uses the &lt;code&gt;sd_ble_gap_disconnect()&lt;/code&gt; function internally, &lt;a href="https://github.com/ARMmbed/ble-nrf51822/blob/76959374986b843afd940fec5ae9bd39c0abcad7/source/nRF5xGap.cpp#L370"&gt;see the source here on Github&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Peripheral initiates disconnection</title><link>https://devzone.nordicsemi.com/thread/50617?ContentTypeID=1</link><pubDate>Sun, 17 Apr 2016 22:55:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2001fde5-5a40-487f-b107-2e6d52ec269b</guid><dc:creator>Shay Ohayon</dc:creator><description>&lt;p&gt;Is this implemented in mbed?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Peripheral initiates disconnection</title><link>https://devzone.nordicsemi.com/thread/50616?ContentTypeID=1</link><pubDate>Sun, 17 Apr 2016 22:53:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:300f8a60-e5c3-481a-aba1-9f927975972a</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;&lt;code&gt;sd_ble_gap_disconnect()&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>