2022-04-01 05:05 AM
I'm struggling with an issue regarding the number of GATT services, characteristics and descriptors in BlueNRG by STM. I have currently set 6 services and 8 characteristics, minimizing the number of attributes for each service inside
maximum_attr_records
variable as input of GATT function
aci_gatt_add_serv()
.
Everything works fine until I add the seventh service or the nineth characteristic: the GAP does not initialize and the communication is stopped.
I imagined that is something connected to the number of attributes/services/characteristics used in my application that require all the GATT stack memory, but it seems weird.
Is there a way to increase this maximum value using the BlueNRG protocol?
BlueNRG-2, STM32CUBEIDE 1.7.0, X-Cube-Ble 3.2.2
2022-04-04 02:26 AM
Hello @Giatto,
Get a return variable of type tBleStatus from all your ble init function, do you get a 0x87 BLE_STATUS_OUT_OF_MEMORY ?
2022-04-05 01:44 AM
No, all the return variables are BLE_STATUS_SUCCESS (0x00) except for gap_init() where the return variable is equal to 0x47 (BLE_STATUS_ERROR). That's where my code breaks
2022-04-05 02:24 AM
@Giatto could you post your init function ?
2022-04-05 02:44 AM
aci_gap_init( GAP_PERIPHERAL_ROLE, 0, 8, &serviceHandle, &devNameCharHandle, &appearanceCharHandle);
The code breaks here when I add the 9th service
2022-04-05 06:13 AM
could you post your entire init function with aci_gatt_init(), aci_gatt_add_service(), aci_gatt_add_char() ..., so I could try in my project ?