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

nRF51 beacon high frequency scanning and advertising?

Hello, beginner here. :)

I just bought an nRF51 DK, but have not received it yet. I decided to test it because my older BLE module (HM-11) only allowed me to scan beacons once every 3 seconds.

My intention: using nRF51822 chips I want to make several beacons and 1 beacon scanner. I want this scanner to be able to get these beacons' info (major,minor...) and RSSI at somewhat high frequency, for example 10Hz or higher.

My question: is this feasible using nRF51822?

I have read on other questions that advertising beacon interval can be reduced up to 100ms (10Hz), but on other question they said 20ms (50Hz), so which one is the max frequency for beacon advertising? Also I am worried about the scanner being able to scan all these beacons (4-5 units) at a high frequency (ideal case same or higher frequency than the advertising, so I don't lose advertising packets). What is the estimated maximum frequency for a scanner like this?

Extra info: I believe that if beacons advertise at the same time, my scanner will only be able to receive one of them (or maybe none due to interference), so I will arrange them somehow to start at different times or with sligthy different advertising intervals.

Extra request: I would like to learn more about how these chips scan each frequency/channel, or if every frequency/channel is scanned at the same time, how are channels organized and selected, etc. Any link, doc or place I could learn this?

Thank you very much for your time, any hint is appreciated. :)

  • Hi Luis,

    Yes, you can use the nRF51 to scan for several beacons with higher than 10Hz frequency.

    If you advertise as non-connectable advertising, the advertising interval should be lower than 100ms. ( Section 4.4.2.2 Vol 6 Part B in Bluetooth Core Spec v4.4.2.2)

    You can get away from that either by advertise with connectable advertising or you can advertise with non-connectable advertising, but stop and re-start advertising with interval lower than 100ms.

    When advertising, there will be an extra delay added, to avoid interference (define at the same place at section 4.4.2.2). So you don't have to worry that all the beacon will advertise at the same time.

    The scanner can scan continuously (when you set scan windows= scan interval) however, we have to scan on 3 channels (37, 38, 39) so we will scan on each channel in turn, one by one on one scan window. ( One scan window with channel 37 , next window with channel 38 and so on). Note that when advertising, by default the advertiser advertises in all 3 channels one after each other.

  • Reading this answer makes me wonder.. What is the main (technical) reason that when using non-connectable advertising, the advertising interval should be at least 100ms, while for connectable advertising it can be at least 20ms? Or is there none, and therefore it can be overruled by stopping and re-starting advertising with an interval lower than 100ms?

  • @mst: It was defined in the Bluetooth specification. I have the reference to the spec in my answer.

    From my point of view the 100ms minimum limitation is due to the requirement to be low power consumption. For connectable advertising the minimum limitation of 20ms is to make sure the connection can be quickly established. It's not the case when doing non-connectable advertising.

    No technical reason here, just to make sure the power consumption remains low when using the protocol.

    Do you have a reason that the advertising interval of your beacon should be lower than 100ms ? Note that if your beacon running on CR2032 battery, having a 100ms advertising interval or lower, will drain your battery in less than 3 months.

  • One more thing, since non-connectable advertising will most likely be transmitted all the time ( e.g beacon) having larger advertising interval will reduce the chance of interference between them.

    When doing connectable advertising, the device not supposed to advertise all the time, main point is to get connected. So it can have shorter interval.

  • Thank you very much for your answers. When you say "the advertising interval should be lower than" I think that is a typo and you meant "higher". I understand that is the Bluetooth Core Spec. So the softdevice won't let me go over that spec and I have to use the two workarounds you noted? Connectable up to 50Hz and stop+restart for higher frequencies? Do you know of any tested case like this? In order to estimate what is the highest advertising/scanning frequency I may reach using 5 beacons and 1 scanner (all with nrf51) in the same room?

Related