updating BLE battery level and indicating during runtime
Posted: Mon Nov 06, 2023 8:48 pm
Hi! I'm fairly new to the ESP platform.
I was able to use the ESP BLE example, which includes the battery service attributes.
when I set battery_level at boot, I get the correct value over the air to my central.
When the battery level changes at runtime, I've been unable to update that attribute and see it.
Should I be using esp_ble_gatts_set_attr_value() ? does that automatically notify?
Is there an example of this being done somewhere in an example?
What's the preferred method of updating this value?
I was able to use the ESP BLE example, which includes the battery service attributes.
when I set battery_level at boot, I get the correct value over the air to my central.
When the battery level changes at runtime, I've been unable to update that attribute and see it.
Should I be using esp_ble_gatts_set_attr_value() ? does that automatically notify?
Is there an example of this being done somewhere in an example?
What's the preferred method of updating this value?