updating BLE battery level and indicating during runtime

mps360
Posts: 7
Joined: Mon Oct 16, 2023 8:32 pm

updating BLE battery level and indicating during runtime

Postby mps360 » 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?

Who is online

Users browsing this forum: Google [Bot] and 137 guests