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

Too many services and characteristics --> NRF_ERROR_NO_MEM

Hello,

i create a custom profile with two services and with 30 characteristics. The first service has 29 characteristics. Up to this point everything is ok, but when I want to create the next service, NRF_ERROR_NO_MEM is returned. I already read that there is a static 1.5 kB of memory allocated for the GATT table internally in the softdevice. All my characteristics are located in BLE_GATTS_VLOC_USER. But the message NRF_ERROR_NO_MEM will nevertheless returned. What can I do to reduce the size in stack memory?

Parents
  • There isn't any other way to reduce ATT Table memory use than to use VLOC_USER for all values. Which exact method is it that returns the NO_MEMORY error? The softdevice have room for only 5 (with version 5.2.1) or 10 (with version 6.0.0) vendor specific base UUIDs, so could it be that you are confused by a sd_ble_uuid_vs_add() call returning this error, and not the actual service adding?

    Please note that it is unnecessary to add a separate base for each service, you can use the same base for all your services and characteristics, and just set the .uuid of the ble_uuid_t to be different.

Reply
  • There isn't any other way to reduce ATT Table memory use than to use VLOC_USER for all values. Which exact method is it that returns the NO_MEMORY error? The softdevice have room for only 5 (with version 5.2.1) or 10 (with version 6.0.0) vendor specific base UUIDs, so could it be that you are confused by a sd_ble_uuid_vs_add() call returning this error, and not the actual service adding?

    Please note that it is unnecessary to add a separate base for each service, you can use the same base for all your services and characteristics, and just set the .uuid of the ble_uuid_t to be different.

Children
Related