Section 18.2.19

Figure 11: BLE airtime, event capacity, and a goodput ceiling

Full name: Figure 11: Bluetooth Low Energy (BLE) airtime, event capacity, and a goodput ceiling.

Definition

Airtime is the time a transmission occupies the radio channel. In a Bluetooth Low Energy (BLE) §7.1 connection, data moves only in connection events, bursts of packet exchanges that start once per connection interval §7.7. Event capacity is the number of complete exchanges that fit in one event; an exchange is a data packet, the other device’s packet in turn, and the silent gap after each. A goodput ceiling is the long-run rate of useful bits with every event full: event capacity times useful bits per exchange, divided by the connection interval.

The idea

In its basic mode, a BLE radio sends one million bits per second, yet a long transfer of application data never reaches that rate. Every packet carries fields besides the data, the other device answers every packet, the radio stays silent for a fixed time between packets, and the connection is active only during its events. A common shortcut multiplies the bit rate by a guessed efficiency, such as 70%, which nobody can check.

The better method treats time as a budget. Every bit on the air costs a known number of microseconds, every gap costs a fixed time, and the events recur at a fixed interval. Add up the cost of one exchange, count how many whole exchanges fit in an event, and divide the useful bytes they carry by the interval. A ferry that may operate for 50 minutes of every hour and needs 15 minutes per round trip is a fair picture: it makes 3 round trips an hour, not 3.33, and the 5 minutes left over carry nobody. The picture stops in one respect. A BLE event also ends early when neither side has more to send, so the ceiling is reached only when the sender always has data waiting.

All configurations in this entry’s examples are invented for teaching.

How it works

The derivation has seven steps.

  1. Fix the configuration. The physical layer (PHY), the part that turns bits into radio signals, sets the time per bit. The LE 1M PHY (Low Energy, 1 megasymbol per second; a symbol is one unit of the radio signal, and here each symbol carries one bit) sends one bit per microsecond (μ\mus). Also fix the payload size pp in bytes of each Link Layer §7.6 data packet, whether the link is encrypted, which side sends the data, and the connection interval II.

  2. Airtime of a data packet. On LE 1M a packet has these fields, in order:

    • a 1-byte preamble, which lets the receiver lock on to the signal;

    • a 4-byte access address, which identifies the connection;

    • a 2-byte header;

    • the payload of pp bytes;

    • only in an encrypted packet with a nonempty payload, a 4-byte MIC (message integrity §1.9 check), which reveals tampering;

    • a 3-byte CRC §4.32 (cyclic redundancy check), a value that reveals corrupted bits.

    Without encryption the packet is 1+4+2+p+3=10+p1 + 4 + 2 + p + 3 = 10 + p bytes long, so its airtime is 8(10+p)8\,(10 + p) μ\mus.

  3. Airtime of the other packet. The two devices take turns, so every data packet is paired with a packet from the other device, which is empty when that device has no data to send: 10 bytes, so 80 μ\mus.

  4. Gaps. Consecutive packets of an event are separated by the inter frame space, 150 μ\mus by default.

  5. One exchange. The exchange time EE is the data packet, a gap, the empty packet and another gap.

  6. Event capacity. Let UU be the time per event that the model allows. The number of complete exchanges is m=⌊U/E⌋m = \lfloor U / E \rfloor, where ⌊x⌋\lfloor x \rfloor means xx rounded down to a whole number, because a part of an exchange delivers no packet.

  7. Useful bytes and the rate. Data sent as an ATT §7.9 (Attribute Protocol) notification, a message that pushes a value to the other device, loses 4 bytes of each payload to the header of L2CAP §7.15 (Logical Link Control and Adaptation Protocol), the layer that carries ATT messages over the Link Layer, and 3 bytes to the ATT header. It carries u=p−7u = p - 7 useful bytes, fewer if the application adds a header of its own. The reference rate is R=8mu/IR = 8\,m\,u / I bits per second, with II in seconds.

The Bluetooth specification requires each connection event to close at least 150 μ\mus, by default, before the next event begins. A model that lets an event use the whole interval, U=IU = I, and charges every exchange, the last one included, a trailing gap of 150 μ\mus respects that rule.

Worked example

Take LE 1M without encryption and the largest payload, p=251p = 251 bytes, which the Link Layer allows since version 4.2 of the Bluetooth specification.

Interval of 7.5 ms, whole interval usable. Here U=I=7500U = I = 7500 μ\mus, and m=⌊7500/2468⌋=3m = \lfloor 7500 / 2468 \rfloor = 3, because 3×2468=7404≤75003 \times 2468 = 7404 \le 7500 while 4×2468=9872>75004 \times 2468 = 9872 > 7500. The rate is R=8×3×2440.0075=58560.0075=780,800bits per second.R = \frac{8 \times 3 \times 244}{0.0075} = \frac{5856}{0.0075} = 780{,}800\ \text{bits per second}.

Interval of 11.25 ms. Here m=⌊11,250/2468⌋=4m = \lfloor 11{,}250 / 2468 \rfloor = 4, because a fifth exchange would end at 5×2468=12,3405 \times 2468 = 12{,}340 μ\mus. Four exchanges use 4×2468=98724 \times 2468 = 9872 μ\mus, so 11,250−9872=137811{,}250 - 9872 = 1378 μ\mus of every interval carry nothing. The rate is 8×4×244/0.01125=7808/0.01125≈694,0008 \times 4 \times 244 / 0.01125 = 7808 / 0.01125 \approx 694{,}000 bits per second. The longer interval gives the lower rate because of its leftover time.

The airtime limit. Without any leftover time, one exchange every 2468 μ\mus gives 8×244/0.002468=1952/0.002468≈790,9008 \times 244 / 0.002468 = 1952 / 0.002468 \approx 790{,}900 bits per second. No interval does better in this configuration. Short packets. With the 27-byte payload limit of earlier versions, a data packet takes 8×(10+27)=2968 \times (10 + 27) = 296 μ\mus, an exchange takes 296+150+80+150=676296 + 150 + 80 + 150 = 676 μ\mus and carries 27−7=2027 - 7 = 20 useful bytes, so the airtime limit is 8×20/0.000676≈236,7008 \times 20 / 0.000676 \approx 236{,}700 bits per second.

Stated precisely

Let τ\tau be the time per bit (1 μ\mus on LE 1M), oo the number of bytes of a packet outside its payload (10 on LE 1M without encryption), pp the payload bytes of each data packet, gg the inter frame space, UU the usable time per event, II the connection interval and uu the useful bytes per data packet. Then E=8(o+p)τ+g+8oτ+g,m=⌊U/E⌋,R=8muI,Rair=8uE.\begin{aligned} E &= 8\,(o + p)\,\tau + g + 8\,o\,\tau + g, \\ m &= \lfloor U / E \rfloor, \\ R &= \frac{8\,m\,u}{I}, \qquad R_{\mathrm{air}} = \frac{8\,u}{E}. \end{aligned} With encryption, add 4 bytes to the data packet only, since an empty packet carries no MIC. Because mE≤Um E \le U and the usable time cannot exceed the interval, U≤IU \le I, it follows that R≤RairR \le R_{\mathrm{air}}: no choice of interval exceeds the airtime limit RairR_{\mathrm{air}}.

RR is the long-run rate of useful bytes in one direction only if five assumptions hold.

  1. Saturation. The sender always has data queued. An event continues only while a side signals, with a more-data bit in each packet, that it has more to send.

  2. No losses. Every packet passes its CRC check the first time. A packet that fails is sent again and costs a whole exchange.

  3. The stated budget. The BLE Controller §7.4, the part of the device that runs the radio, fills each event up to UU.

  4. One-way data. The other side sends only empty packets.

  5. Fixed sizes. Every data packet carries pp payload bytes, of which uu are useful.

If all five hold, RR is a ceiling for this configuration. It is a reference computed from a model, not a measured value.

Limits and common mistakes

The reference is conditional. A real controller may close an event before UU is used up, to serve another connection, to advertise or scan, or because it limits the number of packets per event; mm is then smaller. The BLE Host, the upper part of the software that runs the protocols and the application, may not supply data fast enough. Each of these lowers the measured goodput §7.39 below RR without any fault in the radio.

Change any parameter and recompute. Encryption adds 4 bytes to each data packet: with p=251p = 251, EE becomes 2500 μ\mus. The LE 2M PHY sends 2 bits per microsecond and uses a 2-byte preamble. The LE Coded PHY, which trades rate for range, sends 500 or 125 kilobits per second. Recent versions of the specification let the two devices negotiate an inter frame space other than 150 μ\mus. Data in both directions changes the exchange, because the other device’s packet then carries data too.

A long-run ceiling does not bound every finite window. A window from the first to the last frame of one event sees an exchange every 2468 μ\mus and none of the leftover time. At an interval of 11.25 ms it therefore measures about 790,900 bits per second, although the long-run rate is about 694,000. Compare a long-run reference only with a window that covers many whole intervals; the finite-window rate §11.41 entry explains such edge effects.

A long-run goodput close to RR leaves little headroom under this configuration. A lower rate alone does not identify the limiting step: retransmissions §7.36 can consume radio time, or software may leave usable airtime idle. Counts of transmissions and retries or a controlled change of the radio or processing budget can distinguish these cases.

The central, the device that set up the connection, chooses the connection interval and may choose a value other than the one an application requested. Compute RR with the interval that the connection actually uses.

Questions answered

Derive a payload-rate reference.

A payload-rate reference for a Bluetooth Low Energy (BLE) connection is the rate R=8mu/IR = 8\,m\,u / I bits per second, derived by budgeting airtime: II is the connection interval in seconds, mm is the number of complete packet exchanges that fit in one connection event, and uu is the number of useful bytes each exchange delivers. The derivation for the LE 1M PHY (Low Energy, 1 megasymbol per second, physical layer), without encryption, has five steps.

  1. Data packet. One bit takes 1 microsecond (μ\mus), and a packet has 10 bytes besides its payload, so a 251-byte payload takes 8×(10+251)=20888 \times (10 + 251) = 2088 μ\mus.

  2. Exchange. Add the packet the other device sends in turn, empty and 80 μ\mus long, and two gaps of 150 μ\mus: E=2088+150+80+150=2468E = 2088 + 150 + 80 + 150 = 2468 μ\mus.

  3. Event capacity. Count whole exchanges in the usable part of the event. With the whole 7.5 ms interval usable, m=⌊7500/2468⌋=3m = \lfloor 7500 / 2468 \rfloor = 3, the largest whole number of exchanges that fit.

  4. Useful bytes. The L2CAP (Logical Link Control and Adaptation Protocol) header takes 4 bytes and the header of an ATT (Attribute Protocol) notification 3 bytes, leaving u=251−7=244u = 251 - 7 = 244 bytes.

  5. Rate. R=8×3×244/0.0075=780,800R = 8 \times 3 \times 244 / 0.0075 = 780{,}800 bits per second.

The result is a reference for this configuration, not a universal ceiling. It assumes that the sender always has data waiting, that no packet is lost and that the controller fills each event. Retransmissions, shorter events, encryption or another physical layer change it, and a short measurement window can exceed it.

Related entries: Finite-window rate (§11.41), Computational versus communication bottleneck (§14.37), Connection interval (§7.7), Link Layer (§7.6), MTU and fragmentation (§7.14), Throughput versus goodput (§7.39), Retransmission and duplicate delivery (§7.36), Figure 11: useful goodput and the first-frame correction (§18.2.18), Figure 11: bottleneck masking and a ceiling effect (§18.2.20), BLE connection-interval quantization (§18.5.4). Further reading: [93].