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

Multiple beacon advertisement

Hi,

I am trying to find a good solution for multiple beacon advertising using s132_nrf52_3.0.0_softdevice and sdk 12.1 on nrf52.

Looking at other similar threads: devzone.nordicsemi.com/.../ devzone.nordicsemi.com/.../

I can not find a recommended approach to this requirement. Even the sample codes do not advertise more than one beacon at the time, for example Eddystone example in sdk (ble_peripheral\experimental_ble_app_eddystone) does not rotate advertising the three eddystone frame types, just advertise uid. Seems to be due to SD limitation to track one radio activity at the time.

Would you please help with best recommended approach to implementing the following requirements to have the frames below advertised in rotation?

  • iBeacon advertisement -- configurable from 100ms to 10000ms, fixed payload.
  • Eddystone TML advertisement mainly (if not all: Eddystone-UID, Eddystone-URL, Eddystone-TLM) -- configurable from 100ms to 10000ms with updating payload
  • Custom frame advertisement -- once a second but with updating payload

questions:

  1. Would I need to have one frame advertise on softdevice and the other two using timeslot? The current sample code (only adv. two frames, seem to be not power optimized: experimental_ble_app_multiactivity) are there better complete examples available? Please advise how it could be made power optimized, or is the use of timeslot result in more current drain.

  2. Can a dedicated application timer be used for each frame and I use softdevice call sd_ble_gap_adv_data_set() to update the advertising frame each time on interrupts or would the adv. need to be stopped/started on each interrupt? How collisions could be avoided?

  3. The Eddystone specification suggest to advertise the core -UID, -URL, -TLM by rotating them in each advertisement. Please suggest how the example should be modified to achieve this?

Thanks.

  • This use case really isn't something what Nordic Soft Device was designed for. Have you considered using other open source variants (like Zephyr) which might have better API or you can modify their GAP and Link layers directly to alter PDUs in this way? Btw. your requirements look simple on the paper but what they technically say is "you need three independent radios - or three independent SW stacks on top of one radio and survive some potential collisions". (btw. I believe it's not accident that you cannot find any example in the SDK which would implement this, simply not obvious and easy to implement think, brings real complexity to the FW)

    It might look crazy to build boards with three radio chips and 1-3 antennas but it's not if you think about it for longer time. I would still go back and challenge the requirements, if you can limit the scope from totally independent and asynchronous advertisements to somehow synchronized (and e.g with intervals which must be multiple of certain base interval) then situation changes drastically and you might be able to use Nordic stack easily according to advise from the links above.

  • Thank you for your quick response. Let me clarify, requirement is not really to send all three frames at the some time but rather have them alternate on radio. (chosen interval between 100ms to 10000ms will be divisible by 25ms). So for example on every 25ms interval I advertise a different frame but they should not get missed or delayed by more than 25ms. Also the frames would only advertise on their own "timeslot" (ibeacon every 100ms with the 25ms offset to avoid collision with rotating eddystone, and custom frame every 1sec).

  • I still believe that if you want to only advertise as non-connectable beacon (of whatever format) then actually doing it without Soft Device (or other BLE stack) and just by simple app timer and directly sending packet through RADIO (there are examples of this in SDK and on GitHub) looks like the easiest thing. Messing up with the Soft Device and time-slots looks over complicated and easy to make some corner case bugs. Just my opinion.

  • Hi,

    Regarding point 3, you should download the nRF Beacon for Eddystone app, and use it to configure the different Eddystone advertising frame types. Remember to put the beacon in config-mode in order to configure it.

  • My requirements are connectable beaconing to configure the interval and other characteristics. Please suggest how I can use the softdevice to achieve this. Thanks.

Related