Hello,
I've generated code via latest BDS and nRF51 SDK 10 plugin, and everything works OK, beside "desciptor" change. When I execute function to set value of descriptor:
ble_control_register_data_descriptor_set(&service_struct, &control_register_data_descriptor);
it returns "NRF_ERROR_INVALID_PARAM" and descriptor remain unchanged. I've checked arguments of the function and they match to declaration. in similar way, line above, I'm using also generated function for change related characteristic value:
ble_mug_control_register_data_set(&service_struct, &control_register_data);
and it works.
I can add that I'm calling this functions inside write event:
static void on_write(ble_service_t * p_service, ble_gatts_evt_write_t * p_ble_evt)
of other characteristic - I want achieve such behavior, that when client write "characteristic 1", then in "on_write", value of "characteristic 2" is evaluated as well as descriptor related to this characteristic.
I've prepared example, based on SDK10 example "experimental_bluetoothds_template", full source: experimental_bluetoothds_template_COPY.zip
www.filedropper.com/experimentalbluetoothdstemplatecopy
ble_service.c:114-118 contain code related to update descriptor value:
ble_service_control_register_data_new_descriptor_t descriptor;
uint8_t data = 0x88;
descriptor.control_register_data.size = 1;
descriptor.control_register_data.p_data = &data;
ble_service_control_register_data_new_descriptor_set(p_service, &descriptor);
Is there something I've missed, is impossible to change descriptor value in such scenario or there is other way to do this?