Hi,
I get NRF_ERROR_NO_MEM calling sd_ble_gatts_characteristic_add when using more than 15 uuids. Can you help mitigating this?
Thanks,
Daniel
Hi,
I get NRF_ERROR_NO_MEM calling sd_ble_gatts_characteristic_add when using more than 15 uuids. Can you help mitigating this?
Thanks,
Daniel
As the name "NRF_ERROR_NO_MEM" suggests - you've run out of memory!
You need to increase NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE in sdk_config.h
You may then also need to increase RAM_START in the Project Linker settings > Memory placement macros
1. What is the relationship (formula) between the number of characteristics and NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE?
2. How do I calculate if and by how much I need to increase the RAM_START?
3. Is there a methodical way to know if the RAM_START is too small?
Thanks,
Daniel
Amenda,
The logging mechanism in the example you linked to is not of Softdevice. I reiterate my very simple question: What is the relationship (formula) between the number of characteristics and NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE? (I would be happy to get answers also on my other two questions but this is the most important one right now). I don't have the source code for the Softdevice and, therefore, cannot figure out robustly myself.
Daniel
Hi Daniel,
I am afraid that there is no way to calculate the attribute size for a given number of services and characteristics( the internal build-up of the attribute table is "hidden" in the SoftDevice, which is not public information). Please see my colleague explained in this post.
-Amanda H.
Amenda,
The post just restates the problem - the information is not public. Why not making it public?
Daniel
It'd be great if Nordic could reveal a formula for calculating the NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE, or at the very least, a configurable log level for the SDH functions to output how they are allocating structures within it (similar perhaps to how the heap memory allocator logs). My particular application has large buffer sizes for its value characteristics (necessarily so), and so these values ended up needing to extend NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE quite significantly.
It'd be great if Nordic could reveal a formula for calculating
Indeed.
ISTR getting this error when adding Services/Characteristics - and it was just trial & error to find the required size.
Even if it's not an exact formula, a way to estimate the ballpark would help.
It'd be great if Nordic could reveal a formula for calculating
Indeed.
ISTR getting this error when adding Services/Characteristics - and it was just trial & error to find the required size.
Even if it's not an exact formula, a way to estimate the ballpark would help.