I would like to understand the reason behind getting a error,(0x04) NRF_ERROR_NO_MEM, when calling the function
As far as I knew, the softdevice checks the memory available while calling to softdevice_enable_get_default_config() along with CHECK_RAM_START_ADDR(), but I am experiencing some difficulties while setting a 1 base 128 bits UUID + 5 characteristics whose UUID are as well 128 bits + 2 characteristics whose UUID are 16 bits on SDK12.2.
I have been reading some post (link,link2) regarding to setting uuid_count and attr_tab_size but I am not sure whether my problem is coming from that direction or not...
So I would like to know why the method sd_ble_gatts_characteristic_add() returns the NRF_ERROR_NO_MEM and how it may be solved.
It is probably the attribute table size. Have you tried to increase it to see if it helps?
If uuid count was the problem you would get NRF_ERROR_NO_MEM from sd_ble_uuid_vs_add().