Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Send Delayed Response to Bluetooth Read / Write Request

Hello Community,

this is my first question, since I could not find any clue on the internet and here on the devzone.

Problem:

I need to read/write a value to a GATT characteristics server which is then forwarded to a I2C. The I2C device is responding and I want to send the response to the client afterwards.

Do you have a clue how to solve this? I tried using the read/write authorization, but it forces me to send an immediate response

What am I doing wrong? Any ideas welcome?

Best regards

Andreas

Parents Reply Children
  • Hello,

    thanks for the repley. 

    I found the problem, it was within my software.

    The BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST is called on each read / write and then my code accidently answered via the sd_ble_gatts_rw_authorize_reply  call immediatly. It was not supposed to. 

    I fixed it by not calling sd_ble_gatts_rw_authorize_reply  immediatly, but from another function later after reading/writeing the data to the I2C device.

    regards

    Andreas

Related