aci_gatt_add_char() returned BLE_STATUS_OUT_OF_MEMORY
Hello - My project is based on the SensorDemoBLESensor application built using using the CubeMX tool version 5.6.1 with the X-NUCLEO-BNRG2A1 development board attached to a NUCLEO-F303RE. I successfully added 5 custom characteristics to my first custom service. When I attempt to add a 6th characteristic the aci_gatt_add_char() returned 0x48 (BLE_STATUS_OUT_OF_MEMORY) on the STM32F303. I added a 2nd custom service and successfully added the characteristic that failed to add on the first service. So I don't think this a total memory problem.
The modified the default DTM settings in DTM_Config.h running on the BlueNRG-M2 as follows:
#define DTM_NUM_LINK 2 // Was 8
#define DTM_NUM_GATT_SERVICES 5 // Was 8
#define DTM_NUM_GATT_ATTRIBUTES 125 // Was 68
#define ATT_VALUE_ARRAY_SIZE (3000) // Was 1248
I still see the error. There seems to be a limit to the number of characteristics (attributes) per service.
Any help would be appreciated.
Best
