cancel
Showing results for 
Search instead for 
Did you mean: 

BlueNRG beacon frame interleaving

jaylong
Associate II

Hi,

I'm trying to implement an Eddystone beacon with interleaving frames, e.g. UID + TLM, using a BlueNRG-MS and BlueNRG-2.

I can configure the BlueNRG to act as a beacon broadcasting one of these frames but I don't see how to go about alternating or interleaving two or more different frames.

Any pointers on how to go about doing this would be appreciated.

Thanks

jay

6 REPLIES 6
Winfred LU
ST Employee

Hi Jay,

Please handle in aci_hal_end_of_radio_activity_event(),

when Last_State is 0x01 (advertising), modify the advertising data alternating.

Best Regards,

Winfred

jaylong
Associate II

Thanks Winfred,

It looks like this callback is specific to the BlueNRG-2, do you know if there is another method for handling this with the BlueNRG-MS?

Thanks

jay

Hi Jay,

Yap, the callback is available for BlueNRG-1 and BlueNRG-2 only.

For BlueNRG-MS, similar scenario can probably be done with virtual timer interrupts properly configured.

For example,

  1. configure the primary advertising data, with advertising interval equal to 500 ms
  2. configure a virtual timer with timeout value equal to 700 ms
  3. when the timer fires, stop the (primary) advertising, modify the advertising data (to secondary one), and start the advertising again with a 500-ms interval
  4. configure the virtual timer again with 700 ms timeout
  5. when the timer fires, stop the (secondary) advertising, loop to step 1

The advertising interval and timeout value may need to be tuned in order to have the advertising data altered exactly each advertisement (if it is required to alternate each time).

Thank you.

Best Regards,

Winfred

Thanks Winfred,

Just to make sure I'm following you – your suggestion would require the host MCU (not the BlueNRG-MS) change the advertising data every ~700ms, correct?

If my interpretation is correct, this unfortunately isn't an option given the energy requirements of our host. Can you see any way to configure the BlueNRG-MS to handle this interleaving without host intervention?

Thanks

jay

Hi Jay,

700 ms is just an example. It shall be tuned depending on your advertising interval.

BlueNRG-MS (BlueNRG-1/2 too) is only capable of sending one advertising data at a time.

To send different advertising frames, the host MCU has to intervene, triggered by either an event callback (BlueNRG-2 case) or a timer interrupt (BlueNRG-MS case).

Best Regards,

Winfred

KPrzy.1
Associate II

Dear Friend, I am doing quite similar project but using wb55. I can see bluenrg has similar functions for advertising in noneconnectable mode. What I did, just start beaconing, run timer server for interrupts and every interrupt update advertising data table, then my beacon is alternating adc values as a broadcaster. With wb55 it is more complex since there are two processors one for user application and one for radio and they communicate over hardware semaphores and scheduler. I think better way of buidling alternating packet beacon would be to create so call server that will advertise new data but I am working on this right now so cannot provide any code so far. I think this is the direction You should go. Just try to update advertising data table with some timer interrupt callback routine...