Hello,
I am using nRF52832, SDK_15.3.0, S132 SoftDevice and Segger for flashing the image. I am using ‘ble_app_blinky’.
I was going to “Batter Service”. Battery level is a read & notify option. In this example, a timer handler is triggered periodically, read battery level and update the value using sd_ble_gatts_value_set(). So when read request is initiated, device will send recent read value.
But I have a requirement, when there is a read request from Client, Server application will receive the request indication and then only do battery measurement and send read response with latest battery level with timestamp.
In below link, I see only read request till "SoftDevice" and SD will send read response.
Scenario (For better understanding):
1) Battery is read and updated Characteristic value using sd_ble_gatts_value_set() periodically every 30 minutes.
2) As of now whenever there is a read request from Client, Server will send last updated value.
3) Whereas in my scenario, in-between, say at 25th minutes, client can request battery level. For this request, servers should read battery level immediately and send latest value rather than last updated value which is 25 minutes old.
How to achieve this ? Is there any indication for read operation (Similar to write, cccd).
Thanks & Regards
Vishnu Beema