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

some questions about Bluetooth pairing

I am using the nRF52832 development board, S132 and SDK11.0, I have some questions about Bluetooth pairing,The project under the link:examples\ble_peripheral\ble_app_uart\pca10040\s132\arm4,Pairing process in the serial program is not implemented。so BLE can Send data without pairing?The program never runs BLE_GAP_EVT_SEC_PARAMS_REQUEST。

static void on_ble_evt(ble_evt_t * p_ble_evt)
{
    uint32_t                         err_code;

switch (p_ble_evt->header.evt_id)
{
    case BLE_GAP_EVT_CONNECTED:
        err_code = bsp_indication_set(BSP_INDICATE_CONNECTED);
        APP_ERROR_CHECK(err_code);
        m_conn_handle = p_ble_evt->evt.gap_evt.conn_handle;
        break;
        
    case BLE_GAP_EVT_DISCONNECTED:
        err_code = bsp_indication_set(BSP_INDICATE_IDLE);
        APP_ERROR_CHECK(err_code);
        m_conn_handle = BLE_CONN_HANDLE_INVALID;
        break;

    case BLE_GAP_EVT_SEC_PARAMS_REQUEST:
        // Pairing not supported
        err_code = sd_ble_gap_sec_params_reply(m_conn_handle, BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP, NULL, NULL);
        APP_ERROR_CHECK(err_code);
        break;

    case BLE_GATTS_EVT_SYS_ATTR_MISSING:
        // No system attributes have been stored.
        err_code = sd_ble_gatts_sys_attr_set(m_conn_handle, NULL, 0, 0);
        APP_ERROR_CHECK(err_code);
        break;

    default:
        // No implementation needed.
        break;
}

}

Parents Reply Children
No Data
Related