This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE memory error while registering Services and Characteristics


We are using NRF52832 based Module in our design.
Currently BLE Services & characteristics used in our firmware:
1. Custom Service
characteristic 1: 37 Bytes
characteristic 2: 243 Bytes
characteristic 3: 40 Bytes
characteristic 4: 6 Bytes
characteristic 5: 2 Bytes
characteristic 6: 3 Bytes
characteristic 7: 3 Bytes
characteristic 8: 243 Bytes
characteristic 9: 106 Bytes
characteristic 10: 3 Bytes
characteristic 11: 64 Bytes
characteristic 12: 2 Bytes

2. Battery Service

3. Device Information Service
Model No characteristic 1:
Serial No characteristic 2:
Hardware No characteristic 3:
Firmware No characteristic 4:
Software No characteristic 5:
Manufacture Name characteristic 6:
Manufacture ID characteristic 7:



Queries as follows:
1. What is the maximum characteristics we can used in custom service. Is there any limitations. If so how many we can use.


2. If i use 12 characteristics what is the maximum size(bytes) we can use.


3. Currently in our custom BLE Service if we use characteristic(2(243), 8(243), 9(106)) we are getting a BLE Memory Error.


4. Memory Configuration:
FLASH_PH_START=0x0
FLASH_PH_SIZE=0x80000
RAM_PH_START=0x20000000
RAM_PH_SIZE=0x10000
FLASH_START=0x26000
FLASH_SIZE=0x5a000
RAM_START=0x20002ca0
RAM_SIZE=0xd360

5. Attribute Table Size in bytes
#define NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE 1600 //Default Value: 1408

6. In Device Information Service if we use Manufacture ID we are getting BLE Disconnect after 2 hours of test.

Any help would be appreciated.

Thank you!

Pavan Kote

Parents
  • Hi Pavan

    There is no set limit on how many services you can have, or how many characteristics you can have per service. In the end it all comes down to how much memory you have available. 

    We don't really have a good way of estimating memory usage either, so the best advice I can give is to try and increase the size of NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE until you no longer get the no_mem error when registering characteristics and services. 

    Best regards
    Torbjørn

Reply
  • Hi Pavan

    There is no set limit on how many services you can have, or how many characteristics you can have per service. In the end it all comes down to how much memory you have available. 

    We don't really have a good way of estimating memory usage either, so the best advice I can give is to try and increase the size of NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE until you no longer get the no_mem error when registering characteristics and services. 

    Best regards
    Torbjørn

Children
No Data
Related