Currently advertising packet is built by macros, but the data types include const qualifiers.
What is the "proper" way to dynamically update advertising please? I need to change the manufacturer-specific data at runtime.
Using NCS 2.9.0
Currently advertising packet is built by macros, but the data types include const qualifiers.
What is the "proper" way to dynamically update advertising please? I need to change the manufacturer-specific data at runtime.
Using NCS 2.9.0
static struct bt_data ad[] = { BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)), BT_DATA(BT_DATA_NAME_COMPLETE, DEVICE_NAME, DEVICE_NAME_LEN), BT_DATA(BT_DATA_MANUFACTURER_DATA, mfg_data, sizeof(mfg_data)), };
I already found that post before posting this... How does that work, when the NCS macros use const data types?
FYI that page is broken; the code snippets are missing (and doesn't even address my question anyway).
But never mind, in trying to go through the code the penny dropped. For the benefit of anyone else looking, the pointer is a const, but the variable isn't. So I just update my mfg_data.