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

Beacon and GATT: NRF_ERROR_NO_MEM

HI guys,

I am running a beacon based on the ble_app_beacon example. This works fine.

Next, I made a connectable GAP/GATT application to read and make some settings. This is based on the ble_app_hrs example, and also works fine.

Finally, I wanted to combine these two: run the beacon until a button is pressed, and then start GAP/GATT. However, if any beacon has been transmitted before the initialization of the GAP/GATT it fails: ble_advertising_init returns error code 4 = NRF_ERROR_NO_MEM. If no beacon has been sent before, initialization succeeds and the device starts fast advertising.

I traced the code as far as the sd_ble_gap_adv_set_configure() call in ble_advertising.c, but this is a SD call and canniot be debugged.

I tried increasing stack size and heap, but to no avail. Is there a way to check what is causing the NRF_ERROR_NO_MEM error?

Are there any examples of the combination Beacon and Connectable device?

Thanks for your help,

Henk

Related