Hi everyone,
I'm using the nrf5_SDK_for_Mesh_v4.1.0 and i'm having troubles by trying to change the BLE name.
In the function gap_params_init i added a code to concatenate a the GAP_DEVICE_NAME with the DEVICEID so that i can have a unique name for each DK. My code is below
#if MESH_FEATURE_GATT_ENABLED
void gap_params_init(void)
{
uint32_t err_code;
ble_gap_conn_sec_mode_t sec_mode;
ble_gap_conn_params_t gap_conn_params;
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&sec_mode);
/*******/
char device_name[15];
uint8_t name_size;
name_size = strlen(GAP_DEVICE_NAME);
memcpy(device_name, GAP_DEVICE_NAME, name_size);
sprintf(&device_name[name_size], "%X", NRF_FICR->DEVICEID[0]);
uint32_t errCode= sd_ble_gap_device_name_set(&sec_mode, (const uint8_t *) device_name, strlen(device_name));
APP_ERROR_CHECK(errCode);
/******/
memset(&gap_conn_params, 0, sizeof(gap_conn_params));
GAP_CONN_PARAMS_INIT(gap_conn_params);
err_code = sd_ble_gap_ppcp_set(&gap_conn_params);
APP_ERROR_CHECK(err_code);
}
My problem is that the function sd_ble_gap_device_name_set returns en error 0x000003.
Can somebody help me please?
Thank you