This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Recieved Gatt timeout error when tried to generate a read request event

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.

Parents
  • Hi Simonr,

    Thanks for sending me the link. I went thought it but unfortunately I couldn't get my answer out of it. Would you mind checking Vidar's "ble_app_blinky_example"  example here? to me it seems  simple and very easy to follow. but it doesn't work for me. As I mentioned before, I get this error: "Error when calling 'reduceApp': Cannot read property 'toUpperCase' of null" .

    I wonder how would you modify the blinky example in order to have a read event?

    I appreciate your time and thanks for your help.

    Sincerely,

    Reza

Reply
  • Hi Simonr,

    Thanks for sending me the link. I went thought it but unfortunately I couldn't get my answer out of it. Would you mind checking Vidar's "ble_app_blinky_example"  example here? to me it seems  simple and very easy to follow. but it doesn't work for me. As I mentioned before, I get this error: "Error when calling 'reduceApp': Cannot read property 'toUpperCase' of null" .

    I wonder how would you modify the blinky example in order to have a read event?

    I appreciate your time and thanks for your help.

    Sincerely,

    Reza

Children
No Data
Related