Bluetooth Low Energy Data Transfer Modes: A Comparison
This article introduces and compares Bluetooth Low Energy’s legacy advertising, extended advertising, and connection-oriented data transfer modes.
Smartphones are everywhere, right? Well, guess what—these days, IoT (Internet of Things) devices might be even more common than smartphones, and a lot of these devices run on Bluetooth Low Energy (BLE) technology. Whether you’re an engineer specializing in IoT, exploring opportunities for IoT product development, or just generally interested in how IoT works, learning about BLE will benefit you. In this article, we’ll familiarize ourselves with BLE’s various methods of data transfer and improve our understanding of their performance levels.
Connectionless Data Transfer
Connectionless data transfer, also known as broadcasting, refers to data transmission meant for a wide audience rather than a specific recipient or group of recipients—it's like a public announcement that anyone nearby can hear, rather than a private conversation. These types of transfers are characterized by the ability, commonly known as multicast transmission, to reach multiple receivers simultaneously.
BLE offers two primary mechanisms for connectionless data transfer:
- Legacy advertising
- Can broadcast up to 31 bytes of data at a time.
- The data capacity can be slightly increased by adding a scan response packet of 31 bytes.
- As the name suggests, legacy advertising is the older of the two modes.
- Extended advertising
- Increases the broadcasting data limit from 31 bytes to 254 bytes.
- For more substantial data requirements, it supports advertisement chains that can handle up to 1650 bytes of data. This expanded capacity allows a richer set of information to be broadcasted, benefiting applications like beacon deployments and enhancing location-based services.
Advantages of Connectionless Data Transfer
Connectionless data transfer modes afford the following benefits:
- Multicast transmissions. This enables one-to-many communication, where a single device can broadcast information to multiple recipients simultaneously. It's particularly useful in applications that require simultaneous updates to various devices, such as beacons in retail advertising.
- Efficiency. Without the need to establish and maintain individual connections, connectionless modes are generally more efficient in terms of both speed and resource utilization. Since there's no handshaking or connection maintenance involved, the data can be sent more quickly and with fewer resources, allowing for smoother operation and potentially lower power consumption.
Limitations of Connectionless Data Transfer
Now that we’ve looked at the advantages of broadcasting, it’s time to examine the drawbacks and how to mitigate them:
- Security concerns
- Drawback: Connectionless transfers traditionally lack link layer encryption. The advertisement data is sent in plaintext, making it readable to anyone with access.
- Mitigation: Bluetooth LE 5.4 introduced Encrypted Advertising, which enhances security and allows secure broadcasting using specific profiles such as BLE Audio.
- Lack of transmission control
- Drawback: In connectionless data transfer, the broadcaster and observer devices do not negotiate transmission parameters such as channels, timing, or sequence. Broadcasters repeatedly transmit on primary channels, requiring observer devices to continuously scan these channels (37, 38, 39). This process, especially with legacy advertising, can quickly deplete the scanner’s battery.
- Mitigation: This problem is less severe with extended advertising.
- Power consumption and design considerations
- Drawback: The advertising and scanning intervals, which are the periods during which devices sleep before advertising or scanning again, significantly impact power consumption. Care must be taken when setting these values.
- Mitigation: Designers typically adopt an asymmetric approach: battery-constrained devices broadcast less frequently, while devices with larger battery capacities scan more frequently. This design choice maintains user convenience without excessively draining battery resources.
- Channel congestion
- Drawback: In legacy advertising, data is sent directly on the primary advertising channels. With advertisement packets sent up to three times per advertising event, congestion can occur, especially with longer packets. This is problematic in dense IoT environments.
- Mitigation: Extended advertising mitigates this by transmitting only the header on primary channels, with the actual data sent on one of the 37 secondary channels.
Connection-Oriented Data Transfers
In connectionless communication, devices blast messages into the open air, hoping they get picked up by the intended receivers. Connection-oriented data transfers represent a more structured way for BLE devices to communicate. Figure 1 provides a visual representation of this process.
Figure 1. The connection-oriented data transfer process. Image used courtesy of Nthatisi Hlapisi
In connection-oriented mode, data transfer has four steps:
- Device discovery. The Peripheral device initiates the process by broadcasting connectable advertising packets at regular intervals. These packets carry key information such as the device name, the services provided, and what types of Bluetooth are supported by the peripheral’s radio. This information helps the Central device quickly identify and assess the Peripheral during scanning.
- Establishing connection. When the Central discovers a Peripheral it wants to connect to, it sends a connection request. This request includes connection parameters such as the connection interval (the time between data transfer events), slave latency (the number of connection events a Peripheral can skip), and supervision timeout (the time after which a connection is dropped if there's no communication). The Peripheral may then accept or reject this request. If accepted, a connection is established with the negotiated parameters.
- Data transmission. Once connected, devices can send data across the established link. Unlike the random channel usage in connectionless mode, connection-oriented mode uses designated channels to enhance reliability and efficiency.
- Acknowledgments and control. As data is transmitted, each packet is acknowledged by the receiver. If a packet fails to reach its destination, the sender knows to resend it. Additionally, control messages may be exchanged between the devices to manage the connection parameters, ensuring that the link remains stable and effective.
All the connection parameters for a data packet transmitted in this mode can be seen in Figure 2.
Figure 2. Transmission of data packets and acknowledgments in connection-oriented data transfer mode. Image used courtesy of MDPI
Advantages of Connection-Oriented Mode
The strengths of connection-oriented mode are:
- Reliability. Every piece of data sent is acknowledged. If a packet doesn't get through, it's sent again, ensuring that complete data gets from one device to the other.
- High bandwidth. Dedicated data channels increase the available bandwidth, enhancing data throughput.
- Enhanced security. The mode supports link layer encryption, ensuring that data remains confidential during transmission.
- Segmentation and reassembly. During transmission, data is split (or "segmented") into smaller pieces for transmission. Upon reception, these pieces are joined back together (or "reassembled"). This ensures that even large sets of application data are transferred efficiently.
Limitations of Connection-Oriented Mode
This mode also has limitations, namely:
- Overhead. Connection-oriented mode involves a series of handshakes and acknowledgments. This can introduce overhead, making it less efficient for very small data transfers.
- Higher power consumption. The continuous acknowledgment system and connection maintenance can lead to increased power usage.
- Scalability issues. Managing multiple simultaneous connections can become challenging, particularly in densely connected environments.
Performance Insights from a Home Automation Project
The release of Bluetooth 5 brought new features—including the extended advertising mode discussed above—to IoT engineers. But is the latest always the greatest?
A research team led by Piergiuseppe Di Marco tested the new and old BLE data transfer modes to see which features worked best in different scenarios.
Figure 3. A simulated BLE smart home. Image used courtesy of IEEE
Researchers simulated a typical single-family smart home measuring 12 m by 10 m and equipped with 77 IoT devices, including window sensors, light switches, and light bulbs. Central to this setup was a gateway device, which stayed active at all times to manage the data flow. Meanwhile, battery-powered sensors mostly stayed dormant, activating only when transmitting or receiving data.
The study also factored in real-world issues, such as varying signal reception: in the simulation, walls reduced signal strength by 6 dB each, and signal degraded by 0.5 dB per meter.
The research team assessed each data transfer mode using the following metrics:
- Service ratio: The success rate or reliability of the data transfer within a given time frame. This metric tells you what percentage of your data is successfully delivered to its intended destination. It is the complement of the traffic loss ratio, which tells you the percentage lost along the way.
- Packet delay: Also referred to as latency, this measures the time it takes for data to be transferred from the source device to the target device. For applications that require real-time or near-real-time data transmission, minimizing delay is essential to ensure a smooth user experience.
- Battery life: The duration a device can operate on a single battery charge when using a specific data transfer mode. For IoT devices, many of which are battery-powered and deployed in remote or hard-to-reach areas, maximizing battery life is paramount. Longer battery life means less frequent maintenance and more reliable long-term operation.
Results in a nutshell
- Service ratio: Extended advertising performed well with longer payloads but fell short with shorter ones. Legacy advertising (the old method) remained the best option for short bursts of data. Connection-oriented mode performed better than extended advertising with small data packets, but struggled with heavy traffic.
- Packet delay: Here, legacy advertising was the star: it had the shortest delay, especially for short packets. By and large, extended advertising performed less well; connection-oriented mode was the slowest of all, struggling with re-transmissions and timeouts.
- Battery lifetime: Extended advertising proved itself the way to go if you want your battery to last, outperforming the others across all scenarios. Legacy advertising did well but was limited to short packets, while connection-oriented mode was the least efficient.
Which Mode Is Best?
Ultimately, choosing a data transfer mode is all about using the right tool for the job. Connection-oriented mode is reliable, and extended advertising offers excellent battery life and adaptability for longer payloads—but, as seen above, legacy advertising still outperforms newer alternatives in some situations. Each mode has its own set of pros and cons, and IoT engineers should make their decisions on a project-to-project basis.