|
原先的application固件
#define SEC_PARAM_BOND 1
#define SEC_PARAM_MITM 1
#define SEC_PARAM_IO_CAPABILITIES BLE_GAP_IO_CAPS_DISPLAY_ONLY
#define SEC_PARAM_OOB 0
#define SEC_PARAM_MIN_KEY_SIZE 7
#define SEC_PARAM_MAX_KEY_SIZE 16
static void device_manager_init(bool erase_bonds)
{
uint32_t err_code;
dm_init_param_t init_param = {.clear_persistent_data = erase_bonds};
dm_application_param_t register_param;
// Initialize persistent storage module.
err_code = pstorage_init();
APP_ERROR_CHECK(err_code);
err_code = dm_init(&init_param);
APP_ERROR_CHECK(err_code);
memset(®ister_param.sec_param, 0, sizeof(ble_gap_sec_params_t));
register_param.sec_param.bond = SEC_PARAM_BOND;
register_param.sec_param.mitm = SEC_PARAM_MITM;
register_param.sec_param.io_caps = SEC_PARAM_IO_CAPABILITIES;
register_param.sec_param.oob = SEC_PARAM_OOB;
register_param.sec_param.min_key_size = SEC_PARAM_MIN_KEY_SIZE;
register_param.sec_param.max_key_size = SEC_PARAM_MAX_KEY_SIZE;
register_param.evt_handler = device_manager_evt_handler;
register_param.service_type = DM_PROTOCOL_CNTXT_GATT_SRVR_ID;
err_code = dm_register(&m_app_handle, ®ister_param);
APP_ERROR_CHECK(err_code);
}
按照上述配置,未加入dfu时,配对功能正常。加入dfu以后,配对码配对界面能够显示,但是输入配对码以后,配对不能成功,请问这个是什么问题呢?
|
|