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

In sdk9.0 s130,I want to pairing with phone,I have changed sec_param,but in the phone not display the entry passkey window.

this is my sec_param:

sec_param_bond   1
sec_param_mitm   1
sec_param_io_capabilities   ble_gap_io_display_only
sec_param_oob        0
sec_param_min_key_size     7
sec_param_max_key_size     16
passkey_length    6
static passkey   123456

this is on_ble_peripheral_evt:

case ..
case ble_gap_evt_sec_params_requset:
sec_param.bond  = 1
sec_param.mitm  = 1
sec_param.io_capabilities =  ble_gap_io_display_only
sec_param.oob     =  0
sec_param_min_key_size  =   7
sec_param_max_key_size   =  16
sec_param.kdist_periph.enc=1;
sec_param.kdist_periph.id=1;
err_code=sd_ble_gap_sec_params_reply(m_conn_handle_peripheral,ble_gap_sec_status_success,&sec_params,NULL);
APP_ERROR_CHECK(err_code);
case ..
Related