Welcome!

Java Authors: Torben Andersen, Sergio Varga, Liz McMillan, Elizabeth White, Patrick Carey

Related Topics: @ThingsExpo, Java, Wireless, Linux, Web 2.0, Big Data Journal

@ThingsExpo: Article

How iBeacons Work for Indoor Location Based Services

Technical Guide and Recommendations

My colleague Peter Rogers is long suffering and obviously in need of sunshine.  He sacrificed his weekend to answer questions I presented him last week on the subject of iBeacons and how they work. I want to thank Peter for the following:

There is a lot of excitement about Apple's new iBeacon technology but most people still don't realise what it is or how to use it.

iBeacon is actually used in two contexts:

  1. It is primarily a Bluetooth Low Energy (BLE) Profile that enables a device to broadcast its relative position
  2. It is any hardware device that uses the iBeacon BLE Profile

The following paragraph illustrates this terminology effectively. A third-party beacon can use the iBeacon BLE profile to advertise its relative location and therefore be classed itself as an iBeacon. An iPhone can also use the iBeacon BLE profile itself to act as a Virtual iBeacon. In this case the power levels are generally higher and so you may get a more accurate result. There is nothing to stop an Android 4.3 device being able to use the iBeacon BLE profile to advertise itself as a Virtual iBeacon too. In fact any device that supports BLE can communicate using the iBeacon BLE Profile. The core difference that iOS 7 offers is that is normalises the results from the iBeacon (in order to avoid fluctuations) and it offers the new iOS 7 CLBeacon class within the CoreLocation framework.

Here are some interesting fun facts:

  • Apple does not produce iBeacon hardware
  • iBeacon is not the only BLE profile for beacons, there are others that predated it (S-beacon, Gimbal, GeLo)
  • Most beacons allow over the air (OTA) software updates which can be used to load the iBeacon profile
  • The beacons from different vendors often behave quite differently
  • iBeacons CANNOT reliably be used to pinpoint a precise indoor position - more on that later

The iBeacon BLE Profile does not have any payload. Instead it just sends three pieces of information:

  1. UUID - beacon manufacturer's unique identifier
  2. Major - a value that can identify a group of beacons (can be used for general region)
  3. Minor - a value that can identify an individual  beacon with a group (can be used for a specific location within that region)

The CLBeacon class offers three different properties for determining the distance from the beacon:

  1. Accuracy - the accuracy of the proximity value allegedly in meters - in practice this doesn't map directly to meters in most cases
  2. Proximity - the vague definition of proximity - immediate, near, far and unknown
  3. RSSI - the received signal strength of the beacon in decibels

The CLBeaconRegion class enables notifications when the iPhone detects that the range of an iBeacon has changed and this can be used to launch your App even if it was not running. The class also enables the construction of a Virtual Beacon whereby the iPhone itself uses the iBeacon BLE Profile to behave like an iBeacon.

This means that we can detect proximity to an iBeacon quite easily by using the Proximity property. In practice this means using the CLBeaconRegion class to set up notifications when we get a proximity of "immediate" to certain strategically positions iBeacons. The accuracy of the beacons can be increased by more power and changing the frequency of updates (the default varies per vendor). Increasing these two parameters obviously decreases the battery life. The simplest option is to look for cases where ‘the device is close to a beacon and the accuracy confidence is high' which translates into immediate zone. If you were however to put your hand in front of the device and the iBeacon, this can provide enough interference to push it back to the ‘near zone' although neither the device or beacon has actually moved.

Immediate Zone (0-20 cm) (0-8")
When a device is held up close to a beacon
Accuracy confidence is high

Near Zone (20 cm - 2 m) (8"- 6.5')
Within a couple of meters to the beacon
Accuracy is fairly certain

Far Zone (2 - 70 m) (6.5 - 230')
More than a few meters away
Accuracy is low or the signal strength is weak
[https://community.estimote.com/hc/en-us/articles/201029223-RSSI-Range-Zones-and-Distance-Accuracy]

A simple strategy is to have a Cloud hosted data set that determines the positions of the beacons for an App to dynamically load and refer to. If you try and hardcode the iBeacon positions or have a non-updateable configuration file then you would have to go through the Apple App Store review process every time you want to physically add a new iBeacon. You could also host other information such as broadcast messages, regions and what the major and minor versions actually represent. It would certainly be interesting to have Location Data Stores that can describe multiple indoor positioning systems and that you can look up based on UUID, major and minor. That could be perceived as a security risk in certain situations though.

There are definite differences between the beacon vendors, and things you should be looking into are as follows:

  • Secure firmware update over the air
  • Cloud management platform
  • iBeacon profile support
  • Configurable properties: radio output power; RSSI; iBeacon advertising interval; UUID, major; and minor
  • Developer SDK with documentation

If you buy beacons without the iBeacon profile pre-installed and they are not firmware updateable over the air then you are limited to older profiles. Likewise if the UUID is not configurable and not communicated in the documentation then you are locked into the vendor SDK. If the iBeacon advertising interval is very slow by default and not configurable then your beacons will be less accurate. Finally not being able to configure the power and RSSI means the beacons cannot be configured to be more accurate. http://localz.co/blog/ibeacon-ble-hardware-commercial-comparison/

There are also differences in the accuracy of iBeacons and associated SDKs as followed:

  • Drop-out rate
  • Consistency of beacon results amongst the same vendor
  • Correct implementation of measured power (he value of measured RSSI at a distance of one meter)
  • Change in accuracy due to rotation
  • Beacon interference with each other (not something that should have an effect)

http://blog.shinetech.com/2014/02/17/the-beacon-experiments-low-energy-bluetooth-devices-in-action/

The challenge comes when you want to try and use triangulation with the RSSI or accuracy properties in order to find out a precise location rather than ‘immediate', ‘near' or ‘far'. Using the accuracy property is best summed up by the following statement in the iOS 7 API documentation, "Accuracy indicates the one sigma horizontal accuracy in meters. Use this property to differentiate between beacons with the same proximity value. Do not use it to identify a precise location for the beacon. Accuracy values may fluctuate due to RF interference. A negative value in this property signifies that the actual accuracy could not be determined."

The distance estimate provided by iOS is based on the ratio of the iBeacon signal strength (RSSI) over the calibrated transmitter power (txPower). The txPower is the known measured signal strength in RSSI at 1 meter away. iOS also normalises the values to negate the fluctuations.

"At first glance it would appear that accuracy does seem to resemble distance. However at 0.5 meters, the accuracy underestimated distance, and by 1.5 meters, accuracy was an overestimation of distance. I decided to extend the distance out to 8 meters to see if the accuracy continued increasing with distance, however over the course of 80 seconds the accuracy of the beacon only reported an accuracy of 3.87m - some 4.13 meters shy of 8 meters. This was less than convincing that accuracy was representing distance. In certain ranges with this beacon there does appear to be some correlation between accuracy and distance. I turned the power up to 100% (+4bBm) and measured the accuracy at the same varying distances. This time I was seeing a very close relationship between accuracy and distance between 1 and 5 meters, though it did start to slip at greater distances (however at 15 meters there were desks and computers obscuring the path, so perhaps this is expected)." http://blog.shinetech.com/2014/02/17/the-beacon-experiments-low-energy-bluetooth-devices-in-action/

One equation that sums up the way to calculate distance is as follows:
P(d)[dBm] = P(do)[dBm] - 10n log (d / d0) - Z

  • d             The distance we want to know
  • d0           A measure of distance for a known power output
  • n             The way the signal power degrades over distance
  • Z              The environmental effect (which is quite large).

http://www.codepilots.com/2014/03/ibeacons-accuracy/

To provide the algorithm for Android or to create your own custom version for iOS then you would need to do something like the following:

1.     Normalise the RSSI and txPower values

2.     Calibrate each IBeacon with the txPower value to allow accurate distance estimates.

3.     Measured a bunch of RSSI measurements at known distances, then do a best fit curve to match the data points

4.     Convert the best fit curve into an algorithm

protected static double calculateAccuracy(int txPower, double rssi) {
if (rssi == 0) {
return -1.0; // if we cannot determine accuracy, return -1.
}

double ratio = rssi*1.0/txPower;
if (ratio < 1.0) {
return Math.pow(ratio,10);
}
else {
double accuracy =  (0.89976)*Math.pow(ratio,7.7095) + 0.111;
return accuracy;
}
}
http://stackoverflow.com/questions/20416218/understanding-ibeacon-distancing/20434019#20434019

There are mainly five issues with the approach of triangulation for more accurate positioning:

1.     In non-controlled environments, where you can find metals, and other objects that affect the signal, the received signal strength of the beacons changes so often that it seems impossible to get an error range below 5 meters.

2.     Other devices using 2.4 GHz frequency might be interfering with the Beacons' signal.

3.     Depending on the way that the user is handling the receiver device, the readings can change a lot as well. If the user puts his/her hand over the bluetooth antenna, then the algorithm will have low signals as input, and thus the beacons will supposed to be very far from the device.

4.     The directionality of the beacons and the receiver affects the readings.

5.     The beacons and their SDKs all have a different effect on the accuracy of the results

http://stackoverflow.com/questions/20332856/triangulate-example-for-ibeacons

"Having completed these experiments, I've been able to conclude that achieving accurate distance measurements with a single beacon is potentially possible, provided you have the right beacon and the right brand. Out of eight beacons, I only found one that was consistently achieving accurate distances. Given that there is so much inconsistency between the beacons and there is no guarantee you will even receive a beacon in an order that does provide accurate results, it seems the only way to achieve accuracy is by using many beacons and averaging the results."
http://blog.shinetech.com/2014/02/17/the-beacon-experiments-low-energy-bluetooth-devices-in-action/

Recommendations

1.     Ceiling mounting of beacons reduces variance and the user blocking the path

2.     Signal transmission and reception are dependent on the orientation of both the transmitter and receiver

3.     Radio absorption by the user is significant in determining distance

4.     Other radio interference does not seem significant

5.     Clustering of beacons does not seem to have an impact

6.     The measured power does not decrease uniformly as we move away from the receiver, this is the biggest limiting factor in using this technology for accurate positioning

7.     Increasing the power to the beacons using the vendor SDK increases the relationship between accuracy and distance (on correctly configured beacons)

8.     One mooted solution is to try to set up a beacon every X meters (X being the maximum error tolerated in the system) so we can track on this beacons grid the position of a given device by calculating which beacon on the grid is the closest to the device and assuming that the device is on the same position

9.     Choose the beacon vendor carefully based on online reports because functionality does vary a lot

10. Use lots of beacons and take an average due to drop out rates and inconsistency amongst beacons in the same place

I leave you some other reading material and the general advice that using relative proximity is probably a far lot simpler than trying to implement precise location. That means designing your solution architecture and physical deployment appropriately. I can see the ability to track a user through a shopping centre of airport, but the ability to pinpoint out a product in a retail store will be challenging unless beacons with very high power levels are used and ceiling mounted.

Additional Resources:

************************************************************************

Kevin Benedict

Writer, Speaker, Editor

Senior Analyst, Digital Transformation, EBA, Center for the Future of Work Cognizant

View my profile on LinkedIn

Learn about mobile strategies at MobileEnterpriseStrategies.com

Follow me on Twitter @krbenedict

Browse the Mobile Solution Directory

Join the Linkedin Group Strategic Enterprise Mobility

Join the Google+ Community Mobile Enterprise Strategies

Recommended Strategy Book Code Halos

Recommended iPad App Code Halos for iPads

 

***Full Disclosure: These are my personal opinions. No company is silly enough to claim them. I am a mobility and digital transformation analyst, consultant and writer. I work with and have worked with many of the companies mentioned in my articles.

More Stories By Kevin Benedict

Kevin Benedict is the Senior Analyst for Digital Transformation at Cognizant, a writer, speaker and SAP Mentor Alumnus. Follow him on Twitter @krbenedict. He is a popular speaker around the world on the topic of digital transformation and enterprise mobility. He maintains a busy schedule researching, writing and speaking at events in North America, Asia and Europe. He has over 25 years of experience working in the enterprise IT solutions industry.

@ThingsExpo Stories
“In the past year we've seen a lot of stabilization of WebRTC. You can now use it in production with a far greater degree of certainty. A lot of the real developments in the past year have been in things like the data channel, which will enable a whole new type of application," explained Peter Dunkley, Technical Director at Acision, in this SYS-CON.tv interview at @ThingsExpo, held Nov 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA.
The BPM world is going through some evolution or changes where traditional business process management solutions really have nowhere to go in terms of development of the road map. In this demo at 15th Cloud Expo, Kyle Hansen, Director of Professional Services at AgilePoint, shows AgilePoint’s unique approach to dealing with this market circumstance by developing a rapid application composition or development framework.
The major cloud platforms defy a simple, side-by-side analysis. Each of the major IaaS public-cloud platforms offers their own unique strengths and functionality. Options for on-site private cloud are diverse as well, and must be designed and deployed while taking existing legacy architecture and infrastructure into account. Then the reality is that most enterprises are embarking on a hybrid cloud strategy and programs. In this Power Panel at 15th Cloud Expo (http://www.CloudComputingExpo.com), moderated by Ashar Baig, Research Director, Cloud, at Gigaom Research, Nate Gordon, Director of T...
"BSQUARE is in the business of selling software solutions for smart connected devices. It's obvious that IoT has moved from being a technology to being a fundamental part of business, and in the last 18 months people have said let's figure out how to do it and let's put some focus on it, " explained Dave Wagstaff, VP & Chief Architect, at BSQUARE Corporation, in this SYS-CON.tv interview at @ThingsExpo, held Nov 4-6, 2014, at the Santa Clara Convention Center in Santa Clara, CA.
SYS-CON Events announced today that Windstream, a leading provider of advanced network and cloud communications, has been named “Silver Sponsor” of SYS-CON's 16th International Cloud Expo®, which will take place on June 9–11, 2015, at the Javits Center in New York, NY. Windstream (Nasdaq: WIN), a FORTUNE 500 and S&P 500 company, is a leading provider of advanced network communications, including cloud computing and managed services, to businesses nationwide. The company also offers broadband, phone and digital TV services to consumers primarily in rural areas.
The Internet of Things is not new. Historically, smart businesses have used its basic concept of leveraging data to drive better decision making and have capitalized on those insights to realize additional revenue opportunities. So, what has changed to make the Internet of Things one of the hottest topics in tech? In his session at @ThingsExpo, Chris Gray, Director, Embedded and Internet of Things, discussed the underlying factors that are driving the economics of intelligent systems. Discover how hardware commoditization, the ubiquitous nature of connectivity, and the emergence of Big Data a...

ARMONK, N.Y., Nov. 20, 2014 /PRNewswire/ --  IBM (NYSE: IBM) today announced that it is bringing a greater level of control, security and flexibility to cloud-based application development and delivery with a single-tenant version of Bluemix, IBM's platform-as-a-service. The new platform enables developers to build ap...

SYS-CON Events announced today that IDenticard will exhibit at SYS-CON's 16th International Cloud Expo®, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. IDenticard™ is the security division of Brady Corp (NYSE: BRC), a $1.5 billion manufacturer of identification products. We have small-company values with the strength and stability of a major corporation. IDenticard offers local sales, support and service to our customers across the United States and Canada. Our partner network encompasses some 300 of the world's leading systems integrators and security s...
DevOps Summit 2015 New York, co-located with the 16th International Cloud Expo - to be held June 9-11, 2015, at the Javits Center in New York City, NY - announces that it is now accepting Keynote Proposals. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to wait for long development cycles that produce software that is obsolete at launch. DevOps may be disruptive, but it is essential.
"People are a lot more knowledgeable about APIs now. There are two types of people who work with APIs - IT people who want to use APIs for something internal and the product managers who want to do something outside APIs for people to connect to them," explained Roberto Medrano, Executive Vice President at SOA Software, in this SYS-CON.tv interview at Cloud Expo, held Nov 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA.
Nigeria has the largest economy in Africa, at more than US$500 billion, and ranks 23rd in the world. A recent re-evaluation of Nigeria's true economic size doubled the previous estimate, and brought it well ahead of South Africa, which is a member (unlike Nigeria) of the G20 club for political as well as economic reasons. Nigeria's economy can be said to be quite diverse from one point of view, but heavily dependent on oil and gas at the same time. Oil and natural gas account for about 15% of Nigera's overall economy, but traditionally represent more than 90% of the country's exports and as...
The Internet of Things is a misnomer. That implies that everything is on the Internet, and that simply should not be - especially for things that are blurring the line between medical devices that stimulate like a pacemaker and quantified self-sensors like a pedometer or pulse tracker. The mesh of things that we manage must be segmented into zones of trust for sensing data, transmitting data, receiving command and control administrative changes, and peer-to-peer mesh messaging. In his session at @ThingsExpo, Ryan Bagnulo, Solution Architect / Software Engineer at SOA Software, focused on desi...
"At our booth we are showing how to provide trust in the Internet of Things. Trust is where everything starts to become secure and trustworthy. Now with the scaling of the Internet of Things it becomes an interesting question – I've heard numbers from 200 billion devices next year up to a trillion in the next 10 to 15 years," explained Johannes Lintzen, Vice President of Sales at Utimaco, in this SYS-CON.tv interview at @ThingsExpo, held Nov 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA.
"For over 25 years we have been working with a lot of enterprise customers and we have seen how companies create applications. And now that we have moved to cloud computing, mobile, social and the Internet of Things, we see that the market needs a new way of creating applications," stated Jesse Shiah, CEO, President and Co-Founder of AgilePoint Inc., in this SYS-CON.tv interview at 15th Cloud Expo, held Nov 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA.
SYS-CON Events announced today that Gridstore™, the leader in hyper-converged infrastructure purpose-built to optimize Microsoft workloads, will exhibit at SYS-CON's 16th International Cloud Expo®, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. Gridstore™ is the leader in hyper-converged infrastructure purpose-built for Microsoft workloads and designed to accelerate applications in virtualized environments. Gridstore’s hyper-converged infrastructure is the industry’s first all flash version of HyperConverged Appliances that include both compute and storag...
Today’s enterprise is being driven by disruptive competitive and human capital requirements to provide enterprise application access through not only desktops, but also mobile devices. To retrofit existing programs across all these devices using traditional programming methods is very costly and time consuming – often prohibitively so. In his session at @ThingsExpo, Jesse Shiah, CEO, President, and Co-Founder of AgilePoint Inc., discussed how you can create applications that run on all mobile devices as well as laptops and desktops using a visual drag-and-drop application – and eForms-buildi...
We certainly live in interesting technological times. And no more interesting than the current competing IoT standards for connectivity. Various standards bodies, approaches, and ecosystems are vying for mindshare and positioning for a competitive edge. It is clear that when the dust settles, we will have new protocols, evolved protocols, that will change the way we interact with devices and infrastructure. We will also have evolved web protocols, like HTTP/2, that will be changing the very core of our infrastructures. At the same time, we have old approaches made new again like micro-services...
Code Halos - aka "digital fingerprints" - are the key organizing principle to understand a) how dumb things become smart and b) how to monetize this dynamic. In his session at @ThingsExpo, Robert Brown, AVP, Center for the Future of Work at Cognizant Technology Solutions, outlined research, analysis and recommendations from his recently published book on this phenomena on the way leading edge organizations like GE and Disney are unlocking the Internet of Things opportunity and what steps your organization should be taking to position itself for the next platform of digital competition.
The 3rd International Internet of @ThingsExpo, co-located with the 16th International Cloud Expo - to be held June 9-11, 2015, at the Javits Center in New York City, NY - announces that its Call for Papers is now open. The Internet of Things (IoT) is the biggest idea since the creation of the Worldwide Web more than 20 years ago.
As the Internet of Things unfolds, mobile and wearable devices are blurring the line between physical and digital, integrating ever more closely with our interests, our routines, our daily lives. Contextual computing and smart, sensor-equipped spaces bring the potential to walk through a world that recognizes us and responds accordingly. We become continuous transmitters and receivers of data. In his session at @ThingsExpo, Andrew Bolwell, Director of Innovation for HP's Printing and Personal Systems Group, discussed how key attributes of mobile technology – touch input, sensors, social, and ...