<?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>BLE disconnect</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19957/ble-disconnect</link><description>I use below code to disconnect the BLE device from mobile phone. But it return err_code =7. Please comments. 
 if(m_conn_handle!=BLE_CONN_HANDLE_INVALID)
 {
 LocalInitiateddDisconnect = true;
 err_code = sd_ble_gap_disconnect(m_conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Feb 2017 13:06:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19957/ble-disconnect" /><item><title>RE: BLE disconnect</title><link>https://devzone.nordicsemi.com/thread/77654?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2017 13:06:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b87fba53-f0aa-43d7-a433-81d5c69c500a</guid><dc:creator>Alex</dc:creator><description>&lt;p&gt;May be you have more than one declaration of m_conn_handle, one of them is global and second one is static?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE disconnect</title><link>https://devzone.nordicsemi.com/thread/77658?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2017 12:24:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a7ba322-22cb-4e1d-804d-1ecabaf34335</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;7 is NRF_ERROR_INVALID_PARAM, so it is probably m_conn_handle that is invalid. I&amp;#39;m not sure why, and it is a bit difficult with the amount of information you have given.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE disconnect</title><link>https://devzone.nordicsemi.com/thread/77657?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2017 11:50:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab9ff69c-a832-47cf-a0c7-93058534ead8</guid><dc:creator>Fiske</dc:creator><description>&lt;p&gt;I am using the ble_uart_app example, and the m_conn_handle is the variable used in the app.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE disconnect</title><link>https://devzone.nordicsemi.com/thread/77656?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2017 11:47:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61c4a2f6-7545-4582-a01b-1ba891cd0d2a</guid><dc:creator>Fiske</dc:creator><description>&lt;p&gt;I am using S130 nRF5_SDK_12.0.0,
Just don&amp;#39;t know why the m_conn_handle value is Error (col 1): unknown or ambiguous symbol. m_conn_handle. I am using IAR.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE disconnect</title><link>https://devzone.nordicsemi.com/thread/77655?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2017 11:22:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9d16a5f-4d77-4ce0-86ef-18e4dd48878b</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;What SDK and SoftDevice version are you using? What is the value of m_conn_handle?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>