30 September 2016

Bluetooth vs. Bluetooth Low Energy (BLE)

The Bluetooth Low Energy (BLE) specification was introduced in Bluetooth version 4.0. Prior versions of Bluetooth are also referred to as Bluetooth Classis. Bluetooth Classic and BLE are not compatible. Therefore, a device can either support Bluetooth Classic, BLE or both. A single-mode device that only implements BLE cannot communicate with a device that only implements Bluetooth Classic.

So what are the differences and similarities between the two?

As the name indicates, it mainly has to do with power consumption. Bluetooth was originally designed for continuous, streaming data applications. You can exchange a lot of data at close range. People can receive data and talk at the same time, and exchange multimedia data between devices.

With BLE’s low power consumption, applications can run on a small battery for 5 - 10 years. BLE was designed for applications that do not need to exchange a large amount of data, and therefore, can run on battery power for years at a cheaper cost. This is important for applications that only need to exchange small amounts of data periodically, which makes it ideal for supporting IoT applications.

Both Bluetooth Classic and BLE operate in the 2.4 GHz ISM band. Unlike Bluetooth Classic, BLE remains in sleep mode most of the time except for when a connection is initiated - this is how power consumption is kept to a minimum. Power consumption is also kept low because the actual connection time for BLE is only a few milliseconds, unlike Bluetooth Classic that takes about 100 milliseconds. The maximum, or peak, power consumption is only 15 mA, and the average power consumption is only about 1 µA.

BLE Protocol Stack

The Controller is usually implemented as a System-on-Chip (SOC) with an integrated radio. The Host runs on an application processor and includes upper layer functionality. Communications between the Controller and Host is standardized as the Host Controller Interface (HCI). Non-core profiles (application layer functionality not defined by the Bluetooth specification) is on top of the Host.

BLE Protocol Stack (Gomez et al, 2012)

The Physical Layer

BLE defines 40 radio frequency (RF) channels with 2 MHz spacing. The data rate is 1 Mbps. The bit error rate (BER) is 10-3. The physical channels use GFSK modulation. There are two types of channel:
  1. Advertising channels are used for device discovery, connection establishment and broadcast transmission. Three channels are defined as advertising channels and are assigned center frequencies that minimizes overlapping with IEEE 802.15.4 channels 1, 6 and 11.
  2. Data channels are used for bidirectional communication between connected devices.

An adaptive frequency hopping mechanism is used to overcome interference and wireless propagation issues, such as fading. It selects on of the 37 available data channels for communication for a given time interval.

The Link Layer

When a device wants to broadcast data, it transmits the data in advertising packets through the advertising channels - this device is an advertiser. The transmission of the packets takes place in time intervals called advertising events. Scanners are devices that receive the data.

Bidrectional communication between two devices requires them to connect to each other. The connection establishment is an asymmetric procedure, where an advertiser announces that it is a connectable device via the advertising channels. The other devices, called an initiator, listens for the advertisements.

When an initiator finds an advertiser, it transmits a Connection Request to the advertiser, creating a point-to-point connection between them. The packets for this connection are identified using a randomly generated 32-bit access code.

BLE defines two device roles for a connection:

  1. A master (initiator) can manage multiple simultaneous connections with different slaves.
  2. A slave (advertiser) can connect to one master only.

A network is composed of a master and its slaves, forming a piconet in a star topology. A BLE device can belong to only one piconet.

In order to save energy, slaves are in sleep mode by default and wake up periodically to listen for packet transmissions (if any) from the master. The master determines the time intervals during which slaves are required to listen and coordinates the medium access using TDMA. The master also provides the slave with the information needed for the frequency hopping algorithm.

After a connection between a master and slave is established, the physical channel is divided into non-overlapping time units called connection events. Within a connection event, all packets are transmitted using the same data channel frequency. Each connection event starts with a packet transmission by the master. When a slave receives a packet, it must send a packet to the master as a response. The master, however, is not required to respond to a packet it receives from a slave. An Inter Frame Space (IFS) of 150 µs must pass between the end of a packet transmission and the start of the next one.

For a new connection event, the master and slave use a new data channel frequency, which is computed using the frequency hopping algorithm. The time between the start of two consecutive connection events is specified by the connInterval parameter, which is a multiple of 1.25 ms in the range between 7.5 ms and 4 s. connSlaveLatency specifies the number of consecutive connection events that the slave is not required to listen to the master — during this time period, it can sleep.

The Link Layer uses a stop-and-wait flow control mechanism based on cumulative acknowledgement, which also provides error recovery capabilities.

Logical Link Control and Adaptation Protocol (L2CAP)

BLE's L2CAP is an optimised and simplified version of Bluetooth Classic's. It multiplexes data from the higher layers (ATT, SMP and Link Layer control signaling) on top of a Link Layer connection. The data from upper layer services are handled using a best-effort approach (no retransmission and flow control mechanism). Segmentation and reassembly are not supported because upper layer protocols transmit data units that fit into the maximum L2CAP payload size (23 bytes).

Attribute Protocol(ATT)

ATT defines the communication between two devices acting as a server and a client on top of a dedicated L2CAP channel. The server maintains a set of attributes, which is a data structure that stores information managed by the Generic Attribute Profile (GATT). The client or server role is determined by GATT and is independent of the master / slave role.

A client access the server's attributes by sending a request, which the server responds to with a message. A server can send an unsolicited message containing its attributes to the client. There are two types of unsolicited message: notifications (unconfirmed) and indications (a client must send a confirmation).

Generic Attribute Profile (GATT)

GATT defines the framework that uses ATT for service discovery and exchange of characteristics between devices. A characteristic is a set of data that includes a value and properties. Data related to services and characteristics are stored in attributes.

Generic Access Profiles (GAP) and Application Profiles

GAP defines device role, mode, and procedures for device and service discovery. There are four roles:
  1. Broadcaster: A device in this role only broadcasts data and does not support connections with other devices.
  2. Observer: This device receives data transmitted by the Broadcaster.
  3. Central: This device is in charge of initiating and managing multiple connections. It requires the device's controller to support the master role.
  4. Peripheral: This role is for simple devices that use one connection with a device in the Central role. It requires the device's controller to support the slave role.

A device may support multiple roles, but only one role can be adopted at a time.

Source

No comments:

Post a Comment

IEEE 802.15.4e Standard

Low reliability, unbounded packet delays and no protection against interference and fading are among the limitations of the IEEE 802.15.4 ...