iBeacons and Interference

This is more of a design question. I am building an iPhone app that can advertise it self as an iBeacon. This app can potentially be used by several thousand people at a large venue. So effectively there will be several thousand iOS devices advertising iBeacons in a large auditorium. All these iBeacons use the same Beacon region but unique major-minor combo for each device iBeacon. And each of these devices at the same time can detect iBeacons advertised by other devices.

The question is if this causes any interference between the devices and their ability to range other devices. Or does this cause any interference to the wi-fi network in that venue. If so, what are the best practices in building an app like this.

Answered by Engineer in 33416022

I think you need to have a look at what your app will realistically scale to before worrying, and if you believe the problems will be real, then take appropriate actions (whatever they may be).


First, let's look at your app in isolation. From your description, I don't take that there will be thousands of people advertising at the same time. Let's say about a hundred vendors all the time, and the visitors for a few seconds. Considering the effective radius of BLE advertising, especially in a RF noisy environment like a conference/expo floor, you needn't worry about scaling - realistically.


If it happens that you are in a small area with thousands of people using your app to advertise, then all the advertising channels will get saturated, and that will be the end of that.


But, let's look at the reality of such an environment. You will have thousands of people, all of them with smartphones, some of them with other additional RF noisemakers like smartwatches, tablets, BLE keyfobs, and such. All of these are advertising, all the time. Some are connecting and communicating - all this happening in the same frequency band as WiFi. Things still manage to work, when they do.


I think your main issue will be, scaled or not scaled, discovery while moving. When your app is in pockets/handbags, the devices will be in low power passive scanning mode, and discovery will be slow. May be too slow for walking by a booth, or two attendees passing each other.

The range provided by iOS devices in common use situations is bound to be less than dedicated iBeacons power tuned and strategically placed. While this will work to your advantage by not casuing too much interference, a smaller radius will be easier to walk by without your app detecting anything.

Food for thought.

Before we get to the problems of interference, are you planning this app to be running in the foreground all the time?


Because, apps in the background cannot advertise as iBeacons. If you are planning these apps to be in the background and do what they need to do when the devices are in the pockets, etc., you may want to implement the advertising/detection handling yourself directly using CoreBluetooth.


Even that will have issues with performance, and may not be entirely possible (cannot say one way or another without knowing what you are trying to accomplish) while the app is in the background or the device locked, but at least it is technically possible.

Thanks Gualtier for the prompt response. I am aware of the fact that iBeacon can't advertize in the beackground.


The scenario I am thinking is at a large conference/expo. Basically enabling communication in terms of posts (text and picture) among a crowd of people in a close proximity.


1. Some users of this app like vendors at the conference expo may be advertizing in foreground about their booths or products.

2. And some users (like visotrs at the conference) may post a question to the surruounding crowd and advertize that for a few seconds in the foreground.


In both these situations the other users (cosnumers/subscribers) who around at that time and have the app installed, will detect/range the beacon and notified even their phones are in their pockets and the app is not runnning.


I have built a proof of concept using iOS iBeacons API and it seems to work fine in a two or three device scenario. The question is more around scaling this to large number of users that are posting or advertizing at the same time.

Accepted Answer

I think you need to have a look at what your app will realistically scale to before worrying, and if you believe the problems will be real, then take appropriate actions (whatever they may be).


First, let's look at your app in isolation. From your description, I don't take that there will be thousands of people advertising at the same time. Let's say about a hundred vendors all the time, and the visitors for a few seconds. Considering the effective radius of BLE advertising, especially in a RF noisy environment like a conference/expo floor, you needn't worry about scaling - realistically.


If it happens that you are in a small area with thousands of people using your app to advertise, then all the advertising channels will get saturated, and that will be the end of that.


But, let's look at the reality of such an environment. You will have thousands of people, all of them with smartphones, some of them with other additional RF noisemakers like smartwatches, tablets, BLE keyfobs, and such. All of these are advertising, all the time. Some are connecting and communicating - all this happening in the same frequency band as WiFi. Things still manage to work, when they do.


I think your main issue will be, scaled or not scaled, discovery while moving. When your app is in pockets/handbags, the devices will be in low power passive scanning mode, and discovery will be slow. May be too slow for walking by a booth, or two attendees passing each other.

The range provided by iOS devices in common use situations is bound to be less than dedicated iBeacons power tuned and strategically placed. While this will work to your advantage by not casuing too much interference, a smaller radius will be easier to walk by without your app detecting anything.

Food for thought.

Thank you so much Gualtier. I guess I need to test out the scenario a bit. While moving applies to the scenario where the users are walking in the expo. The otehr scenario is all the users sitting in a large conf room or a few hundred users attending a post conference party at a bar or restaurant.


What would be the typical radius of the iBeacon advertisement on an iPhone? Is it 100ft or so?

Low power RF is so dependent on the environment that it would be hard to give a practical answer to this. Any spec you will read about in the BLE world will be according to Radio Frequency Line of Sight. But phones are usually not in the open, and most of the time in very close proximity to large bags of mostly water (humans). Any advertising iBeacon needs to be calibrated for the region monitoring and beacon ranging to work properly. This will be difficult in an ever changing environment.


That said, you can control the power settings for the advertised regions in your app when you use CLRegion peripheralDataWithMeasuredPower: method and calibrate the detected region radius values to your needs. (changing the power setting does not actually change the power output of the radio)


The Airlocate (Sample Code) also shows how to control and calibrate the iBeacon advertisement power settings.




Edited to make it clear you can change region power settings for calibration, and not the actual power of the BLE radio.

I was reading upon the' peripheralDataWithMeasuredPower:'. It looks like it doesn't have any influence on the power of transmission. Calibearion is mainly for the accuracy of the distance upon detection.


My app just needs to detect the beacon. It doesn't actually need to know how far away the trasnmiting iBeacon is.


Below is something I found om this mehtod. Not sure how accuarte it is.


The power field that you mention is simply a calibration value transmitted by an iBeacon. It doesn't affect the actual physical radio range of the iBeacon. If the transmitter can be seen by an iPhone 50 meters away, altering the power field value will not change this at all.The only thing it does is change is the calibration constant which is an input to the distance estimation algorithm (used for the accuracy and proximity fields) inside the iOS software. Altering the power field will affect the estimated distance returned by the API, but it won't change the actual distance at which the iBeacon is first detected.

Sorry, I meant the power setting. A missing word and an extra comma seems to have changed the meaning.

It would have been nice to be able to increase the power and zap flies out of the sky, but alas...

Got it. I am not sure if the iOS iBEACON API (Not Core BlueTooth) allows you to set the Tx Power of a transmitting iBeacon.


On a diffrent note, what do you think about background ranging of beacons? I read that it's not recommended by Apple as it clould drain the battery.


So, I am guessing this is what needs to be done.


1. Monitor the Region in background

2. Wake up the app on 'didEnterRegion'

3. Start Ranging for beacons in foreground

4. Stop ranging when the app goes to background.


But as you mentioned earlier, it's too narrow to be ranged by the receiver.


Alternatively, give control to the user to startRanging on an ad-hoc basis. Your thoughts?

iBeacons and Interference
 
 
Q