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

Missing BLE_GATTC_EVT_WRITE_RSP

Hello,

I have a problem with writing to server characteristic (battery service and custom). sd_ble_gattc_write function returns 0x11 which means another write with response is ongoing. There is no BLE_GATTC_EVT_WRITE_RSP. Problem is after connecting when a lot of data is exchanged with peripheral. After connection is established, it works great. Message is still in local queue, but tx_proccess isn't called from ble event handler (debugger doesn't stop at breakpoint and no output in RTT Viewer). Writing new value unlocks mechanism and all queued messages are sent.

Is it possible that any internal queue is full? Am I missing something? Antoher BLE_GATTC_EVT should be handled?

SD 5.0.0 SDK 14

Edit: I moved tx_buffer_process from 'on_write_rsp' and 'on_read_rsp' functions directly to ble_bas_c_ble_evt_handler so any ble event causes attempt to write data and it works. sd_ble_gattc_write starts returning NRF_SUCCESS and BLE_GATTC_EVT_WRITE_RESP is present after NRF_BLE_GATT_EVT_ATT_MTU_UPDATED event occurred. MTU change request blocks write operation?

Related