cancel
Showing results for 
Search instead for 
Did you mean: 

BLE_ERROR_MEMORY_CAPACITY_EXCEEDED when aci_gap_set_advertising_enable on BlueNRG-LP

jbie
Associate II

Hello,

I'm trying to make a low power device with ST BlueNRG-LP (455M).

 

I have an incomprehensible error with the BLE.

I set BLE advertising with advertising data and scan response every 10 seconds (adv_interval=10000).

		ret = aci_gap_set_advertising_configuration(0, GAP_MODE_GENERAL_DISCOVERABLE,
												  ADV_PROP_CONNECTABLE|ADV_PROP_SCANNABLE|ADV_PROP_LEGACY,
												  (adv_interval*1000)/625,(adv_interval*1000)/625,
												  ADV_CH_ALL,
												  NON_RESOLVABLE_PRIVATE_ADDR,NULL,
												  ADV_NO_WHITE_LIST_USE,
												  0, /* 0 dBm */
												  LE_1M_PHY, /* Primary advertising PHY */
												  0, /* 0 skips */
												  LE_1M_PHY, /* Secondary advertising PHY. Not used with legacy advertising. */
												  0, /* SID */
												  0 /* No scan request notifications */);

After this I set advertisement data and scan response 

ret = aci_gap_set_advertising_data(0, ADV_COMPLETE_DATA, sizeof(BLE_AdvertisementData), BLE_AdvertisementData);
ret = aci_gap_set_scan_response_data(0, sizeof(BLE_AdvertisementData2), BLE_AdvertisementData2);

Then I enable advertising

BLE_Advertising_Set_Parameters[0].Advertising_Handle = 0;
			BLE_Advertising_Set_Parameters[0].Duration = 0;
			BLE_Advertising_Set_Parameters[0].Max_Extended_Advertising_Events = 0;

			ret = aci_gap_set_advertising_enable(ENABLE, 1, BLE_Advertising_Set_Parameters);

 

Everything is working until this point.

 

After some time I update advertisement data and scan response, it's working too.

 

After a long and not constant time, the device stop advertising. (many hours)

When the device is not advertising anymore, if an "advertising reset" I received the error 0x07 and my device reset.

ret = aci_gap_set_advertising_enable(DISABLE, 0, BLE_Advertising_Set_Parameters);
OK

ret = aci_gap_set_advertising_enable(ENABLE, 0, BLE_Advertising_Set_Parameters);
ret = 0x07 => BLE_ERROR_MEMORY_CAPACITY_EXCEEDED

 

Some important precision, BlueNRG-LP is working on a battery CR2430 with a max current of 4mA. The board is draining 4.5mA from this battery when ON and the voltage drop to 2.7V

 

I have some question:

- Can you check "handle" and "Number_of_Sets" ?

- Do you have any idea of why I have this error ?

 

Thank you

0 REPLIES 0