This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Broadcast 4 bytes from peripheral

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.

  • Tnx for help. I forget to mention that I would like to update data each second.

  • I added a chapter which should clarify upon your concern.

Related