BLE MTU and throughput: why your transfers are slow and what to change
How MTU, Data Length Extension, 2M PHY, connection interval and write type decide BLE throughput on Android and iOS, and what to change first.
BLE throughput depends on six settings working together: write type, link-layer packet size (Data Length Extension), ATT MTU, PHY, connection interval and how many packets the phone fits into each connection event. The biggest gains usually come from writing without response with flow control, enabling DLE with an MTU of 247, and using 2M PHY during transfers.
Key takeaways
- MTU alone doesn't make transfers fast; without DLE a big MTU is split into 27-byte link-layer packets.
- MTU 247 + DLE 251 means one ATT packet fills one link-layer packet exactly.
- Writes with response wait a round trip each; writes without response can fill a connection event.
- Phones cap packets per connection event, and iOS has its own interval rules: test on both.
- Speed up only during transfers: short interval and 2M PHY, then back to battery-friendly settings.
“Our firmware update takes ten minutes” almost always has a fix that doesn't touch the radio hardware. BLE can move well over 100 KB/s between a recent phone and a BLE 5 chip. Most apps I see get a tenth of that, because one or two settings cap everything else.
Where do the bytes go?
Your data passes through three layers, each with its own size limit:
| Layer | Default | Raised to | Who sets it |
|---|---|---|---|
| ATT MTU | 23 bytes (20 of data) | up to 517 | Negotiated: requestMtu() on Android, automatic on iOS |
| L2CAP | + 4-byte header per ATT packet | – | Fixed |
| Link-layer payload | 27 bytes | 251 with Data Length Extension (BLE 4.2+) | Controllers negotiate it; the firmware enables it |
An ATT packet of MTU bytes plus the 4-byte L2CAP header is split into link-layer packets. With DLE off, a 247-byte MTU becomes ten 27-byte packets, each with its own headers, gaps and acknowledgement. With DLE on, 247 + 4 = 251 fits in exactly one. That's why 247 is the sweet spot for MTU on most devices.
Connection interval and packets per event
During a connection, the phone and the device meet every connection interval (7.5 ms to 4 s) and exchange packets until the event ends. Throughput is roughly: packets per event × useful bytes per packet ÷ interval. Two limits to know:
- Phones cap packets per event. It depends on the chipset and stack, not on your code, and varies a lot between models. This is the number to measure on real phones.
- Android lets you ask, not set.
requestConnectionPriority(CONNECTION_PRIORITY_HIGH)asks for a short interval (around 11.25–15 ms); the device can also request parameters. On iOS, Apple's accessory guidelines expect intervals of at least 15 ms in steps of 15 ms, and iOS renegotiates values outside its rules.
Write with or without response
A write request waits for the device's response before the next one, which costs about one connection interval per write at best. A write command (without response) doesn't wait, so several can go in one connection event. For bulk data that's the biggest single change. Two rules:
- Wait for
onCharacteristicWritebefore the next write without response on Android; it's the stack telling you there's room (see the operation queue). On iOS, checkcanSendWriteWithoutResponseand wait forperipheralIsReady(toSendWriteWithoutResponse:). - Without responses, reliability moves into your protocol: sequence numbers or offsets, and a checksum at the end. OTA protocols do exactly this.
Calculate what you should be getting
Try your device's settings. Change one value at a time to see which one holds you back:
Tool
BLE throughput calculatorA best-case estimate from the radio timing: real numbers are lower, and the phone decides how many packets fit in each connection event. Use it to spot settings that cap you far below what the link allows.
Setting it up on Android
@SuppressLint("MissingPermission")
suspend fun prepareForTransfer(gatt: BluetoothGatt) {
// One queued operation each (see GattQueue). Order matters: MTU first.
val mtu = queue.run("mtu", { gatt.requestMtu(247) }) { it.value!!.toInt() } // value from onMtuChanged
if (Build.VERSION.SDK_INT >= 26) {
queue.run("phy", { gatt.setPreferredPhy(BluetoothDevice.PHY_LE_2M_MASK, BluetoothDevice.PHY_LE_2M_MASK,
BluetoothDevice.PHY_OPTION_NO_PREFERRED); true }) { } // completes in onPhyUpdate
}
gatt.requestConnectionPriority(BluetoothGatt.CONNECTION_PRIORITY_HIGH) // no callback; ask, not set
chunkSize = mtu - 3 // bytes of data per write
}
// After the transfer: back to a battery-friendly interval
gatt.requestConnectionPriority(BluetoothGatt.CONNECTION_PRIORITY_BALANCED)Use the MTU the stack reports in onMtuChanged, not the one you asked for. Newer Android versions changed how MTU is negotiated and tend to ask for the largest value, so test devices that can't handle large MTUs on recent phones. DLE has no app API on Android: it's negotiated between the controllers when the device supports it.
On iOS
iOS negotiates MTU itself. Read peripheral.maximumWriteValueLength(for: .withoutResponse) after connecting and size your chunks from it. You can't request a PHY or a connection priority from the app; the device can request parameters, within Apple's rules. That's one more reason the device's own connection-parameter requests matter: they're the only lever on iOS.
Add a before/after from a real project: e.g. "a 400 KB firmware image went from X minutes to Y seconds after switching to write without response and MTU 247".
FAQ
What is the maximum BLE MTU on Android?
517 bytes. After the 3-byte header that leaves room for 514, but an attribute value can be at most 512 bytes, so 512 is the most you can send in one write or notification. Ask with requestMtu() and use the value Android reports in onMtuChanged, which depends on what the device supports.
Does a bigger MTU always make BLE faster?
No. Without Data Length Extension, a large ATT packet is split into 27-byte link-layer packets, so the gain is small. The big jump comes from DLE plus write without response; MTU 247 then fills each link-layer packet exactly.
How fast can BLE transfer data?
With 2M PHY, DLE and write without response, a recent phone and BLE 5 device can reach well over 100 KB/s in good conditions. Real numbers depend on how many packets the phone fits per connection event, which varies by model.
Can I set the connection interval from the app?
On Android you can only request a priority with requestConnectionPriority(); the device can request parameters too. On iOS the app can't set it at all, and iOS applies its own rules, so the device's parameter requests matter most.