This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

where do we receive the battery value in s130,ble_central_and_peripheral

The codes i am using is nRF51_SDK_8.1.0_b6ed55fnnn\examples\ble_central_and_peripheral and nRF51_SDK_8.1.0_b6ed55fnnn\examples\ble_peripheral\ble_app_hrs

From the peripheral, it sends heart rate value and battery value over bluetooth.We receive the heart rate value in ble_evt_t.evt.gattc_evt.params.hvx.data[1] at the other side ie, in the 1st code But i can't find the variable in which we receive the battery value in the 1st code.surely there must be a variable.do anyone know it??

please help

Parents
  • @deepu: In the ble_central_and_peripheral () we don't look for the battery service and only forcus on the heart rate measurement service as you can find in discovery() function in main.c.

    It's only an experimental project, so it's pretty modest. You would need to add the code to scan for Battery service UUID, look for the CCCD and enable it to be able to receive notification for battery.

    I would also suggest you to use the device_manager_central and ble_db_discovery.c library as we used in the S120 example (ble_central) to do the task.

Reply
  • @deepu: In the ble_central_and_peripheral () we don't look for the battery service and only forcus on the heart rate measurement service as you can find in discovery() function in main.c.

    It's only an experimental project, so it's pretty modest. You would need to add the code to scan for Battery service UUID, look for the CCCD and enable it to be able to receive notification for battery.

    I would also suggest you to use the device_manager_central and ble_db_discovery.c library as we used in the S120 example (ble_central) to do the task.

Children
Related