Aller au contenu principal
Aller au contenu principal

Protocols

Bluetooth Low Energy (BLE)

Ultra-low energy connectivity for wearables and proximity

Official spec ↗
Audio summary
0:00 / 0:00

Executive summary

  • BLE IoT — Bluetooth Low Energy, also called "Bluetooth Smart" — is the low-power variant of Bluetooth, introduced in Bluetooth 4.0 (2010) and maintained by the Bluetooth SIG. If you're new to the ecosystem, first review what IoT is to understand the context of short-range communication protocols.
  • It operates in the 2.4 GHz band with a design optimized for sending small amounts of data sporadically with minimal power: a coin cell can last months or years.
  • Its data model is GATT (Generic Attribute Profile): devices expose services and characteristics that a client reads, writes, or receives by notification.
  • It's the dominant protocol in wearables, proximity sensors, beacons, medical devices, locks, and anything that pairs with a smartphone, because it's built into every phone.
  • BLE 5.x (2016+) added greater range (Coded PHY), more speed (2M PHY), extended advertising, and, with Mesh, multi-node networks.
  • Don't use it when: you need long range with no phone nearby (use LoRaWAN), sustained high bandwidth, or a mature home mesh for lighting (Zigbee/Thread usually fit better).

What BLE is and how it differs from classic Bluetooth

Bluetooth Low Energy shares its brand with the Bluetooth we've always known, but it's a different protocol. "Bluetooth Classic" (BR/EDR) is designed for continuous streaming: headphone audio, car hands-free. BLE is designed for the opposite: sending a small data point (a temperature reading, a heart rate) and going back to sleep.

AspectBluetooth ClassicBLE
Typical use caseAudio, streamingSporadic telemetry, control
Power drawHighVery low
Connection latency~100 ms~3 ms
TopologyPoint-to-pointPoint-to-point, broadcast, mesh
Throughput1-3 Mbps~125 kbps - 2 Mbps (BLE 5)

What made BLE ubiquitous in IoT isn't any single technical feat, but the fact that it's in every smartphone. Any BLE device has a potential gateway in its user's pocket. That makes it the natural choice for consumer products configured or read from an app.

How BLE works

Roles: central and peripheral

  • Peripheral: the small device (a sensor, a wristband, a beacon). It advertises its presence and exposes data.
  • Central: the one that scans and connects (typically the smartphone or a gateway).

Advertising and connection

A peripheral broadcasts advertising packets over three reserved channels. There are two paths:

  1. Connectionless (broadcast): the peripheral only broadcasts data in the advertising. This is what beacons do (Apple's iBeacon, Google's Eddystone). There's no connection; anyone listening can read it.
  2. Connection-oriented: the central sees the advertising, connects, and from then on they exchange data reliably over GATT.

GATT: services and characteristics

Once connected, the data is organized hierarchically:

text
Profile
 └── Service (e.g. Heart Rate Service, UUID 0x180D)
      └── Characteristic (e.g. Heart Rate Measurement, UUID 0x2A37)
           ├── Value (the data bytes)
           └── Descriptors (metadata, e.g. notifications on/off)

The central can read, write, or subscribe to notify/indicate to receive updates when the value changes (for example, on every heartbeat). The SIG defines standard services (heart rate, battery, temperature) and allows custom 128-bit UUIDs for custom data.

GAP: discovery and security

The GAP (Generic Access Profile) governs how devices advertise and connect, and security: pairing, bonding (remembering the pairing), and AES-128 encryption. BLE supports LE Secure Connections with ECDH to protect against eavesdropping during pairing — an improvement over the more vulnerable legacy methods.

BLE 5 PHYs

BLE 5 introduced several physical layers that are selected based on the goal:

  • 1M PHY: the classic one, 1 Mbps, the default balance.
  • 2M PHY: 2 Mbps, more data in less time (saves battery through faster transfer).
  • Coded PHY (LE Long Range): sacrifices speed for range, reaching hundreds of meters in line of sight.

Real-world use cases

SectorConcrete example
**Wearables**Wristbands, smartwatches, and heart-rate monitors sync with the phone over BLE (the standard Heart Rate Service).
**Connected health**Glucose meters, blood-pressure monitors, and scales use medical GATT profiles to dump readings to apps.
**Beacons / retail**iBeacon and Eddystone for proximity, indoor navigation, and contextual notifications in stores and museums.
**Proximity [asset tracking](/en/use-cases/asset-tracking)**BLE tags (AirTag/Tile style) located by the fleet of nearby smartphones.
**Access and locks**Smart locks and access control that open with the phone.
**Device provisioning**Many Wi-Fi/[LoRaWAN](/en/protocols/lorawan) products use BLE just for initial onboarding from the app.

When NOT to use BLE

  • Autonomous long range: even with Coded PHY, BLE is for proximity. For kilometers without a nearby gateway, use LoRaWAN or NB-IoT.
  • Mature home-lighting mesh: BLE Mesh exists and works, but the fixed-home-automation ecosystem is still dominated by Zigbee and Thread. If your case is smart home, Zigbee or Thread offer a more mature ecosystem.
  • Many devices publishing to a central backend without a phone in the loop: that's where the MQTT-over-Wi-Fi/cellular pattern fits better.
  • Sustained high-throughput streaming: that's what Bluetooth Classic or Wi-Fi are for.

BLE Mesh: multi-node networks

Bluetooth Mesh (2017) is a specification on top of BLE for creating networks of many nodes, designed mainly for commercial lighting and buildings. It works through managed flooding: messages are relayed by relays rather than along calculated routes as in Zigbee. It's robust and simple, but less traffic-efficient than a routed mesh. It competes with Zigbee and Thread in the smart-building space, with the advantage of being able to interact with smartphones that already carry BLE.

BLE compared with the alternatives

Against Zigbee, BLE wins on phone integration and on wearables/proximity, while Zigbee has a more mature home-automation mesh. Against Wi-Fi, BLE uses far less power but offers less bandwidth and range. Against LoRaWAN, they play in different leagues: BLE is proximity (meters), LoRaWAN is long range (kilometers) with very little data.

AspectBLEZigbeeWi-FiLoRaWAN
Band2.4 GHz2.4 GHz2.4/5 GHzSub-GHz
Typical range10-100 m10-100 m30-50 m2-15 km
Power drawVery lowVery lowHighUltra-low
Native gatewaySmartphoneDedicated hubRouterLoRa gateway
MeshBLE MeshYes (mature)NoNo
Flagship use caseWearables, beaconsFixed home automationCameras, high BWRemote sensors

Getting started: reading a BLE sensor with an ESP32

The ESP32 has an integrated BLE radio, which makes it ideal for prototyping both peripherals and centrals. This Arduino example creates a peripheral that exposes a temperature characteristic via notification.

cpp
#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
#include <BLE2902.h>

#define SERVICE_UUID        "180A"   // Device Information (example)
#define CHAR_UUID           "2A6E"   // Temperature

BLECharacteristic *tempChar;

void setup() {
  BLEDevice::init("ESP32-Sensor");
  BLEServer *server = BLEDevice::createServer();
  BLEService *service = server->createService(SERVICE_UUID);

  tempChar = service->createCharacteristic(
      CHAR_UUID,
      BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_NOTIFY);
  tempChar->addDescriptor(new BLE2902());

  service->start();
  BLEDevice::getAdvertising()->start();
}

void loop() {
  int16_t tempCenti = 2150;  // 21.50 °C in centigrade x100
  tempChar->setValue((uint8_t*)&tempCenti, 2);
  tempChar->notify();
  delay(2000);
}

From the phone, an app like nRF Connect (Nordic Semiconductor) scans, connects, and shows the characteristic notifying every 2 seconds. It's the fastest way to inspect and debug any BLE peripheral.

Pros and cons

Pros

  • Ubiquitous: built into every smartphone and most modern MCUs (ESP32, nRF52).
  • Minimal power draw: ideal for coin cells and devices that sleep almost all the time.
  • A standard with defined profiles: standard GATT services for health, battery, etc.
  • Versatile: connectionless (beacons), connection-oriented (sensors), or mesh.
  • Excellent tooling ecosystem (nRF Connect, libraries on every platform).

Cons

  • Proximity: limited range, no substitute for long-range networks.
  • Saturated 2.4 GHz band: coexistence with Wi-Fi and Zigbee.
  • Modest throughput: no heavy multimedia.
  • Profile fragmentation: outside the standard services, every vendor invents custom UUIDs.
  • Security depends on the implementation: the legacy "Just Works" pairing doesn't authenticate; you have to use LE Secure Connections.

Primary sources

Frequently asked questions

What is BLE and what is it for in IoT?+

BLE (Bluetooth Low Energy) is the low-power variant of Bluetooth. In IoT it's used for wearables, proximity sensors, beacons, medical devices, and configuring products from a phone, because every smartphone has it built in.

Are BLE and Bluetooth the same thing?+

Not exactly. They share a brand and a band (2.4 GHz), but BLE is a distinct protocol optimized for sending small amounts of data with minimal power. Bluetooth Classic is designed for continuous streaming like audio. A "Bluetooth 5" chip usually supports both.

What is GATT in BLE?+

GATT (Generic Attribute Profile) is BLE's data model. It organizes information into services that contain characteristics (values). A client can read, write, or subscribe to notifications of those characteristics.

What's the range of BLE?+

Between 10 and 100 meters, depending on the environment and power. BLE 5 added Coded PHY (LE Long Range), which reaches hundreds of meters in line of sight in exchange for lower speed. It's still a proximity protocol, not a kilometer-range one.

Is BLE Mesh good for home automation?+

Yes — BLE Mesh enables multi-node networks and is used in commercial lighting. But for fixed home automation, the Zigbee and Thread ecosystem is still more mature. BLE Mesh's advantage is interaction with smartphones.

Is BLE secure?+

BLE supports AES-128 encryption and LE Secure Connections pairing with ECDH, which protects against eavesdropping. The risk lies in implementations that use the "Just Works" method without authentication. Real security depends on how the manufacturer configures pairing.

Compatible devices

  • Almost every modern MCU: ESP32, nRF52, STM32WB, Apollo3

Related hardware

Companies

Solutions using this

Related articles