What are the possibilities to broadcast 4bytes to many devices? Can I just put them somewhere in adv packet? Any other solutions?
You can include arbitrary data in the advertisement payload using the MANUFACTURER_SPECIFIC_DATA
type. The size is limited by the maximum size of one advertisement frame, though.
Edit: If haven't used any of the nRF chips before, but by looking at the S110 API it should be pretty simple to update the advertisement data quite frequently.
First start the advertising using sd_ble_gap_adv_start
with a proper value for interval
. Something like 0x640
should correspond to an interval of 1 second, since 1000 / 0.625 = 1600. Second you need to call sd_ble_gap_adv_data_set
to update your advertisement data when ever you feel the need to.
Beware: These are just assumptions, since I haven't worked with an nRF chip or the corresponding software stack before.