Bluetooth Low Energy (BLE): A Complete Guide

The Internet of Things (IoT) has been a buzzword for decades, but today this market is far from theoretical. There are over 10 billion active IoT devices globally, and one of the key technologies enabling this market growth is Bluetooth Low Energy (BLE).

Introduced in 2012, this flexible protocol provides wireless connection for many of IoT’s most critical applications. Its focus on operating with ultra-low power allows it to be used across industries such as consumer electronics, healthcare, and logistics.

In this article, we’ll equip you with all of the basics of BLE, so you can jumpstart your next BLE development project and get a piece of the massive $384 billion-dollar IoT market.

The Origins of Bluetooth

The Bluetooth Specification has been around since the 90s. The original intent was to design a protocol that would take the place of cables for transmitting data between devices over short distances. Today, this is still its primary use case.

Bluetooth is a short-range wireless technology that operates in the unlicensed 2.4 GHz ISM to transmit data and build personal area networks (PANs).

Most of us probably have a handful of Bluetooth devices within grabbing distance right now: cell phones, laptops, headphones, and speakers. In fact, in 2021, there were over 4.7 billion Bluetooth devices shipped globally. Bluetooth is one of the most widely used technologies in the world.

Most people on the street would know what Bluetooth is – at least at a high level. But behind the scenes, it’s a relatively complex technology standard managed by a group known as the Bluetooth Special Interest Group (SIG). Over the years, the Bluetooth SIG has released different versions of the Bluetooth Specification. The most popular protocols in the spec are Bluetooth Classic and Bluetooth Low Energy.

Up until 2010, the focus was on enhancing Bluetooth Classic. But in 2010, the Bluetooth SIG released v4.0. This version took a different direction than the previous versions by adding a new protocol: Bluetooth Low Energy (BLE).

What is Bluetooth Low Energy (BLE)?

Despite taking many cues from its predecessor, Bluetooth Classic, Bluetooth Low Energy is regarded as a different technology that specifically targets markets where the demand is for ultra-low power rather than high throughput.

Data communication with an LE radio happens in short bursts that do not need to be very frequent. A typical LE use case would include periodically turning on the radio, transferring or receiving a few bytes or kilobytes of data, and then turning off and going back to sleep.

This contrasts with Bluetooth Classic use cases where the radio is not turned off, like maintaining a connection for a lengthy period of time to guarantee the least latency when a call comes in, or use cases like the exchange of a large file.

Bluetooth Classic vs. Bluetooth Low Energy (LE)

While Bluetooth Classic and Bluetooth Low Energy protocols share many similarities, such as both being protocols covered by the Bluetooth Specification and both operating within the 2.4 GHz ISM band, they are two distinct, incompatible protocols.

Bluetooth Classic is designed to handle a lot of data, but it also consumes power quickly. Think about transmitting music from your phone to Bluetooth headphones. That is a traditional use case for Bluetooth Classic.

bluetooth classic vs bluetooth low energy (ble)

BLE, on the other hand, is designed for applications that don’t require handling a lot of data but do require really good battery life. Think about a sensor in a temperature-controlled warehouse that you want to set and forget for months or even years. BLE would be a better fit for that kind of application.

While there is more technical nuance to the two protocols, at a high level, the difference between Bluetooth Classic and Bluetooth Low Energy comes down to differences in power consumption and data throughput.

Advantages of BLE

By now, you understand that BLE was developed with a particular market in mind: that of devices that require low power and small data transmission. To help meet this market’s demand, Bluetooth Low Energy provides an array of advantages for both developers and end consumers of BLE devices. Let’s look at a few of the most valuable advantages of BLE:

advantages of bluetooth low energy (ble)

Low power consumption

Even when compared to other low-power technologies. BLE achieves optimized and low power consumption by keeping the radio off as much as possible and sending small amounts of data at low transfer speeds.

Low cost of entry into development

BLE modules and chipsets are low cost when compared to other similar technologies. This is a result of the increased adoption rate and competition in the marketplace.

Open access to documentation

With most other wireless protocols and technologies, you would have to become a member of the official group or consortium for that standard to access the specification. Becoming a member of those groups can cost a significant amount (up to thousands of dollars annually). With BLE, the major version (4.0, 4.1, 4.2, 5.0, 5.1, 5.2, 5.3, etc.) specification documents are available to download from the Bluetooth.com website for free.

Prevalence in smartphones

This is probably the biggest advantage BLE has over its competitors, such as ZigBee, Z-Wave, and Thread. The vast majority of people in the world own a smartphone, and almost all of those smartphones have BLE hardware inside. This gives developers a much larger potential user base for their applications.

Limitations of BLE

As a developer, understanding the limitations of a particular technology is just as important as understanding its advantages. In this way, you can determine if a particular technology is a good fit for your application or not. Let’s look at a few of the most important limitations of BLE.

Limitations of BLE

Data Throughput

The data throughput of BLE is limited by the physical radio data rate, which is the rate at which the radio transmits data. This rate depends on the Bluetooth version used.

For Bluetooth versions earlier than 5.0, the rate is fixed at 1 Mbps. For Bluetooth 5.0 and later, however, the rate varies depending on the mode, and PHY (discussed later in the Physical Layer section) used. The rate can be at 1 Mbps like earlier versions or 2 Mbps when utilizing the high-speed feature.

When utilizing the long-range feature, the rate drops to either 500 or 125 Kbps. At the application layer and for the end-user, the data rate is much lower than the radio data rate.

Range

BLE was designed for short-range applications; hence, its range of operation is limited. There are a few factors that limit the range of BLE, including:

Gateway Requirement for Internet Connectivity

To transfer data from a BLE-only device to the Internet, another BLE device that has an IP connection is needed to receive this data and then, in turn, relay it to another IP device (or to the internet).

BLE Applications

When it was released in 2010, the BLE protocol primarily focused on the Internet of Things (IoT) applications where small amounts of data are transferred at lower speeds. Over the last decade, BLE has been used in various applications, from consumer devices to industrial manufacturing. Let’s take a look at a few of the most common applications we see today:

ble-enabled fitness tracker

BLE and the Internet of Things (IoT)

While IoT technology has been around for some time, in recent years, it’s been gaining some serious traction. This traction means there’s also been an uptick in confusing explanations of what IoT is exactly. So, let’s break it down.

The Internet of Things is the network of billions of devices – “things” – that are connected wirelessly to exchange data over the internet. IoT technology helps to connect things like thermostats, smart lights, people with embedded medical devices, animals with implanted trackers, and cars with driver-assist sensors. Any person, animal, or man-made object can become a “thing” in IoT. This means IoT is essentially connecting people, processes, and systems.

bluetooth and the internet of things (IoT)

To make all of these connections possible, IoT relies on wireless technologies. ZigBee, Bluetooth Classic, and WiFi can all be used to connect devices wirelessly. However, BLE is often viewed as the most optimal technology for IoT applications because of two main reasons:

  1. Low power consumption. Many IoT devices are battery-powered and need to last in the field for a very long time. For example, it would simply be impractical to regularly replace the batteries in hundreds of sensors in a warehouse environment.
  2. The type of data being exchanged.BLE is optimized to transmit a small amount of data. This works great for IoT devices like sensors that just need to transfer state data.

BLE Beacons

Bluetooth beacons are small and wireless battery-powered transmitters that use BLE protocol for transmission. The special thing about beacons is that they usually work in one direction. They broadcast to nearby Bluetooth Low Energy devices, but they do not receive data. BLE beacons do not require an internet connection to do this broadcasting. Typically this would look like a single beacon broadcasting data to smart devices (cell phones, smart watches, etc.) nearby.

Currently, smartphone support for Bluetooth beacons is lacking, so real-world implementations are minimal. In the future, we will likely see beacons being used for things like proximity marketing, indoor navigation, and asset tracking in the logistics industry.

BLE Development Basics

The Bluetooth Low Energy protocol is not straightforward to learn, even if you’re a seasoned developer. To get you started on your BLE development journey, we’re going to break down the Bluetooth LE protocol architecture at a high level and each of the BLE protocol layers.

Bluetooth LE Protocol Architecture

Bluetooth Low Energy is a protocol. And just like any other protocol, it acts as a rulebook that devices must adhere to in order to communicate or exchange information.

It’s important to understand that a protocol’s general functionality is broken down into smaller protocols, each of which is responsible for a very specialized role. These smaller protocols are packaged into a layered architecture called a protocol stack or protocol suite.

The Bluetooth protocol stack is broadly broken down into three primary components or subsystems: application, host, and controller. Inside each of these blocks are distinct layers.

Bluetooth protocol stack

BLE Protocol Layers

If you are a developer looking to develop BLE applications, you won’t have to worry much about the layers below the Security Manager and Attribute Protocol layers. But it might still be helpful to have some context about these layers. Let’s take a look.

The Physical Layer

The physical layer (PHY) refers to the physical radio used for communication and for modulating/demodulating the data. It operates in the ISM band (2.4 GHz spectrum).

The Link Layer

The Link Layer is the layer that interfaces with the Physical Layer (Radio) and provides the higher levels an abstraction and a way to interact with the radio (through an intermediary level called the HCI layer which we’ll discuss shortly). It is responsible for managing the state of the radio as well as the timing requirements for adhering to the Bluetooth Low Energy specification.

The Host Controller Interface (HCI)

The (HCI) layer is a standard protocol defined by the Bluetooth specification that allows the Host layer to communicate with the Controller layer. These layers could exist on separate chips, or they could exist on the same chip.

The Logical Link Control and Adaptation Protocol (L2CAP)

The L2CAP layer acts as a protocol multiplexing layer. It takes multiple protocols from the upper layers and places them in standard BLE packets. These packets are then passed down to the lower layers beneath it.

Attribute Protocol (ATT)

The Attribute Protocol (ATT) defines how a server exposes its data to a client and how this data is structured.

Generic Attribute Profile (GATT)

The Generic Attribute Profile (GATT) defines the format of the data exposed by a BLE device. It also defines the procedures needed to access the data exposed by a device.

There are two Roles within GATT: Server and Client. The Server is the device that exposes the data it controls or contains and possibly some other aspects of its behavior that other devices may be able to control.

A Client, on the other hand, is the device that interfaces with the Server with the purpose of reading the Server’s exposed data and/or controlling the Server’s behavior. Keep in mind that a Bluetooth LE device can act as the Server and a Client at the same time.

To understand the GATT, you need to understand Services and Characteristics. Services are a grouping of one or more Attributes (a generic term for any type of data exposed by the server). It’s meant to group together related Attributes that satisfy a specific functionality on the Server. For example, the SIG-adopted Battery Service contains one Characteristic called the Battery Level.

A Characteristic is always part of a Service, representing a piece of information/data that a Server wants to expose to a client. For example, the Battery Level Characteristic represents the remaining power level of a battery in a device that can be read by a Client.

In BLE, there are six types of operations on Characteristics:

  1. Commands
  2. Requests
  3. Responses
  4. Notifications
  5. Indications
  6. Confirmations

Generic Access Profile (GAP)

The GAP provides a framework that defines how BLE devices interact with each other. This includes:

The different roles of a Bluetooth LE device are:

Keep in mind that a single device may operate in multiple Roles at the same time. For example, your smartphone can operate in the Central role when communicating with your smartwatch and also act in the Peripheral role while communicating with a PC.

How to Learn More About BLE?

We’ve only scratched the surface of the BLE technology. If you’re looking to dive a little deeper or just stay up-to-date on the latest in Bluetooth, there are numerous free and low-cost resources available. Some of our top tips are: