Basics of Bluetooth Low Energy

Intro to Bluetooth Low Energy #1

What is Bluetooth Low Energy?

Bluetooth started as a short-distance cable-replacement technology to replace wires in devices such as a mouse, a keyboard, or a PC.

The first official version of Bluetooth was released by Ericsson in 1994. There are two types of Bluetooth:

  • Bluetooth Classic (BR/EDR)

    • Also referred to as Bluetooth Basic Rate/Enhanced Data Rate (BR/EDR)

    • Used in wireless speakers, car infotainment systems, and headsets.

  • Bluetooth Low Energy (BLE)
    BLE, introduced in Bluetooth version 4.0, is more prominent in:

    • Battery-powered Devices: applications where power consumption is crucial.

    • Sensor Applications: applications where small amounts of data are transferred infrequently.

These two types of Bluetooth devices are incompatible with each other even though they share the same brand and even specification document. A Bluetooth Classic device cannot communicate (directly) with a BLE device. This is why some devices such as smartphones choose to implement both types (also called Dual Mode Bluetooth devices), allowing them to communicate with both types of devices.

So, we have three types of Bluetooth devices:

  1. Bluetooth Classic Devices

  2. BLE Devices

  3. Dual Mode Devices

Both Bluetooth Classic and BLE operate in the same frequency spectrum (the 2.4 GHz Industrial, Scientific, and Medical (ISM) band).

Since many Internet of Things (IoT) systems involve small devices and sensors, BLE has become the more common protocol in IoT.

Technical Facts About BLE

Some of the most important technical facts about BLE include:

  • The frequency spectrum occupied is 2.400 - 2.4835 GHz.

  • The frequency spectrum is segmented into 40 “2 MHz”-wide channels.

  • The maximum data rate supported by the radio (introduced in Bluetooth 5) is 2 Mbps.

  • The range varies significantly depending on the environment surrounding the communicating BLE devices as well as the mode used (for example, in long-range mode, the range will be significantly longer than in the 2M/high-speed mode). A typical range is 10-30 meters.

  • Power consumption also varies widely. It depends on the implementation of the application, the different BLE parameters, and the chipset used. The peak current consumption of a BLE chipset during radio transmission is typically under 15 mA.

  • Security is optional in BLE communication, and it is up to the device and application developers to implement it. There are also varying levels of security that can be implemented.

  • For all encryption operations, BLE uses AES CCM with a 128-bit key.

  • BLE is designed for low-bandwidth data transfer applications. Implementing BLE for high-bandwidth applications will significantly compromise the low power consumption promise. So, minimizing radio usage as much as possible achieves optimal power consumption.

  • Bluetooth versions (when it relates to BLE) are backward compatible with each other. However, the communication may be limited to the features of the older version of the two communicating devices.
    For example, a Bluetooth 5 BLE device can communicate with a Bluetooth 4.1 BLE device, but 5-specific features won't be supported.

Bluetooth Classic vs. BLE

It is important to note that there is a big difference between Bluetooth Classic and Bluetooth Low Energy in terms of technical specification, implementation, and the types of applications to which they are each suited. This is in addition to the fact that they are incompatible with each other.

Some of the notable differences are summarized in the following table:

Bluetooth ClassicBLE
Used for streaming applications such as audio streaming, file transfers, and headsets.Used for sensor data, control of devices, and low-bandwidth applications.
Not optimized for low power but has a higher data rate (3Mbps maximum compared to 2Mbps for BLE).Meant for low power, low duty data cycles.
Operates over 79 RF (radio frequency) channels.Operates over 40 RF channels.
Discovery occurs on 32 channels.Discovery occurs on 3 channels, leading to quicker discovery and connections than Bluetooth Classic.

BLE has gone through some major revisions and changes in the short time since its official release in 2010, with the most recent major update being Bluetooth 5 released in December 2016. Bluetooth 5 introduced many important upgrades to the Bluetooth specification, most of which were focused on BLE. Some of the most important enhancements include twice the speed, four times the range, and eight times the advertising data capacity.

Advantages and Limitations of BLE

Every technology has its limitations, and BLE is no exception. As we mentioned earlier, BLE is most suitable for applications with relatively short-range and infrequent low-bandwidth data transfers.

Limitations of BLE

Data Throughput

The data throughput of BLE is limited by the physical radio data rate. This rate depends on the Bluetooth version used. For Bluetooth 4.2 and earlier, the rate is fixed at 1 Mbps. For Bluetooth 5 and later, however, the rate varies depending on the mode and PHY (Physical Layer) being 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 due to the following factors:

  1. Gaps between packets: The Bluetooth specification defines a gap of 150 microseconds between packets being transmitted as a requirement for adhering to the specification. This gap is time lost with no data being exchanged between two devices.

  2. Packet overhead: All packets include header information and data handled at levels lower than the application level, which counts towards the data being transmitted but is not part of the data utilized by your application.

  3. Slave data packets requirement: The requirement to send back data packets from the slave, even when no data needs to be sent back and empty packets are sent.

  4. Retransmission of data packets: In the case of packet loss or interference from devices in the surrounding environment, the lost or corrupted data packets get resent by the sender.

Range

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

  • It operates in the 2.4 GHz ISM spectrum which is greatly affected by obstacles that exist all around us such as metal objects, walls, and water (especially human bodies).

  • Performance and design of the antenna of the BLE device.

  • Physical enclosure of the device which affects the antenna performance, especially if it is an internal antenna.

  • Device orientation, which effectively relates to the positioning of the antenna (e.g. in smartphones).

Gateway Requirement for Internet Connectivity

In order 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).

Advantages of BLE

Even with the previously mentioned limitations of BLE, it has presented some significant advantages and benefits over other similar technologies in the IoT space.

Some of these advantages include:

  • Lower power consumption
    Even when compared to other low-power technologies, BLE achieves a lower power consumption than its competitors. It's optimized, and less power consumed, by turning the radio off as much as possible, in addition to sending small amounts of data at low transfer speeds.

  • No cost to access the official specification documents
    With most other wireless protocols and technologies, you would have to become a member of the official group or consortium for that standard in order to access the specification. Becoming a member of those groups can cost a significant amount (up to thousands of dollars per year). With BLE, the major version (4.0, 4.1, 4.2, 5) specification documents are available to download from the Bluetooth website for free.

  • Lower cost of modules and chipsets when compared to other similar technologies.

  • Existence in most smartphones in the market
    This is probably the biggest advantage BLE has over its competitors such as ZigBee, Z-Wave, and Thread.

Applications Most Suitable for BLE

Based on the limitations and benefits we mentioned earlier, there are a number of use cases where BLE makes the most sense:

  • Low-bandwidth data
    For cases where a device transfers small amounts of data representing sensor data or for controlling actuators, BLE has proven to be a suitable wireless protocol to utilize.

  • Device Configuration
    Even in cases where BLE doesn't satisfy the main requirements of a system, it can still be used as a secondary interface to configure a device before the main wireless connection is established.

    For example, some Wi-Fi-enabled devices are adding BLE as a means to configure and establish the Wi-Fi connection of the device instead of using a technology such as Wi-Fi direct (a technology that allows two Wi-Fi devices to connect directly without going through a Wi-Fi router).

  • Using a smartphone as an interface
    Small, low-power devices usually don't have large screens and are only capable of displaying limited amounts of data to the end user. Due to the proliferation of smartphones nowadays, BLE can be utilized to offer an alternate, much richer user interface to these small devices (even if just for this sole purpose). Another by-product benefit of using a smartphone is that the data can be relayed up to the cloud.

  • Personal and wearable devices
    For use cases where a device is portable and can be located in areas where no other persistent wireless connections exist (such as Wi-Fi), BLE can be used (since it is a direct peer-to-peer connection).

  • Broadcast-only devices
    You have probably heard of and maybe seen, Beacon devices before. These devices have one simple task: to broadcast data so other devices may discover them and read their data.
    There are other technologies that have been used for this kind of application. However, BLE is becoming more and more popular because most people carry smartphones that already support BLE out-of-the-box.

These are all great use cases that could benefit from utilizing BLE. On the other hand, use cases that are not (generally) suitable for BLE include:

  • Video streaming.

  • High-quality audio streaming.

  • Large data transfers for prolonged periods of time (if battery consumption is a concern).