Alex MitrovicBLE & IoT app developer, Android and iOS

Reference

BLE glossary for app developers

35 Bluetooth Low Energy terms in one or two sentences each, from the app's point of view. Each links to where it matters in practice.

A

Advertising

How a BLE peripheral announces itself: small packets broadcast on three channels at a set interval, carrying its name, service UUIDs or manufacturer data. Phones find devices by scanning for them.

Background scanning

ATT Attribute Protocol

The protocol under GATT that reads, writes and notifies attributes identified by 16-bit handles. ATT errors are the statuses you see in Android operation callbacks.

Status code lookup

ATT MTU MTU

The largest ATT packet the two sides agree to use. The default is 23 bytes (20 bytes of data); it can be raised to 517. On Android the app calls requestMtu(); on iOS the system negotiates it.

MTU and throughput

autoConnect

A parameter of Android's connectGatt(). false connects now and gives up after about 30 seconds; true waits in the background, without a timeout, for a known device to come back.

GATT 133

B

BluetoothGatt

Android's object for one GATT client connection. Every connectGatt() creates one; it must be closed with close(), or the phone runs out of client slots and connections fail with 133.

GATT 133

Bonding

Pairing plus storing the keys, so the phone and the device can encrypt future connections without pairing again. A stale bond is one side still holding keys the other side forgot.

Bonding problems

C

CCCD Client Characteristic Configuration Descriptor, 0x2902

The descriptor a client writes to turn notifications or indications on for a characteristic. On Android, setCharacteristicNotification() alone isn't enough: you also write this descriptor.

The GATT operation queue

Central and peripheral

The two BLE roles. The central (usually the phone) scans and starts connections; the peripheral (the device) advertises and accepts them. Separately, a GATT client reads and writes a GATT server.

Characteristic

A value on the device that the app can read, write or subscribe to, inside a service, identified by a UUID and described by its properties (read, write, write without response, notify, indicate).

CompanionDeviceManager CDM

An Android API for associating an app with a specific device through a system dialog. It can find the device without location permission and grants background exemptions to the associated app.

Background scanning

Connection interval

How often the central and peripheral meet to exchange packets during a connection, from 7.5 ms to 4 s in 1.25 ms steps. Shorter means faster and lower latency, but more power.

Throughput calculator

CoreBluetooth

Apple's Bluetooth Low Energy framework for iOS and macOS: CBCentralManager to scan and connect, CBPeripheral to talk to a device.

State restoration

D

Data Length Extension DLE

A BLE 4.2 feature that raises the link-layer payload from 27 to 251 bytes per packet, which cuts overhead and is one of the biggest throughput gains.

MTU and throughput

DFU Device Firmware Update

Updating a device's firmware, often through a bootloader that the device restarts into. Nordic's Secure DFU and MCUboot's SMP-based updates are common over BLE.

Why OTA fails

G

GAP Generic Access Profile

The part of BLE that covers advertising, scanning, connecting and roles: how devices find each other and connect, before GATT is used.

GATT Generic Attribute Profile

How data is organized and exchanged over a BLE connection: services that contain characteristics that contain descriptors, read and written by a client on a server.

Android BLE guide

GATT operation queue

A queue in the app that sends one GATT operation at a time and waits for its callback before the next. Android needs one, because a second operation while one is pending fails.

The GATT operation queue

H

HCI snoop log btsnoop

A log of every packet between Android's Bluetooth stack and the controller, turned on in Developer options and read in Wireshark. The most useful tool for BLE bugs.

Testing on real phones

I

Indication

Like a notification, but the client must acknowledge each one before the next is sent. Slower, but delivery is confirmed at the ATT level.

L

L2CAP

The layer between ATT and the link layer. It adds a 4-byte header to every ATT packet, which is why an MTU of 247 fills a 251-byte link-layer packet exactly. L2CAP CoC channels can also stream data directly.

LE Secure Connections

The pairing method introduced in Bluetooth 4.2, based on elliptic-curve key exchange. It replaces LE Legacy Pairing, which is easier to attack.

M

MCUboot

An open-source secure bootloader used with Zephyr and the nRF Connect SDK. It verifies images and can test a new image and revert unless the app confirms it, which makes updates safe to interrupt.

OTA updates

mDNS / NSD Bonjour

Discovering devices on the local network by name or service type, without knowing their IP addresses. Android calls it Network Service Discovery; Apple calls it Bonjour.

MQTT

A lightweight publish/subscribe protocol used by many IoT devices to talk to the cloud through a broker. Apps use it to control devices and get their state away from home.

BLE vs Wi-Fi vs MQTT

N

Notification

A value the device pushes to the app without being asked, after the app enables it through the CCCD. Not acknowledged, so it's fast; the app must keep up.

The GATT operation queue

O

OTA Over-the-air update

Updating firmware without a cable, for BLE devices usually from the phone app. A reliable OTA flow resumes after a drop and lets the device verify the image before using it.

OTA updates

P

Pairing

Exchanging keys so a connection can be encrypted. With bonding, the keys are stored; without it, the devices pair again every time.

PHY 1M, 2M, Coded

The radio mode: 1M (1 Mbit/s, every BLE device), 2M (2 Mbit/s, BLE 5, faster) and Coded (125 or 500 kbit/s, BLE 5, longer range).

Throughput calculator

Provisioning Wi-Fi provisioning

Getting a device onto the user's Wi-Fi network, usually by sending the network name and password from the app over BLE or through a temporary access point on the device (SoftAP).

Wi-Fi provisioning over BLE

R

RSSI Received Signal Strength Indicator

How strong the device's signal is at the phone, in dBm (closer to 0 is stronger). Useful as a rough range check; too noisy to measure distance precisely.

S

Service

A group of related characteristics on a GATT server, identified by a UUID, such as Battery Service (0x180F) or a vendor's own 128-bit service.

State restoration

An iOS feature that relaunches a terminated app in the background when a BLE event concerns it, and hands back its CBCentralManager state so connections and scans continue.

CoreBluetooth state restoration

Supervision timeout

How long a connection may go without a successful packet before both sides consider it lost. When it expires, Android reports status 8.

Connection drops

T

TRANSPORT_LE

The transport argument to Android's connectGatt(). Passing BluetoothDevice.TRANSPORT_LE forces a BLE connection, so dual-mode devices aren't reached over classic Bluetooth by mistake.

GATT 133

W

Write with / without response

A write request waits for the device's acknowledgement; a write command (without response) doesn't, so many can be sent per connection event. The second is much faster and needs flow control.

MTU and throughput

Device works, app doesn't?

Tell me about your device and what's breaking. No pitch deck needed. I'll tell you what I'd look at first, even if it isn't hiring me.

Book a free call

Free · NDA on request · reply within 1–2 working days