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

Convert hrs Program to Beacon Style Program

Hi, I have a the nrf51822 chip on a custom board and the ble_hrs code loaded on it. Now I would like this custom board to behave as a beacon with the hrs code sending data. Please what parameters do I change in the code to do this? Thanks

Parents
  • You can add a manufacturer specific field to the advertising packet (see this tutorial for more on this). Then you can re-initiate the advertising packet each time you have updated values to send. You can do this the same way as in the advertising_init() function, but you can probably strip it down a bit and remove some lines of code. If you base your code on the ble_hrs example you can e.g. simply update the data in the heart_rate_meas_timeout_handler() function. This is a quick and dirty solution to get you started. Since you don't need to connect to anything you should modify the beacon example to measure some data (using a timer maybe) and then put it in the manufacturer data field as suggested above. I don't think we have any specific examples for this so you should just go through the beacon example and maybe look into timers.

  • Thanks i'll look into this and feedback if needed :)

Reply Children
No Data
Related