This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ANCS pairing problem

HI , I used NRF52832 SDK15.3,examples:ble_app_ancs_c.When i testing ANCS,I deleted the pm_handler_secure_on_connection(p_ble_evt)  in the ble_evt_handler function,  The BLE connection was successful,after that for 10s, I called the function again,and noticed the pairing was very fast. But when " Notification point Characteristic found",it was needed 30s or 40s, I wondering why? thanks.

/**@brief Function for handling BLE events.
 *
 * @param[in]   p_ble_evt   Bluetooth stack event.
 * @param[in]   p_context   Unused.
 */
static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
{
    ret_code_t ret = NRF_SUCCESS;
   //pm_handler_secure_on_connection(p_ble_evt);
    switch (p_ble_evt->header.evt_id)
    {
        case BLE_GAP_EVT_CONNECTED:
            NRF_LOG_INFO("Connected.");
            ret = bsp_indication_set(BSP_INDICATE_CONNECTED);
            APP_ERROR_CHECK(ret);
            m_cur_conn_handle = p_ble_evt->evt.gap_evt.conn_handle;
            ret = nrf_ble_qwr_conn_handle_assign(&m_qwr, m_cur_conn_handle);
            APP_ERROR_CHECK(ret);
            break;
....................................
Related