<?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>if i disconnect slave a, slave b will auto disconnect also, and later slave b connect again.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43232/if-i-disconnect-slave-a-slave-b-will-auto-disconnect-also-and-later-slave-b-connect-again</link><description>dear 
 i am using this project as slave 
 \nRF5_SDK_14.2.0_17b948a\examples\ble_peripheral\ble_app_uart\ 
 this project as central 
 \nRF5_SDK_14.2.0_17b948a\examples\ble_central\ble_app_uart_c\ 
 i have two slave connected with the center. 
 i find a</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 04 Feb 2019 12:51:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43232/if-i-disconnect-slave-a-slave-b-will-auto-disconnect-also-and-later-slave-b-connect-again" /><item><title>RE: if i disconnect slave a, slave b will auto disconnect also, and later slave b connect again.</title><link>https://devzone.nordicsemi.com/thread/169297?ContentTypeID=1</link><pubDate>Mon, 04 Feb 2019 12:51:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:424446e1-0c30-4af4-9056-626845fa50da</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Please answer the question regarding on how you disconnect the slave ?&amp;nbsp;&lt;br /&gt;Please post the code where you handle&amp;nbsp;BLE_GAP_EVT_DISCONNECTED.&lt;/p&gt;
&lt;p&gt;I assume you have 4 different&amp;nbsp;m_conn_handle ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;On slave B, which disconnect reason do you get ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF-Sniffer/"&gt;sniffer trace&lt;/a&gt; on slave B connection could be useful to see why it get disconnected.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if i disconnect slave a, slave b will auto disconnect also, and later slave b connect again.</title><link>https://devzone.nordicsemi.com/thread/169137?ContentTypeID=1</link><pubDate>Sat, 02 Feb 2019 01:49:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b62a579e-88aa-42b8-bba2-9d7a69c177f9</guid><dc:creator>lyman</dc:creator><description>&lt;p&gt;i define&amp;nbsp; more instance&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BLE_NUS_C_DEF(m_ble_nus_c); /**&amp;lt; BLE NUS service client instance. */&lt;br /&gt;BLE_NUS_C_DEF(m_ble_nus_c1);&lt;br /&gt;BLE_NUS_C_DEF(m_ble_nus_c2);&lt;br /&gt;BLE_NUS_C_DEF(m_ble_nus_c3);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BLE_DB_DISCOVERY_DEF(m_db_disc);&lt;br /&gt;BLE_DB_DISCOVERY_DEF(m_db_disc1);&lt;br /&gt;BLE_DB_DISCOVERY_DEF(m_db_disc2);&lt;br /&gt;BLE_DB_DISCOVERY_DEF(m_db_disc3);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;in function static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)&lt;/p&gt;
&lt;p&gt;i add the following code&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;if(p_ble_evt-&amp;gt;evt.gap_evt.conn_handle == 0)&lt;br /&gt; {&lt;br /&gt; err_code = ble_nus_c_handles_assign(&amp;amp;m_ble_nus_c, p_ble_evt-&amp;gt;evt.gap_evt.conn_handle, NULL);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;br /&gt; }&lt;br /&gt; if(p_ble_evt-&amp;gt;evt.gap_evt.conn_handle == 1)&lt;br /&gt; {&lt;br /&gt; err_code = ble_nus_c_handles_assign(&amp;amp;m_ble_nus_c1, p_ble_evt-&amp;gt;evt.gap_evt.conn_handle, NULL);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;br /&gt; }&lt;br /&gt; if(p_ble_evt-&amp;gt;evt.gap_evt.conn_handle == 2)&lt;br /&gt; {&lt;br /&gt; err_code = ble_nus_c_handles_assign(&amp;amp;m_ble_nus_c2, p_ble_evt-&amp;gt;evt.gap_evt.conn_handle, NULL);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;br /&gt; }&lt;br /&gt; if(p_ble_evt-&amp;gt;evt.gap_evt.conn_handle == 3)&lt;br /&gt; {&lt;br /&gt; err_code = ble_nus_c_handles_assign(&amp;amp;m_ble_nus_c3, p_ble_evt-&amp;gt;evt.gap_evt.conn_handle, NULL);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; if(p_ble_evt-&amp;gt;evt.gap_evt.conn_handle == 0)&lt;br /&gt; {&lt;br /&gt; err_code = ble_db_discovery_start(&amp;amp;m_db_disc, p_ble_evt-&amp;gt;evt.gap_evt.conn_handle);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;br /&gt; }&lt;br /&gt; if(p_ble_evt-&amp;gt;evt.gap_evt.conn_handle == 1)&lt;br /&gt; {&lt;br /&gt; err_code = ble_db_discovery_start(&amp;amp;m_db_disc1, p_ble_evt-&amp;gt;evt.gap_evt.conn_handle); &lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; if(p_ble_evt-&amp;gt;evt.gap_evt.conn_handle == 2)&lt;br /&gt; {&lt;br /&gt; err_code = ble_db_discovery_start(&amp;amp;m_db_disc2, p_ble_evt-&amp;gt;evt.gap_evt.conn_handle);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;br /&gt; }&lt;br /&gt; if(p_ble_evt-&amp;gt;evt.gap_evt.conn_handle == 3)&lt;br /&gt; {&lt;br /&gt; err_code = ble_db_discovery_start(&amp;amp;m_db_disc3, p_ble_evt-&amp;gt;evt.gap_evt.conn_handle); &lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;br /&gt; }&lt;br /&gt; err_code = bsp_indication_set(BSP_INDICATE_CONNECTED);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;br /&gt; &lt;br /&gt; if (ble_conn_state_n_centrals() == NRF_SDH_BLE_CENTRAL_LINK_COUNT)&lt;br /&gt; {&lt;br /&gt; ;&lt;br /&gt; }&lt;br /&gt; else&lt;br /&gt; { &lt;br /&gt; scan_start(); &lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;the config&amp;#39;s following&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;// &amp;lt;o&amp;gt; NRF_SDH_BLE_PERIPHERAL_LINK_COUNT - Maximum number of peripheral links. &lt;br /&gt;#ifndef NRF_SDH_BLE_PERIPHERAL_LINK_COUNT&lt;br /&gt;#define NRF_SDH_BLE_PERIPHERAL_LINK_COUNT 0&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;// &amp;lt;o&amp;gt; NRF_SDH_BLE_CENTRAL_LINK_COUNT - Maximum number of central links. &lt;br /&gt;#ifndef NRF_SDH_BLE_CENTRAL_LINK_COUNT&lt;br /&gt;#define NRF_SDH_BLE_CENTRAL_LINK_COUNT 4&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;// &amp;lt;o&amp;gt; NRF_SDH_BLE_TOTAL_LINK_COUNT - Maximum number of total concurrent connections using the default configuration. &lt;br /&gt;#ifndef NRF_SDH_BLE_TOTAL_LINK_COUNT&lt;br /&gt;#define NRF_SDH_BLE_TOTAL_LINK_COUNT 4&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;// &amp;lt;o&amp;gt; NRF_SDH_BLE_GAP_EVENT_LENGTH - The time set aside for this connection on every connection interval in 1.25 ms units. &lt;br /&gt;#ifndef NRF_SDH_BLE_GAP_EVENT_LENGTH&lt;br /&gt;#define NRF_SDH_BLE_GAP_EVENT_LENGTH 3&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;// &amp;lt;o&amp;gt; NRF_SDH_BLE_GATT_MAX_MTU_SIZE - Static maximum MTU size. &lt;br /&gt;#ifndef NRF_SDH_BLE_GATT_MAX_MTU_SIZE&lt;br /&gt;#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 247&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;// &amp;lt;o&amp;gt; NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE - Attribute Table size in bytes. The size must be a multiple of 4. &lt;br /&gt;#ifndef NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE&lt;br /&gt;#define NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE 1408&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;// &amp;lt;o&amp;gt; NRF_SDH_BLE_VS_UUID_COUNT - The number of vendor-specific UUIDs. &lt;br /&gt;#ifndef NRF_SDH_BLE_VS_UUID_COUNT&lt;br /&gt;#define NRF_SDH_BLE_VS_UUID_COUNT 1&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;// &amp;lt;q&amp;gt; NRF_SDH_BLE_SERVICE_CHANGED - Include the Service Changed characteristic in the Attribute Table.&lt;/p&gt;
&lt;p&gt;#ifndef NRF_SDH_BLE_SERVICE_CHANGED&lt;br /&gt;#define NRF_SDH_BLE_SERVICE_CHANGED 0&lt;br /&gt;#endif&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: if i disconnect slave a, slave b will auto disconnect also, and later slave b connect again.</title><link>https://devzone.nordicsemi.com/thread/169072?ContentTypeID=1</link><pubDate>Fri, 01 Feb 2019 13:16:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0acd8370-2b36-4f5d-a4b4-fc6ee4617e1a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Lyman,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As far as I know the&amp;nbsp;&lt;span&gt;ble_app_uart_c only connect to one board at a time. Did you modify the code to connect to multiple server ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Have you made sure you used the correct conn_handle when dealing with multiple servers/slaves ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How did you disconnect slave a ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>