cancel
Showing results for 
Search instead for 
Did you mean: 

Battery Service Notification on BLE

MWält.2
Associate II

We are using the STM32WB5MMG in our product.

To inform any client about the battery level of our device we want to implement the

SIG Battery Level Service.

After configuration through CubeMX, the Service is visible and the value can be read.

However, how can you update the value being read or how do you notify a client (notify is enabled).

Detailed Problems:

1)  I would like to update a specific characteristic. Therefore I used "aci_gatt_update_char_value()". But it seems I'm, not allowed to change the value while the service is running. An error-handler gets called.

2) I would like to notify a client of new data. Therefore I tried to implement the "Hear Rate Measurement" from the "BLE_Custom" template. In the code I get the "CUSTOM_STM_HRS_M_NOTIFY_ENABLED_EVT", but how can I change the value and notify the client?

PS: I have already asked this question under another tag: "Documentation/Ressources for BLE "Custom Template" CubeMX"

0 REPLIES 0