I'm currently adding a large characteristic (5.3 times bigger than my max MTU) to my device that supports multiple peripheral connections. This characteristic is used to set up/change a stored config on the device and so, will be written to seldomly but could be written to by more than one device at a time. Because it is only written to seldomly, i'm implementing queued writes using the queued writes module.
Each connection requires its own nrf_ble_qwr_t instance which also requires an allocation of user memory. If I allocate a buffer for each connection, the memory requirements will add up quickly. Is there a way I can deny a long write if there is already one in progress on another connection so that I can use only one buffer? Is there a better way to approach the problem?
My characteristic is 256 bytes long ant MTU of 51 which means i need a buffer of length of
(CEILING(256, (NRF_BLE_GATT_MAX_MTU_SIZE - 3)) * 6) + 256 + 2 = 294 bytes
I'm developing this for an NRF52840 SDK15.0 but will also port it to NRF52832 SDK 14.2
Bonus points if you can tell me how to do a long notification too