Building iBeacon Networks - Building Applications with iBeacon (2015)

Building Applications with iBeacon (2015)

Chapter 6. Building iBeacon Networks

iBeacons are simpler than other wireless networks, and as a result, the planning process can be much more lightweight than what you might be expecting if your only experience working with wireless is with higher-bandwidth networks such as Wi-Fi.

Building an application and putting together a supporting iBeacon network are two sides of the same coin. Whether the application is designed to help shoppers find items, travelers navigate an airport or hotel, or conference attendees register and find sessions of interest, iBeacons must be deployed in physical space to support that application.

Planning and Project Objectives

As with any other project, the key to success is to have a plan with clear objectives. In the case of an iBeacon project, the main purpose is to build support for an application running on a mobile device, and any physical network design aspects must take their cue from application requirements. Objectives set by the application development team will inform many of the design decisions made for the initial deployment as well as ongoing maintenence.

Identifying the Objective

Begin planning with identifying the objective of the iBeacon project. Objectives can be varied, depending on the purpose of the application under development. Some common motivations to strive for are increasing customer engagement and making other products or services easier to use.

In the broadest possible sense, engagement is a measure of how much users are interacting with your application. When applications are newly released, organizations will often use engagement, such as the amount of time spent actively using an application, as a key metric in success. For an iBeacon project, the goal is often to increase the amount of time users spend with an application by adding interactivity to it. A retailer might use iBeacons to drive in-store shoppers to their website to look through the full catalog, and they might track the success of an application based on how many shoppers use the website based on an in-store trigger.

Ease of use is a broad category, and there are many ways for iBeacons (or in fact any proximity technology) to bridge the gap between the physical and virtual worlds. As many more small sensors and controls are introduced to homes, the setup process is increasingly daunting for many people. Because they operate at short range, iBeacons are useful as a trigger to begin configuring a nearby device, perhaps by triggering a higher-bandwidth connection such as Wi-Fi.

Proximity enables applications to automate business processes, decreasing the amount of time spent waiting. Whether an application can submit an online restaurant order automatically on entering a restaurant, print a conference badge automatically when the user steps up to the registration desk, or trigger the completion of a transaction, proximity pulls application users into your processes and makes them easier and faster to complete.

An underdeveloped area of iBeacon application is peer-to-peer applications. iBeacons themselves cannot broker communications, but they enable applications to make direct connections through an external rendezvous point. A few applications register the iBeacon identities that they are near and then use an IP-based service to make direct connections to other devices nearby. Although a few applications have started to take advantage of this capability, it remains largely unexploited.

Selecting Numerical Identifiers

With a clear idea of the purpose of the application, the next step is to design the interaction between iBeacons and the application. An application responds to identifying numbers in iBeacon transmissions, so as part of designing and building the application, you will need to select those numbers and figure out how to assign them:

UUID

The UUID is the easiest number to come up with because it should be unique to the application. An application that supports multiple brand names might use different UUIDs, but generally speaking, the UUID is consistent across the world for the entire application. You can easily get one by using the uuidgen tool on the command-line interface of your Mac.

Major number

Within the context of an application, the major number needs to identify broad groups of proximity areas that make sense logically. Within a chain of retail stores, the major number is typically tied to a store and the 16-bit field allows for 65,000 possibilities. In a more fragmented market, such as selling services to individual small businesses, the major number could potentially be a subscriber to services, but if the service is successful and signs up more than 65,000 customers, the numbering scheme might need to be redesigned.24

Minor number

The minor number is a further subdivision of the grouping defined by the major number. Major numbers typically refer to a geographic location, and the minor number would be points of interest within one location. Running out of minor numbers seems unlikely in most circumstances.

Do not depend on iBeacons themselves to provide any security. iBeacon broadcasts are readily received by devices. The Radius Networks tools from Chapter 3, and many similar tools, will report on observed iBeacons, so you should expect sophisticated users to decode the iBeacon triggers in your application.

In fact, Radius has begun to record iBeacon locations and has made them available on a map at WikiBeacon. Figure 6-1 shows an artistic iBeacon arrangement of a beaker, overlaid on a Google Map.

iBeacon beaker map

Figure 6-1. iBeacon beaker

Beacon Location Selection

To support the application, iBeacons need to be placed into the physical space that the application interacts with. The number of iBeacons depends on the objectives of the application. Relatively simple applications might require only a few iBeacons, but complex applications might require a large number of proximity points.

Both fixed and mobile locations can be used. The former is useful for helping application users navigate to locations within the space, while the latter option is used to make an application respond to proximity. Using mobile iBeacons lets the application automatically adapt to changes in the physical space. If, for example, an application uses iBeacons to monitor queue length (say, of an airport security line), the beacons can change locations without affecting the function of the application. iBeacons still trigger an application to log queue entry and exit, even if the queue changes its location within the building.

Choosing locations depends on the number of proximity points that an application requires. For a basic “welcome to our building” application, a few iBeacons at high power can readily blanket an area with beacon transmissions. Look for locations up high and with an unobstructed line-of-sight view to the application users. More sophisticated applications that help with wayfinding or trigger actions based on being within a few feet of something require many more iBeacons working at lower power.

The good news is that selecting locations for iBeacons is much easier than for data-oriented networks such as Wi-Fi. Bluetooth signals require significantly lower signal-to-noise ratios, employ frequency-hopping to avoid interference, and operate at much lower power. Many iBeacons can run for long periods of time on battery power, which is ideal for an iBeacon attached to a retail display.

iBeacons can even be designed to move, depending on the purpose of the application. If an application is designed to help interact with a museum artifact, the iBeacon will move with its display so that users can still find relevant information no matter how its location changes.

Beacon Configuration

iBeacons do not require much in the way of configuration because of the simplicity of the protocol. Essentially, an iBeacon needs to be configured with its identifying numerical tuple (UUID, major number, and minor number), along with a power setting and a calibration constant to turn received signal power into an accurate proximity measurement.25

Setting the power on an iBeacon depends on the desired effect. High power provides a large coverage area. If an application is designed to automatically pay for a waiting order, it is likely that the iBeacon that triggers that process should use high power to begin the payment transaction as soon as possible. However, if the purpose of the application is to guide a user through a museum, the power setting likely should be smaller to reduce the number of exhibits an application might display interpretive text for.

High- and low-power iBeacons can be mixed within a deployment as well. High-powered transmitters can be used to wake up an application while the user is still walking up to the entry point, so that the application then begins actively searching for triggers based on specified major and minor numbers.

At this point, configuring large numbers of iBeacons is a time-consuming experience. With few exceptions at the time of this writing, the available tools are designed for configuring individual iBeacons, so there is no good way to make changes to multiple devices at once. Each iBeacon also needs to be calibrated. To build iBeacon networks at a large scale, management tools need to adopt a network-centric view and the capability to configure multiple devices at once, preferably with the ability to assign major and minor numbers based on location.

Monitoring

Once an iBeacon network is set up, there is the need to run the network on an ongoing basis. iBeacons do not present a significant ongoing monitoring burden. The following list details the major items that need to be resolved:

iBeacon disappearance

Applications are designed to look for a set of iBeacons and take actions based on them. Once installed, iBeacons should continue to function. iBeacons might disappear when they are removed from service, such as when an exhibit is removed or a promotion ends. Premature disappearance is likely because a battery-powered iBeacon has stopped operating, and action is required to restore the iBeacon to its transmitting state.

iBeacon appearance

The flip side of iBeacons going away is that iBeacons that appear should also be checked. Either they are part of a new display and should be tagged as such, or they might represent rogue beacons that should be found and deactivated.

iBeacon health

Battery-powered iBeacons might give warnings of impending failure as their battery capacity decreases. If an application requires large numbers of battery-powered iBeacons, some sort of mass-monitoring tool to check on battery health is a practical requirement.

Project Checklist

iBeacon projects are exciting because they offer the opportunity to make an organization’s technology infrastructure respond more smoothly to users and make organizational processes more efficient. Much of an iBeacon project is based around developing an application that responds to its surroundings.

Being successful with iBeacons requires attention to a few key details:

Clearly identify project objectives

With iBeacons, the “big idea” is to use proximity to enhance an application user’s experience.

Design the iBeacon network

Choose the right structure of the numerical identifiers, and place iBeacons in the right number of proximity points to support your application.

Configure and monitor the iBeacons

At the time this book went to press, large-scale monitoring and configuration were unsolved problems. It seems likely that moving from managing individual devices to managing groups of devices is a necessary development to support large iBeacon projects.

With the application developed and the supporting cast of iBeacons in the physical space, you are ready to let users at the application!

24 While writing this book, I looked at a popular restaurant reservation service and found that they had 31,000 restaurants using their service, which means that the company might not want to use the major number for an individual restaurant. As far as I can tell, it is currently safe to use the major number for a chain; the largest restaurant chain I found has a little over 42,000 restaurants.

25 Many iBeacon devices also allow configuration of the advertisement interval, but Apple’s iBeacon specification fixes it at 10 advertisements per second.