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

The function "sd_ble_uuid_vs_add()" gives error 4==NRF_ERROR_NO_MEM // No Memory for operation

Hi,

We need to develop the BLE project that works as master and slave (both roles together). For this purpose we took the “BLE_APP_HRS_RSCS_RELAY_PCA10040_S132 “ example project. This project works correctly, but it contains only the manufacturer defined services.

So we began to add the custom services. In the beginning we tried to add the custom service “ble_lbs” – LED Button Service from your other example. We defined all needed parameters so the compiler accepted the code and ran the program.

But during running the command “err_code = ble_lbs_init(&m_lbs, &init);” gave the error 4 that according to “narf_error.h” file means no memory for operation (#define NRF_ERROR_NO_MEM (NRF_ERROR_BASE_NUM + 4) ///< No Memory for operation).

We also tried to remove the other defined services (cycling and heart rate; client and server) but nothing helped. The error is given by the internal function “sd_ble_uuid_vs_add()” that exists in “ ble_lbs_init()” function and enables the custom services definition.

  1. What is the reason that cause to this function to give no-memory-error?
  2. How is it possible to solve this problem?

The chip is NRF52832.

Related