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
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
So what you want to do is simply to advertise the heart rate data and put the values in the advertising packet?
Yes so it basically doesn't need to connect/disconnect just send data directly to be picked up by a custom beacon scanning app....also, no advertising timeout..kind of like them estimote beacons
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 :)