I'm using SDK 7.1, PCA10028 eval board, SD310 2.0.1, MCP 3.6.0.8331
I'm trying to implement bonding. I first initialize pstorage, as a separate call from main. Then I call sec_params_init();
static void sec_params_init(void)
{
uint32_t err_code;
dm_application_param_t register_param;
dm_init_param_t init_data;
err_code = dm_init(&init_data);
APP_ERROR_CHECK(err_code);
memset(®ister_param.sec_param, 0, sizeof(ble_gap_sec_params_t));
register_param.sec_param.timeout = SEC_PARAM_TIMEOUT;
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);
The call err_code = dm_init(&init_data); returns a value of 0x0007 (Invalid parameter); What's wrong?
Thanks