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

Adding Battery percentage and Temperature in Scan response packet in a ble_app_beaocn

Hi,

I'm trying to add the device information such as Battery percentage , temperature in the scan response packet to the ble_app_beacon example. I could add the data and adversities the data in the scan response, but the issue is the battery level or the temperature are being updated on device reset. Is there a way to fix the issue?

I'm using nRF5_SDK_15.2.0_9412b96 and nRF52840-DK

Right now i am trying to read the battery and temp value and added to scan response data

I have few questions:

1. Do we need to add it as a services like Battery service and temperature service

Thanks

Parents
  • Thanks for the reply Simonr

    I'm using nRF connect app for iOS and i could see the data as service data 

    when i scan the beacon in the nRF connect app i'm getting the static data even though there is a change in temperature it doesn't reflect unitl we reset the DK

    I mean i would like to update the scan response packet dynamically after a particular period of time ( for example let us say for every 1 hour)

    To get the updated data dynamically do we need to stop the advertising and start again or 
    I have seen in few threads in older SDK's they call an API to set the data 
    Is there any such API available to update the data during the advertising  

    Thanks 
    Teja

Reply
  • Thanks for the reply Simonr

    I'm using nRF connect app for iOS and i could see the data as service data 

    when i scan the beacon in the nRF connect app i'm getting the static data even though there is a change in temperature it doesn't reflect unitl we reset the DK

    I mean i would like to update the scan response packet dynamically after a particular period of time ( for example let us say for every 1 hour)

    To get the updated data dynamically do we need to stop the advertising and start again or 
    I have seen in few threads in older SDK's they call an API to set the data 
    Is there any such API available to update the data during the advertising  

    Thanks 
    Teja

Children
No Data
Related