2020-07-14 07:08 AM
Using a BlueNRG-LP
I am wanting the advertising packet to show the battery level and some other changing data - pretty normal for a BLE device. So I have it advertising normally and I call this function every 10 seconds. This however seems to just stop advertising altogether.
I have tried disabling advertising, changing it and re-enabling but that has the same effect. The data length doesnt change - just the contents
Any suggestions?
void BluetoothUpdateAdvertisement(uint8_t Role, uint8_t Battery)
{
tBleStatus ret;
if (APP_FLAG(SET_CONNECTABLE))
{
adv_data[AD_MFRDATA_STATUS] = Role;
adv_data[AD_MFRDATA_BATT] = Battery;
ret = aci_gap_set_advertising_data(0, ADV_COMPLETE_DATA, sizeof(adv_data), adv_data);
printf("Update advertising data %02X\n", ret);
}
}
2021-10-13 03:06 AM
Did you solve the problem !?!?1
I'm facing with the same issue!!