Hello all,
I am migrating our FW NRF52832 from SDK11 to SDK17. (Actually I am starting from scratch on 17).
Here I have two characteristics with only read properties (e.g. version string).
I can't get the read to read out so that I get a readevent (onread()). The read from the client only gets 0 values. I can't find any examples in the ./Examples where only the read characteristic is described.
I also don't know how/ where to include "on_read()".
Do you have a working example for me to copy this from?
I have tried this:
in uint32_t ble_cus_init(ble_cus_t *
/***********************************************************************************
// Add the version characteristic.
uint8_t pot_char_init_value [1] = {0};
memset(&add_char_params, 0, sizeof(add_char_params));
add_char_params.uuid = VERSION_STRING_CHAR_UUID;
add_char_params.uuid_type = p_cus->uuid_type;
add_char_params.init_len = 16;// (in bytes)
add_char_params.max_len = 16;
add_char_params.p_init_value = pot_char_init_value;
add_char_params.char_props.read = 1;
add_char_params.char_props.notify = 0;
add_char_params.read_access = SEC_OPEN;
add_char_params.cccd_write_access = SEC_NO_ACCESS;
err_code = characteristic_add(p_cus->service_handle,
&add_char_params,
&p_cus->version_string_char_handles);
if (err_code != NRF_SUCCESS)
{
return err_code;
}