BLE physical layer – bluez programming

 

Chapter 7 — BLE Physical Layer
Part 1: Frequency Bands, TX/RX Flexibility, Output Power, Range & GFSK Introduction
Channels
40 × 2 MHz
Band
2.4 GHz ISM
Power
−20 to +10 dBm
Range
30 – 100 m
Keywords:

BLE physical layer BLE 40 RF channels BLE 2 MHz spacing BLE frequency hopping BLE TX only device BLE output power dBm BLE range 100m GFSK Bluetooth 2.4GHz ISM band BlueZ LE radio

7.1 — What the Physical Layer Does

The Physical Layer is the very bottom of the BLE protocol stack. It is the layer that actually touches the air — it converts digital bits into radio waves when sending, and converts received radio waves back into digital bits. Every other layer above it (Link Layer, L2CAP, ATT, GATT) depends on the Physical Layer to move bits from one device to another.

Understanding the Physical Layer is important because all the power-saving characteristics of BLE — the fast connection times, the mostly-off behaviour, the ultra-low energy consumption — are ultimately delivered by choices made at this layer. The number of channels, the channel spacing, the modulation scheme, and the output power all directly affect battery life, range, and interference behaviour.

Position in the BLE Stack

The Physical Layer Is the Foundation of Everything Above It

Every message that travels over BLE — whether it is a temperature reading from a sensor, a heart rate notification, or a connection setup handshake — ultimately gets turned into radio waves by the Physical Layer. The diagram below shows where it sits.

BLE Protocol Stack — Physical Layer Position
GATT Based Profiles
Generic Access Profile (GAP)
Generic Attribute Profile (GATT)
Attribute Protocol (ATT)
Security Manager (SM)
L2CAP
Host Controller Interface (HCI)
Link Layer
📻 Bluetooth Radio (Physical Layer) ← YOU ARE HERE

All instructions from the Link Layer above flow down to the Physical Layer, which executes them over the air. The Physical Layer has no knowledge of what the data means — it just moves bits reliably and efficiently.

7.2 — Frequency Bands

The 2.4 GHz ISM Band — Shared but Managed

BLE, like classic Bluetooth, operates in the 2.4 GHz ISM band. ISM stands for Industrial, Scientific, and Medical — a range of radio frequencies that international agreements have kept licence-free so anyone can use them without paying spectrum fees or applying for a government licence.

The downside of a free, globally-available band is that many technologies share it. In a typical home or office you will find: Wi-Fi (802.11 b/g/n), classic Bluetooth, BLE, ZigBee, baby monitors, cordless phones, wireless video senders, and microwave ovens (which leak 2.4 GHz radiation as a side effect of heating food). All of these can interfere with each other.

BLE handles this interference using frequency hopping — the radio continuously moves between different frequencies according to a predetermined pattern known to both communicating devices. Even if one frequency is corrupted by a nearby microwave oven, the next transmission is on a different frequency that is likely clear.

2.4 GHz ISM Band — Who Shares It
2400 MHz ←————————————— 2.4 GHz ISM Band ————————————→ 2483.5 MHz
BLE

40 ch × 2 MHz

Wi-Fi

Ch 1,6,11 overlap

BR/EDR

79 ch × 1 MHz

Microwave

broadband noise

40 Channels, 2 MHz Apart — The Formula

BLE divides the 2.4 GHz band into exactly 40 channels, each 2 MHz wide. They are numbered 0 to 39. The centre frequency of each channel is calculated with a simple formula:

f(k) = 2402 + k × 2 MHz
where k = 0, 1, 2, … 39
f(0) = 2402 MHz f(19) = 2440 MHz f(39) = 2480 MHz
BLE 40 RF Channels — 2402 MHz to 2480 MHz

37
0

38

39
█ Advertising Channels (37, 38, 39) █ Data Channels (0–36, mapped from RF)
2402 MHz (ch 0)2441 MHz (ch ~19)2480 MHz (ch 39)

Comparing BLE to classic BR/EDR: BR/EDR uses 79 channels with 1 MHz spacing while BLE uses 40 channels with 2 MHz spacing. The wider 2 MHz gap between BLE channels means each channel is more resilient to narrowband interference, since a noise source would need to be wider to affect the full channel.

7.3 — Transmitter Only, Receiver Only, or Both

BLE Breaks the Rule That Every Radio Needs Both TX and RX

In classic Bluetooth, every device must include both a transmitter and a receiver. This made sense for the original use cases — phones making calls, laptops transferring files — where data genuinely flows both ways. But many BLE sensor devices only ever need to send data in one direction.

BLE allows a device to implement only the half of the radio it actually needs. This is a hardware-level saving: a transmitter-only device does not contain the receiver circuitry at all, reducing chip size, manufacturing cost, and power draw.

BLE Radio Configuration Options
📡
TX Only
Transmits data.
Never receives.

Examples:
Smart weighing scale
TV remote control
Door sensor

Half the radio silicon
📻
RX Only
Receives data.
Never transmits.

Examples:
BLE display unit
Passive beacon listener

Half the radio silicon
📡📻
TX + RX
Full duplex.
Send and receive.

Examples:
Smartphone
Laptop
BLE hub/gateway

Full radio needed

Real-world example — TV remote control: A BLE TV remote sends button-press commands to the TV. The remote never needs to receive anything back from the TV — it just fires commands. This device can be built with transmitter circuitry only. No receiver. The result is a cheaper, simpler device that uses barely any battery power when idle.

This is in sharp contrast to classic Bluetooth, where building a transmitter-only device was not possible within the specification.

/* Checking BLE radio capabilities via BlueZ HCI */
/* LE Read Local Supported Features command reveals TX/RX capabilities */

#include <bluetooth/hci.h>
#include <bluetooth/hci_lib.h>

/* Send LE Read Local Supported Features */
/* OGF=0x08 (LE Controller), OCF=0x0003 */
void check_le_features(int hci_dev_id)
{
    int sock = hci_open_dev(hci_dev_id);
    uint8_t features[8];

    /* Feature bit 5 = LE 2M PHY support (BT 5.0+)    */
    /* Feature bit 6 = LE Coded PHY support (BT 5.0+)  */
    /* Feature bit 0 = LE Encryption                   */
    hci_le_read_local_supported_features(sock, features, 1000);

    /* Also check controller type from hciconfig output */
    /* "Type: LE" = LE only, "Type: BR/EDR" = classic  */
    /* hciconfig hci0 -a | grep Type                    */

    close(sock);
}

7.4 — Output Power

Dynamic Power Control — From −20 dBm to +10 dBm

The BLE specification defines the transmitter output power range as 0.01 mW (−20 dBm) at the minimum up to 10 mW (+10 dBm) at the maximum. This is not a fixed level — the device is allowed to change output power dynamically during operation.

Dynamic power control is a key power-saving technique. If the receiving device is very close (say, 1 metre away), there is no need to blast the signal at full power. The transmitter can step down to a lower power level, save energy, and reduce interference with nearby devices. Conversely, if communication starts degrading, the power can step up to recover the link.

BLE Output Power Range (dBm Scale)
−20 dBm
0.01 mW
← BLE allowed power range →
+10 dBm
10 mW
−20 dBm
0.01 mW
Very close range
Max power saving
0 dBm
1 mW
Typical indoor
~10m range
+4 dBm
2.5 mW
Medium range
~30–50m
+10 dBm
10 mW
Maximum range
up to 100m
/* Reading TX power level on a BLE connection via BlueZ HCI */
/* HCI command: Read Transmit Power Level */
/* OGF=0x03 (Host Controller & Baseband), OCF=0x002D */

#include <bluetooth/hci.h>
#include <bluetooth/hci_lib.h>

int read_tx_power(int sock, uint16_t handle)
{
    read_tx_power_level_rp rp;

    /* type: 0x00 = current power level, 0x01 = maximum */
    struct {
        uint16_t handle;
        uint8_t  type;
    } __attribute__((packed)) cp = { htobs(handle), 0x00 };

    if (hci_send_req(sock, OGF_HOST_CTL,
                     OCF_READ_TRANSMIT_POWER_LEVEL,
                     sizeof(cp), &cp,
                     sizeof(rp), &rp, 1000) < 0)
        return -1;

    /* rp.level is a signed int8 in dBm, range -30 to +20 */
    printf("Current TX power: %d dBm\n", rp.level);
    return rp.level;
}

7.5 — Range

30 m to 100 m — Why Range Varies

Based on the output power range defined above, BLE devices can cover distances from roughly 30 metres to 100 metres. This is not a fixed number because range depends on multiple real-world factors:

TX Power

Higher output power → greater range, but more battery used per transmission.

Environment

Walls, floors, people, and furniture all absorb and reflect 2.4 GHz radio waves. Outdoors, line-of-sight range is much greater than in a multi-room building.

Receiver Sensitivity

A more sensitive receiver can decode weaker signals. Better antenna design at either end extends effective range without increasing power.

Interference

A heavily congested 2.4 GHz environment (busy office with many Wi-Fi networks) reduces effective range compared to a quiet rural setting.

The 30–100 m range is more than enough for the vast majority of BLE use cases — a smartwatch on your wrist, a sensor on a factory floor, a beacon in a retail display. For longer ranges, Bluetooth 5.0 introduced coded PHY modes that extend range to 200–400 m at the cost of lower data rate.

7.6 — Modulation Characteristics (Introduction)

GFSK — Gaussian Frequency Shift Keying

BLE uses GFSK (Gaussian Frequency Shift Keying) to convert digital bits into radio waves. The key parameters are:

Parameter Value What It Means
Modulation scheme GFSK Frequency varies to represent 0s and 1s
Modulation index 0.45 – 0.55 Controls the frequency deviation per bit
BT product 0.5 ± 1% Bandwidth × bit period — controls spectral width
Bit rate 1 Mbps ± 1 ppm 1 million bits per second symbol rate
Binary 1 encoding Positive frequency deviation Frequency goes UP relative to carrier for bit = 1
Binary 0 encoding Negative frequency deviation Frequency goes DOWN relative to carrier for bit = 0

GFSK is covered in full detail in Part 2, which explains how modulation works from first principles — what a carrier signal is, why frequency modulation is more noise-resistant than amplitude modulation, and what the Gaussian filter adds to plain FSK.

Full GFSK explanation in Part 2 LE Timeline in Part 2 Chapter 7 Summary in Part 2

Chapter 7 Part 1 Complete

You understand the BLE physical layer’s position in the stack, the 40-channel frequency plan, TX/RX flexibility, output power control, range factors, and the GFSK basics. Part 2 explains GFSK modulation in depth and the LE timeline.

Part 2: GFSK Deep Dive & LE Timeline →

Leave a Reply

Your email address will not be published. Required fields are marked *