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

battery level service on Custom Profile

Hi

I'm trying to implement battery level on my custom profile. So I used battery.c and ble_bas.c files for the battery service from nodic's sdk nrf51822_v4.4.1.31827. I've made the modifications in main.c and attached the file below (MODIFICATIONS FOR BATTERY SERVICE ONLY)

But the issue is battery level always reports 100percent (ie; 64 as value in service) even-though I varied the input power between 2.5-3.6v on P1 header

Any thoughts??

Regards HPC

addition_in_main.c

Parents
  • Hi HPC,

    Your code looks okay to me. Just to get the basic stuff out of the way, have you disconnected the evaluation board from the PC form which you flashed your app before you connected your supply to P1 Header? And also has the battery been removed from the battery holder? My suspicion is that it is still sourcing power from the PC or the battery.

    Cheers, Balaji

Reply
  • Hi HPC,

    Your code looks okay to me. Just to get the basic stuff out of the way, have you disconnected the evaluation board from the PC form which you flashed your app before you connected your supply to P1 Header? And also has the battery been removed from the battery holder? My suspicion is that it is still sourcing power from the PC or the battery.

    Cheers, Balaji

Children
Related