dev 모드 BLE 연결 수정
- dev 모드인 경우 보안 x
This commit is contained in:
@@ -1016,7 +1016,9 @@ static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
|
||||
#endif
|
||||
|
||||
#if FEATURE_SECURE_CONNECTION
|
||||
pm_handler_secure_on_connection(p_ble_evt);
|
||||
if (!ble_security_is_dev_mode()) {
|
||||
pm_handler_secure_on_connection(p_ble_evt);
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (p_ble_evt->header.evt_id)
|
||||
@@ -1098,10 +1100,18 @@ static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
|
||||
|
||||
case BLE_GAP_EVT_SEC_PARAMS_REQUEST:
|
||||
#if !FEATURE_SECURE_CONNECTION
|
||||
err_code = sd_ble_gap_sec_params_reply(m_conn_handle,
|
||||
BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP,
|
||||
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);
|
||||
#else
|
||||
if (ble_security_is_dev_mode()) {
|
||||
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);
|
||||
DBG_PRINTF("DEV: Rejected security request\r\n");
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user