Bluetooth LE and iBeacon Primer

iBeacon_Logo_RGB

Welcome to our overview of Bluetooth LE and iBeacon! We hope this article will give you an introduction and some context for understanding how Bluetooth LE proximity systems work, and how our IoT Design Shop tools and technologies can help you to bring your ideas to life!

Objectives:

  1. Explain Bluetooth Low Energy Advertising, and how it the advertising scheme can be used by beacons and other proximity systems to identify themselves.
  2. Explain the configurable parameters of an iBeacon and how they can be used for real world applications.
  3. Introduce the IoT Design Shop beacon implementation, our unique feature set, and what the tradeoffs are between parameters like TX power and advertising intervals.

 

Bluetooth Low Energy and Advertising

bluetooth_4

Bluetooth LE Advertising

One of the most interesting and important features of the Bluetooth  4.0 Low Energy spec (we’ll call it BLE for brevity gong forward) is that devices can discover and communicate without an explicit pairing operation. This contrasts earlier Bluetooth specs which typically required manual pairing between devices.

When a BLE device is “advertising”, it is broadcasting public advertising data that any other BLE device is welcome to receive and react to. This can be used as the first step in a connection operation, or to broadcast public packets that others may be interested in.

The advertising data packets are limited in length (31 bytes on our hardware), so you can’t send a ton of data during advertising, but you can certainly send enough to identify a device and some of it’s most important features (such as services that it may provide).

Proximity Systems

So, how does this turn into a beacon? It’s simpler than you might think.

There are two key components:

  1. Bluetooth LE Advertising Data
  2. Radio Signal Strength

By now, you have probably inferred that the BLE Advertising Data is a perfect carrier for identification information. Beacons contain a unique ID in the advertising packets which allows the beacon to be identified, by devices scanning for known beacon ID’s. These ID’s are specified by Apps and services on the device.

beacon_regions

The second component is the strength of the signal being received. Again, fairly obvious, but the stronger the received signal, the closer you are to the source. Although it can be very difficult to range exactly based on these signal strengths, you can usually quantize to categories such as far, near, and immediate vicinity with pretty good results. These ranges can be used to tailor the responses and actions taken as the device moves through the radio field.

 

iBeacon Parameters

There are three unique parameters that the iBeacon standard specifies. These are encoded in the BLE Advertising Packets and broadcast at regular intervals. Remember, these signals are public, so all Smartphones and BLE-equipped devices in range can see the packets the beacon is transmitting.

The three parameters are as follows:

beacon_advertising

1) UUID (Universally Unique ID) – a 16 byte sequence usually expressed as a hex string. UUID’s are usually the same for devices in the same application, but they don’t have to be. For example, beacons in a specific location might all have the same UUID, or beacons manufactured by a particular vendor, and so forth. IoT Design Shop beacons allow you to set the UUID to whatever you would like via our configuration services (discussed in the next section)

2) Major Value – a 16-bit unsigned integer (value from 0-65535). This is an arbitrary value you can select for your application. One idea might be to have the major value specify a venue ID or a room number.

3) Minor Value – another 16-bit value (from 0-65535). Again, an arbitrary value you can choose. Often, minor is used as a sub-value such as a beacon number within a room, or at a venue where multiple beacons are deployed.

Triggering Schemes

The most important thing to know when devising a UUID, Major, and Minor ID scheme is that Core Location allows for hierarchical triggering schemes. This is important to your design strategy.

Here’s how it works. You can register beacon events on the following combinations:

beacon_triggers

Given our earlier example, let’s say we had a venue, like a department store:

  1. We could set up all the beacons in the store to have the same UUID.
  2. Each department could have a beacon code which we store in the Major ID.
  3. Finally, each beacon in a given department would have a unique minor ID.

The hierarchy of notifications in this case would be something like this:

trigger_uuid

On UUID, we could set a “Welcome to our store” message. This would show as soon as any beacon with our UUID was visible to the device.

triger_uuid_major

Next, we might set up a message that points the user to specials in a particular department when they get near to a beacon with the corresponding Major ID. “Welcome to the sporting goods department! Check out our special on golf equipment this week. ”

trigger_uuid_major_minor

Finally, UUID + Major ID + Minor ID represents our most granular level of location event. This might trigger a notification when the user gets to the golf section, inciting them to take advantage of the specials.

Of course, many other permutations are possible, but you can see the idea – different levels of notification are possible based on the hierarchy of the system. Also, you may only have a single beacon or much simpler system in many cases where this level of detail is not required.

 

IoT Design Shop Beacons

We covered a couple of the highlights, but here’s a more comprehensive breakdown of the features provided by our beacon hardware:

  • Configurable UUUD, Major ID, and Minor ID – we let you specify all of the ID parameters available in the iBeacon protocol. This allows you to ensure that your beacons are unique and completely tailored to your desired identification scheme.
  • Configurable Transmit Power – one unique feature of our beacons is adjustable transmitter power.  You can set the beacon to 0 dB (max power) or to -6 dB, or -23 dB. This helps in two ways. First, less power makes your batteries last longer. Second, it can be a useful tool for tuning the range of your beacons. -23 dB in particular is great for creating smaller “immediate” zones for more local detection.
  • Configurable Broadcast Interval - this one is a little trickier to understand as the effects are more subtle. By decreasing the broadcast interval (delay time between advertising packets), you increase the rate at which advertising packets are sent. This reduces response time for a device to detect that it has entered a beacon-enabled region. However, the more broadcast events, the more power consumed. Our beacons allow you to configure broadcast interval anywhere from 0.1s (10 advertisements per second) to 30 seconds (2 advertisements per minute). You can tune for the right balance of responsiveness and battery consumption for your application.

 

Conclusions

Hopefully all that made sense! Lots to digest, but it’s not crazy-complicated. To review:

  1. Bluetooth 4.0 Low Energy provides a mechanism for encoding public data in advertising packets that are visible to all devices that can read the data.
  2. The iBeacon protocol allows us to encode a UUID, Major ID, and Minor ID in the header. This data can be used for a variety of logical applications.
  3. Iot Design Shop Beacons allow you to configure UUID, Major ID, and Minor ID when deploying beacons. They also allow you to configure Transmit Power and Transmit Interval to fine tune responsiveness, range, and power consumption.

If you want to learn more about our beacons, visit www.iotdesignshop.com/beacon.

Leave a Reply