I'm trying to create a read event whenever a certain characteristic is read. I used BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST event to monitor that. I also set "is_defered_read" to true in the code as shown below tot the service initialization code:
add_char_params.char_props.read = 1;
add_char_params.char_props.write = 1;
add_char_params.is_defered_read=1;
add_char_params.read_access = SEC_OPEN;
add_char_params.write_access = SEC_OPEN;
the problem is that when I do that, NRF_connect freezes for a few seconds and then gives me "Gatt timeout error"
If I remove "add_char_params.is_defered_read", the code works normally again.
I'm not sure what I'm doing wrong here. I appreciate any comments.
Thanks.