<?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>remove bond in  CTS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38214/remove-bond-in-cts</link><description>Hi, there 
 I want to remove the bond in current time service example, because the bond process make me less convenient when I debug. so I changed the code in peer_manager_init 
 sec_param.bond = 0; sec_param.mitm = SEC_PARAM_MITM; sec_param.lesc = SEC_PARAM_LESC;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 31 Jan 2019 06:56:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38214/remove-bond-in-cts" /><item><title>RE: remove bond in  CTS</title><link>https://devzone.nordicsemi.com/thread/168787?ContentTypeID=1</link><pubDate>Thu, 31 Jan 2019 06:56:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5a1eed0-ae31-4c8e-b6f7-134d2ccf710a</guid><dc:creator>alex_a</dc:creator><description>&lt;p&gt;I am having the same issue with retrieving the time from IOS once I remove bonding. I&amp;#39;m wondering whether IOS doesn&amp;#39;t allow access to the characteristic unless the device is bonded? Although, I can&amp;#39;t seem to find any documentation to prove or disprove this... With regards to not disconnecting, I believe IOS&amp;nbsp;may hold onto a connection for a period of time even after you initiate the disconnection through core bluetooth&amp;#39;s API.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: remove bond in  CTS</title><link>https://devzone.nordicsemi.com/thread/165249?ContentTypeID=1</link><pubDate>Fri, 11 Jan 2019 17:17:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a440296-fefe-45b6-972d-f618f601078a</guid><dc:creator>jcvandegrift</dc:creator><description>&lt;p&gt;I&amp;#39;m interested in what BLE Central you used for testing. I&amp;#39;m using iOS 12.1.1 and finding that the time read function executes (triggered by the button press) without error but I never see the time event return.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: remove bond in  CTS</title><link>https://devzone.nordicsemi.com/thread/165029?ContentTypeID=1</link><pubDate>Thu, 10 Jan 2019 20:57:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed834084-2ec5-440a-83d7-6a3cf75c7378</guid><dc:creator>jcvandegrift</dc:creator><description>&lt;p&gt;Is it these three sections on top of luckxiaoer&amp;#39;s original attempt or just these three sections? I&amp;#39;ve tried it both ways in SDK 14.2 on a DK board and the time read function returns no error but I never get the event which calls the print time function. Also disconnect is not cleanly handled, If I close any app that I use to make the connectin the DK thinks it&amp;#39;s still connected, only disabling bluetooth will cause the DK to disconnect. Perhaps this 2nd issue is a clue to not getting the time event.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: remove bond in  CTS</title><link>https://devzone.nordicsemi.com/thread/147669?ContentTypeID=1</link><pubDate>Thu, 06 Sep 2018 16:35:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ba7d0ea-4b38-4815-842c-3fe90801343e</guid><dc:creator>luckxiaoer</dc:creator><description>&lt;p&gt;I&amp;#39;ve tried that out. It solved my problem,thank you!!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: remove bond in  CTS</title><link>https://devzone.nordicsemi.com/thread/147656?ContentTypeID=1</link><pubDate>Thu, 06 Sep 2018 15:38:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79f0bf5a-c7ab-4c2c-aa4d-119b03ef63a7</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Try this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;      // Pairing, no bonding.
      sec_param.bond = false;
      sec_param.mitm = false;
      sec_param.lesc = 0;
      sec_param.keypress = 0;
      sec_param.io_caps = BLE_GAP_IO_CAPS_NONE;
      sec_param.oob = false;
      sec_param.min_key_size = 7;
      sec_param.max_key_size = 16;
      sec_param.kdist_own.enc = 0;
      sec_param.kdist_own.id = 0;
      sec_param.kdist_peer.enc = 0;
      sec_param.kdist_peer.id = 0;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Other steps you should do:&lt;/p&gt;
&lt;p&gt;1) In&amp;nbsp;sec_req_timeout_handler() comment out&amp;nbsp;pm_conn_secure().&lt;/p&gt;
&lt;p&gt;Snippet:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void sec_req_timeout_handler(void * p_context)
{
    ret_code_t           err_code;
    pm_conn_sec_status_t status;

    if (m_cur_conn_handle != BLE_CONN_HANDLE_INVALID)
    {
        err_code = pm_conn_sec_status_get(m_cur_conn_handle, &amp;amp;status);
        APP_ERROR_CHECK(err_code);

        // If the link is still not secured by the peer, initiate security procedure.
        if (!status.encrypted)
        {
         //   err_code = pm_conn_secure(m_cur_conn_handle, false);
         //   APP_ERROR_CHECK(err_code);
        }
    }
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;2) On the event&amp;nbsp;BLE_GAP_EVT_CONNECTED, start discovery of peer&amp;#39;s services with&amp;nbsp;ble_db_discovery_start()&lt;/p&gt;
&lt;p&gt;Snippet:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
{
    ret_code_t err_code;

    switch (p_ble_evt-&amp;gt;header.evt_id)
    {
        case BLE_GAP_EVT_CONNECTED:
            NRF_LOG_INFO(&amp;quot;Connected.&amp;quot;);
            err_code = bsp_indication_set(BSP_INDICATE_CONNECTED);
            APP_ERROR_CHECK(err_code);
            m_cur_conn_handle = p_ble_evt-&amp;gt;evt.gap_evt.conn_handle;
            err_code = app_timer_start(m_sec_req_timer_id, SECURITY_REQUEST_DELAY, NULL);
            APP_ERROR_CHECK(err_code);
            // Discover peer&amp;#39;s services.
            err_code  = ble_db_discovery_start(&amp;amp;m_ble_db_discovery, p_ble_evt-&amp;gt;evt.gap_evt.conn_handle);
            APP_ERROR_CHECK(err_code);

            break;

        case BLE_GAP_EVT_DISCONNECTED:
            NRF_LOG_INFO(&amp;quot;Disconnected.&amp;quot;);
            m_cur_conn_handle = BLE_CONN_HANDLE_INVALID;
            if (p_ble_evt-&amp;gt;evt.gap_evt.conn_handle == m_cts_c.conn_handle)
            {
                m_cts_c.conn_handle = BLE_CONN_HANDLE_INVALID;
            }
            break; // BLE_GAP_EVT_DISCONNECTED

#ifndef S140
        case BLE_GAP_EVT_PHY_UPDATE_REQUEST:
        {
            NRF_LOG_DEBUG(&amp;quot;PHY update request.&amp;quot;);
            ble_gap_phys_t const phys =
            {
                .rx_phys = BLE_GAP_PHY_AUTO,
                .tx_phys = BLE_GAP_PHY_AUTO,
            };
            err_code = sd_ble_gap_phy_update(p_ble_evt-&amp;gt;evt.gap_evt.conn_handle, &amp;amp;phys);
            APP_ERROR_CHECK(err_code);
        } break;
#endif

        case BLE_GATTC_EVT_TIMEOUT:
            // Disconnect on GATT Client timeout event.
            NRF_LOG_DEBUG(&amp;quot;GATT Client Timeout.&amp;quot;);
            err_code = sd_ble_gap_disconnect(p_ble_evt-&amp;gt;evt.gattc_evt.conn_handle,
                                             BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
            APP_ERROR_CHECK(err_code);
            break;

        case BLE_GATTS_EVT_TIMEOUT:
            // Disconnect on GATT Server timeout event.
            NRF_LOG_DEBUG(&amp;quot;GATT Server Timeout.&amp;quot;);
            err_code = sd_ble_gap_disconnect(p_ble_evt-&amp;gt;evt.gatts_evt.conn_handle,
                                             BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
            APP_ERROR_CHECK(err_code);
            break;

        default:
            // No implementation needed.
            break;
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;3) In&amp;nbsp;advertising_init(), turn off whitelist advertising by setting&amp;nbsp;ble_adv_whitelist_enabled to false&lt;/p&gt;
&lt;p&gt;Snippet:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void advertising_init()
{
    ret_code_t             err_code;
    ble_advertising_init_t init;

    memset(&amp;amp;init, 0, sizeof(init));

    init.advdata.name_type                = BLE_ADVDATA_FULL_NAME;
    init.advdata.include_appearance       = true;
    init.advdata.flags                    = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;
    init.advdata.uuids_solicited.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
    init.advdata.uuids_solicited.p_uuids  = m_adv_uuids;

    init.config.ble_adv_whitelist_enabled = false;
    init.config.ble_adv_fast_enabled      = true;
    init.config.ble_adv_fast_interval     = APP_ADV_FAST_INTERVAL;
    init.config.ble_adv_fast_timeout      = APP_ADV_FAST_TIMEOUT;
    init.config.ble_adv_slow_enabled      = true;
    init.config.ble_adv_slow_interval     = APP_ADV_SLOW_INTERVAL;
    init.config.ble_adv_slow_timeout      = APP_ADV_SLOW_TIMEOUT;

    init.evt_handler = on_adv_evt;

    err_code = ble_advertising_init(&amp;amp;m_advertising, &amp;amp;init);
    APP_ERROR_CHECK(err_code);

    ble_advertising_conn_cfg_tag_set(&amp;amp;m_advertising, APP_BLE_CONN_CFG_TAG);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>