I my application, I wish to send a large (60 bytes) bulk of data atomically, i.e. either send all or nothing. Assume I cannot increase the MTU.
- Is it possible to query the number of free bytes the soft device has, so that calling sd_ble_gatts_hvx() will not fail due to NRF_ERROR_RESOURCES?
- If not, how can I calculate it? Is it by keeping track of p_ble_evt->evt.gatts_evt.params.hvn_tx_complete.count in the BLE_GATTS_EVT_HVN_TX_COMPLETE event, subtracting it from the number of internal buffers, and multiplying the result by the characteristic size (set in add_char_params.max_len)?
- How can I find or configure the number of internal buffers?
- Is the number of internal buffers shared between Characteristics (i.e. will a notification to another Characteristic reduce the number of free buffers)?
Thanks :)