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

BLE Gatt Queue Library with sd_ble_gattc_write NRF_ERROR_RESOURCES

I am running SDK 16.0 on nrf52840. For GATT Writes I am using the BLE Gatt Queue Library. When I try to performing lots of writes in succession some packets do not get transmitted and I have tied it to sd_ble_gattc_write returning NRF_ERROR_RESOURCES and the data not being queued. My question is why does the GATT Queue library not queue up this transmission? The only time it will be queued is if the write attempt returns NRF_ERROR_BUSY. Seems like if NRF_ERROR_RESOURCES is received then it too should be queued. What is the reason for not queuing?

Parents Reply
  • Hi, yes I read all of that. I have increased ble_gattc_conn_cfg_t::write_cmd_tx_queue_size to the maximum my ram will allow and I still get NRF_ERROR_RESOURCES. I could keep my own queue for this case but then what is the point of the Gatt Queue? I feel this would be a perfect use of the Gatt Queue. If the Gattc Tx Queue is full then push to Gatt Queue. And then it could handle popping off the data when BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE is received. 

    My question truly is why does it not do this already? What is the rationale? It seems that Gatt Queue only handles a small set of use cases and could be easily expanded, it already handles Write with Response properly, would be easy to handle Write without Response.

Children
Related