Skip to main content
RAdam.1
Associate III
July 14, 2020
Question

Advertising stops after modifying the advertising data

  • July 14, 2020
  • 1 reply
  • 687 views

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); 

}

}

This topic has been closed for replies.

1 reply

paolonegrini9
Associate
October 13, 2021

Did you solve the problem !?!?1

I'm facing with the same issue!!