<?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>Stop the connection between a central nrf52832 and several peripherals nrf52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33102/stop-the-connection-between-a-central-nrf52832-and-several-peripherals-nrf52832</link><description>Hello everybody ! Designing with the development board nRF52832 and SDK14.2. 
 My code is based on the code of the &amp;quot;ble_app_multilink_central&amp;quot; on which, I added some of the code &amp;quot;ble_app_uart_c&amp;quot; for the initialization and the event manager on the uart</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 Apr 2018 09:13:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33102/stop-the-connection-between-a-central-nrf52832-and-several-peripherals-nrf52832" /><item><title>RE: Stop the connection between a central nrf52832 and several peripherals nrf52832</title><link>https://devzone.nordicsemi.com/thread/127570?ContentTypeID=1</link><pubDate>Tue, 10 Apr 2018 09:13:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9b8736a-9ae5-4e54-841c-11ade484e975</guid><dc:creator>Yoann_F</dc:creator><description>&lt;p&gt;&lt;span title=""&gt;Thank you very much for the help, Sigurd.&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span title=""&gt;I succeeded thanks to your help.&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span title=""&gt;It was really stupid, I completely forgot the events ble with my event uart ... Ahah ...&lt;/span&gt;&lt;br /&gt;&lt;span title=""&gt;Thanks again !&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stop the connection between a central nrf52832 and several peripherals nrf52832</title><link>https://devzone.nordicsemi.com/thread/127471?ContentTypeID=1</link><pubDate>Mon, 09 Apr 2018 14:29:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8f9c529-f377-44d3-98ad-5aeff3c83e93</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;[quote userid="69839" url="~/f/nordic-q-a/33102/stop-the-connection-between-a-central-nrf52832-and-several-peripherals-nrf52832/127231"]&lt;span title=""&gt;&lt;span style="text-decoration:underline;"&gt;problem:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span title=""&gt;After pressing &amp;quot;3&amp;quot; (disconnection), a few moments later, my central reconnects to 2 device without I press &amp;quot;1&amp;quot; (start scan).&amp;nbsp;&lt;/span&gt;&lt;span title=""&gt;&lt;span&gt;I even try following the connection to make a &amp;quot;sd_ble_gap_scan_stop ()&amp;quot; but no change:&lt;/span&gt;&lt;/span&gt;[/quote]&lt;/p&gt;
&lt;p&gt;The call to sd_ble_gap_disconnect() will initiate the disconnection procedure, and its completion will be communicated to the application with a BLE_GAP_EVT_DISCONNECTED event. By default the multi-link example will start scanning again when it gets the&amp;nbsp;&lt;span&gt;BLE_GAP_EVT_DISCONNECTED event. If this is not behavior you want, you can should comment out the call to the&amp;nbsp;scan_start() function when you get the&amp;nbsp;BLE_GAP_EVT_DISCONNECTED&amp;nbsp;event.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Snippet on how the example handles BLE_GAP_EVT_DISCONNECTED :&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;        case BLE_GAP_EVT_DISCONNECTED:
        {
            NRF_LOG_INFO(&amp;quot;LBS central link 0x%x disconnected (reason: 0x%x)&amp;quot;,
                         p_gap_evt-&amp;gt;conn_handle,
                         p_gap_evt-&amp;gt;params.disconnected.reason);

            if (ble_conn_state_n_centrals() == 0)
            {
                err_code = app_button_disable();
                APP_ERROR_CHECK(err_code);

                // Turn off connection indication LED
                bsp_board_led_off(CENTRAL_CONNECTED_LED);
            }

            // Start scanning
            scan_start();

            // Turn on LED for indicating scanning
            bsp_board_led_on(CENTRAL_SCANNING_LED);

        } break;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stop the connection between a central nrf52832 and several peripherals nrf52832</title><link>https://devzone.nordicsemi.com/thread/127231?ContentTypeID=1</link><pubDate>Fri, 06 Apr 2018 13:33:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc566a91-0a25-48ee-ad86-0bb44dbd8a3f</guid><dc:creator>Yoann_F</dc:creator><description>&lt;p&gt;&lt;span class="" title=""&gt;I finally managed to design a system that allows me by pressure on:&lt;/span&gt;&lt;br /&gt;&lt;span title=""&gt;- &amp;quot;1&amp;quot; to start scanning / connecting to the 2 peripheral devices&lt;/span&gt;&lt;br /&gt;&lt;span title=""&gt;- &amp;quot;2&amp;quot; turn on an LED at my convenience (will be used later for something else)&lt;/span&gt;&lt;br /&gt;&lt;span title=""&gt;- &amp;quot;3&amp;quot; disconnect me peripherals with which I am connected&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span title=""&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void uart_event_handle(app_uart_evt_t * p_event)
{
    static uint8_t data_array[30];
    static uint16_t index = 0;
    static uint16_t disco = 0;
    uint32_t ret_val; 

    static char const start[] = &amp;quot;1&amp;quot;;
    static char const acquisition[] = &amp;quot;2&amp;quot;;
    static char const disconnect[] = &amp;quot;3&amp;quot;;
   
    /*static uint8_t test = 0x01;
    ble_gattc_write_params_t write_params = {0};
    write_params.write_op = BLE_GATT_OP_WRITE_CMD;
    write_params.handle = numconn_handle1;
    write_params.offset = 0x0000;
    write_params.len = sizeof(test);
    write_params.p_value = test;*/
    
    UNUSED_VARIABLE(app_uart_get(&amp;amp;data_array[index]));

    if (memcmp(start, data_array, sizeof(start)) == 0){
           //printf(&amp;quot;start&amp;quot;);
           scan_start();
           data_array[index] = 0;
    }
    else if (memcmp(acquisition, data_array, sizeof(acquisition)) == 0){
           //function to acquire values &amp;quot;characteristic&amp;quot;
           printf(&amp;quot;LEDdebug&amp;quot;);
           //sd_ble_gattc_write(numconn_handle1, &amp;amp;write_params);
           bsp_board_led_invert(LEDTEST);
           data_array[index] = 0;
    }
    else if (memcmp(disconnect, data_array, sizeof(disconnect)) == 0){
           //stop function BLE
           printf(&amp;quot;disconnect&amp;quot;);
           sd_ble_gap_disconnect(numconn_handle1,BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
           sd_ble_gap_disconnect(numconn_handle2,BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
           data_array[index] = 0;
    }
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span title=""&gt;&lt;span style="text-decoration:underline;"&gt;problem:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span title=""&gt;After pressing &amp;quot;3&amp;quot; (disconnection), a few moments later, my central reconnects to 2 device without I press &amp;quot;1&amp;quot; (start scan).&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span title=""&gt;&lt;span&gt;I even try following the connection to make a &amp;quot;sd_ble_gap_scan_stop ()&amp;quot; but no change:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span title=""&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    else if (memcmp(disconnect, data_array, sizeof(disconnect)) == 0){
           //stop function BLE
           printf(&amp;quot;disconnect&amp;quot;);
           sd_ble_gap_disconnect(numconn_handle1,BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
           sd_ble_gap_disconnect(numconn_handle2,BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
           sd_ble_gap_scan_stop();
           data_array[index] = 0;
    }&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span title=""&gt;&lt;span&gt;If anyone can have a solution / line of thought.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>