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

SDK13 NRF_ERROR_NO_MEM at sd_ble_gatts_characteristic_add()

Hello, when starting a new project I took the nice Heart-Rate-Example which works fine at my PCA10040. Then I started to add services and characteristics by copying and adapting the HRS - I know that I will have to declare them as vendor specific services and characteristics - this is not already done. One new service with 11 characteristics works fine, but adding a second will lead to a NRF_ERROR_NO_MEM as return value at the sd_ble_gatts_characteristic_add() function and then a Reset is executed. In one post in this forum I saw that adding

memset(&ble_cfg, 0, sizeof(ble_cfg));
ble_cfg.gatts_cfg.attr_tab_size.attr_tab_size = BLE_GATTS_ATTR_TAB_SIZE_MIN;
err_code = sd_ble_cfg_set(BLE_GATTS_CFG_ATTR_TAB_SIZE, &ble_cfg, ram_start);
APP_ERROR_CHECK(err_code);

could help, but in my project this is not the case. I tried already various RAM-settings in the linker configuration file, but all without success. What can I do next?

Parents
  • Hi Mat,

    Could be different name in different Softdevice version. You need to point met to the SDK and softdevice you used.

    Seems like you exceeding the attributable size. Ihave you tried to increase attr_tab_size ? What happen if you set it to BLE_GATTS_ATTR_TAB_SIZE_DEFAULT (1408) ? or more than that ?

    Note that most of the cases you don't need 11 characteristics. It can be easily grouped into one characteristic and use 1 extra byte as the data ID.

Reply
  • Hi Mat,

    Could be different name in different Softdevice version. You need to point met to the SDK and softdevice you used.

    Seems like you exceeding the attributable size. Ihave you tried to increase attr_tab_size ? What happen if you set it to BLE_GATTS_ATTR_TAB_SIZE_DEFAULT (1408) ? or more than that ?

    Note that most of the cases you don't need 11 characteristics. It can be easily grouped into one characteristic and use 1 extra byte as the data ID.

Children
No Data
Related