nRF52832_XXAA, nRF SDK 14.0.0, SoftDevice 132 v5.0.1
We run a single service with 2 characteristics: one for "target to host" and the other for "host to target", where the "target" is our embedded device running the nRF52 + SD and the "host" is either a computer with a BLE USB dongle or a mobile app on a BLE-enabled handset. The target has a 65-byte MTU for power optimization purposes.
Our connection interval is 1 second, but while connected we have enough time to receive ~3 65-byte MTU frames.
We've just encountered a use case, for the first time, where the host is sending > 65 bytes inside of one connection interval: we never added a BLE_EVT_USER_MEM_REQUEST handler so SoftDevice is disconnecting us.
It's easy enough for us to service this request with a reserved 256-byte static buffer, but before we do that I'd like a clear normative statement from Nordic support that answers the following questions, please.
Given our specific use case:
- What other scenarios that we haven't yet encountered would trigger BLE_EVT_USER_MEM_REQUEST?
- Will SD issue multiple BLE_EVT_USER_MEM_REQUEST events before any memory is released? (Do we need a more general allocator, or will a single static buffer work?)
Thanks,
Charles