<?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 disconnect central(Mobile App) from NRF52(Both central and Peripheral) using ble_app_hrs_rscs_relay example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85996/how-to-disconnect-central-mobile-app-from-nrf52-both-central-and-peripheral-using-ble_app_hrs_rscs_relay-example</link><description>Hello Team, 
 I am working on the ble_app_hrs_rscs_relay example, in which NRF act both as a central and peripheral. My peripheral is a heart sensor ( Polar H10 ) and my central is Mobile App. I have successfully disconnected the peripheral ( Polar H10</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Mar 2022 13:15:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85996/how-to-disconnect-central-mobile-app-from-nrf52-both-central-and-peripheral-using-ble_app_hrs_rscs_relay-example" /><item><title>RE: How to disconnect central(Mobile App) from NRF52(Both central and Peripheral) using ble_app_hrs_rscs_relay example</title><link>https://devzone.nordicsemi.com/thread/359146?ContentTypeID=1</link><pubDate>Mon, 21 Mar 2022 13:15:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d850608-ea0e-4e2b-89c7-d1d705ea70da</guid><dc:creator>Sami Ul Haq</dc:creator><description>&lt;p&gt;Thank You, Sir.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to disconnect central(Mobile App) from NRF52(Both central and Peripheral) using ble_app_hrs_rscs_relay example</title><link>https://devzone.nordicsemi.com/thread/359142?ContentTypeID=1</link><pubDate>Mon, 21 Mar 2022 13:13:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33feca39-92c2-4a5f-be7f-29d545c90d5e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Disconnecting simply involves calling&amp;nbsp;sd_ble_gap_disconnect() with the connection handle for the connection you want to disconnect from. This is the same for central and peripheral links. And the connection handle you get with the&amp;nbsp;BLE_GAP_EVT_CONNECTED event, and all subsequent events that involve that connection. Similarly, and API call you make that involves a connection has the connection handle as an input parameter, so that you can tell the stack which connection you are operating on (in case there are more).&lt;/p&gt;
[quote user=""]Is this the correct connection handler I have passed here?[/quote]
&lt;p&gt;I do not see enough of your code to day. If this is the connection handle you got from the&amp;nbsp;BLE_GAP_EVT_CONNECTED, then yes. If this is some other value you got from somewhere else, it is not correct. If you can have multiple connections concurrently (which is likely as I see your device can act both as a central and peripheral - ref &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/85871/disabling-the-advertising-and-scanning-by-a-short-press-of-a-button-and-re-enabling-it-by-pressing-the-same-button-again"&gt;old thread&lt;/a&gt;), then you may have multiple connection handles and must keep track of them. You can for instance make an array of handles, and if you want to disconnect form all, iterate through it and call&amp;nbsp;sd_ble_gap_disconnect() for each.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>