Hello Nordic team,
I'm using nrf52840 DK with SDK 15.3.0.
So I had an example sending data similarely to the ble_app_uart_c example that worked OK.
Basically I have a TX_FIFO with about 1KB data in it and I'm processing the data 20 bytes a time as Write without Response every time I received a BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event.
I needed to speed up the process so I looked into the documentation and saw that the Write without Response that can be queued : https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v6.1.1%2Fgroup___b_l_e___g_a_t_t_c___f_u_n_c_t_i_o_n_s.html&anchor=ga90298b8dcd8bbe7bbe69d362d1133378
I followed the described procedure from the documentation:
- Store initial queue element count in a variable.
- Decrement the variable, which stores the currently available queue element count, by one when a call to this function returns NRF_SUCCESS.
- Increment the variable, which stores the current available queue element count, by the count variable in BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE event.
And tests showed that I have 4 buffers availables (I can call sd_ble_gattc_write 4 times before NRF_ERROR_RESOURCES) whereas ble_gattc.h shows :
/** @defgroup BLE_GATTC_DEFAULTS GATT Client defaults
* @{ */
#define BLE_GATTC_WRITE_CMD_TX_QUEUE_SIZE_DEFAULT 1 /**< Default number of Write without Response that can be queued for transmission. */
But this variable doesn't seem to affect the number of buffers in my example, so I guess it is overwritten somewhere but I can't find where.
So here are my questions:
How to find where BLE_GATTC_WRITE_CMD_TX_QUEUE_SIZE_DEFAULT overwritten in my example ?
Do you have an example using the procedure describe in the documentation ? (If not I have a working example but some questions about how to optimize it)
Thanks in advance,
Aloïs KYROU.