<?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 can I disconnect a peripheral in ble?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18444/how-can-i-disconnect-a-peripheral-in-ble</link><description>I have a nRF51822 and I want to disconnect it from a peripheral for a time. I&amp;#39;m using mbed. I&amp;#39;m trying with ble.disconnect() but it doesn&amp;#39;t work.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 16 Dec 2016 16:12:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18444/how-can-i-disconnect-a-peripheral-in-ble" /><item><title>RE: How can I disconnect a peripheral in ble?</title><link>https://devzone.nordicsemi.com/thread/71174?ContentTypeID=1</link><pubDate>Fri, 16 Dec 2016 16:12:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20c8187b-1dcd-4c96-8926-0aa884c5e00f</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Take a look at &lt;a href="https://devzone.nordicsemi.com/question/76039/peripheral-initiates-disconnection/?answer=76426#post-id-76426"&gt;this post&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I disconnect a peripheral in ble?</title><link>https://devzone.nordicsemi.com/thread/71173?ContentTypeID=1</link><pubDate>Fri, 16 Dec 2016 15:35:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc69535e-561b-47a5-b0f5-d4215aee6e44</guid><dc:creator>mikelugarte</dc:creator><description>&lt;p&gt;I used 0x13 (REMOTE_USER_TERMINATED_CONNECTION)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I disconnect a peripheral in ble?</title><link>https://devzone.nordicsemi.com/thread/71172?ContentTypeID=1</link><pubDate>Fri, 16 Dec 2016 15:33:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c13acc25-e8fc-4d84-9add-bcc9fda96f69</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;What &lt;a href="https://github.com/ARMmbed/ble/blob/8d97fced5440d78c9557693b6d1632f1ab5d77b7/ble/Gap.h#L104"&gt;value&lt;/a&gt; did you use as &amp;quot;reason&amp;quot; ? You should use &lt;code&gt;LOCAL_HOST_TERMINATED_CONNECTION&lt;/code&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I disconnect a peripheral in ble?</title><link>https://devzone.nordicsemi.com/thread/71171?ContentTypeID=1</link><pubDate>Fri, 16 Dec 2016 15:30:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3962a40d-ea31-4100-80be-1c1682d0ea6a</guid><dc:creator>mikelugarte</dc:creator><description>&lt;p&gt;I implemented it and it gives the next error: No instance of overloaded function &amp;quot;Gap::Disconnect&amp;quot; matches the argument list &amp;quot;ble.gap().disconnect(reason);&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I disconnect a peripheral in ble?</title><link>https://devzone.nordicsemi.com/thread/71170?ContentTypeID=1</link><pubDate>Fri, 16 Dec 2016 14:51:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98505d5a-578d-4289-8cdc-c9edb48aea49</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Have you tried  &lt;code&gt;ble.gap().disconnect(reason)&lt;/code&gt; ?&lt;/p&gt;
&lt;p&gt;Take a look at the mbed BLE.h file &lt;a href="https://github.com/ARMmbed/ble/blob/master/ble/BLE.h#L832"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>