How long a Bluetooth LE firmware update takes
Enter the image size and the link parameters your phone or gateway will use. The calculator gives throughput, transfer time and the total time including verify, swap and reboot.
Key characteristics
- Inputs
- Image size, payload, packets per event, interval, efficiency, swap time
- Outputs
- Throughput, transfer time, total time, 20-byte comparison
- Default example
- Fictional LW-1 probe updated from its gateway
- Runs
- In your browser with nothing sent
Calculator: How long a Bluetooth LE firmware update takes
Bluetooth LE moves data in short bursts. The device and a phone or gateway meet at a fixed connection interval, exchange a few packets and go quiet until the next meeting. How many bytes each packet carries, how many packets fit in each meeting and how often the meetings happen decide whether an update takes half a minute or several minutes. A customer holding a phone next to a device notices the difference, and so does the battery. This calculator estimates the time from those numbers.
How to use it
- Enter the size of the signed update image.
- Enter the payload per packet, the packets per connection event and the connection interval your link will actually use.
- Set the share of packets that carry image data and the time the device needs to verify, swap and reboot.
What each input means
| Input | What it means | Where to get a real number |
|---|---|---|
| Update image size | The signed image the device receives | Build output |
| Payload per packet | Image bytes carried in one link-layer packet | 244 if both sides support data length extension and agree an ATT MTU of 247; 20 otherwise |
| Packets per connection event | Data packets exchanged each time the two sides meet | A Bluetooth sniffer trace, or your stack’s logs, with the phones and gateways you support |
| Connection interval | Time between connection events | Requested by the device, decided by the phone or gateway; read it after connecting |
| Share of packets carrying image data | What is left after acknowledgements, retries and protocol messages | Time one real transfer and adjust until the calculator agrees |
| Verify, swap and reboot time | Time after the last byte: signature check, image swap, first boot | Time it on the board; swap time grows with image size |
Where 244 comes from: since Bluetooth 4.2, data length extension lets a link-layer packet carry up to 251 bytes of payload instead of 27. That leaves room for a 4-byte L2CAP header and an ATT packet of 247 bytes, and the ATT header takes 3 more, leaving 244 bytes of data. Without it, the default LE ATT MTU is 23 bytes, and a notification or write command carries at most the MTU minus 3: 20 bytes.
Reading the default example
Example (fictional). Loamwick’s gateway sends an LW-1 probe its 412 KB image with 244-byte payloads, 3 packets per connection event and a 30 ms connection interval, with 80% of packets carrying image data. Throughput is 19.1 KB/s and the transfer takes 21.6 seconds. With 15 seconds to verify, swap and reboot, the update takes 36.6 seconds. The same link with 20-byte payloads would manage 1.56 KB/s and need 4.4 minutes.
For Loamwick the difference counts twice. A gateway that updates its probes one at a time spends about 24 minutes on all 40 at 36.6 seconds each, or about three hours at the 20-byte rate. And every second the radio is on comes out of two AA cells that are meant to last years; see the battery life calculator.
How it calculates
Throughput is the payload per packet times the packets per connection event times the connection events per second, times the share of packets that carry image data. In the example: 244 bytes × 3 packets × 33.3 events a second × 0.8 = 19,520 bytes a second, or 19.1 KB/s. Transfer time is the image size divided by that rate, and the total adds the verify, swap and reboot time. The 20-byte line repeats the calculation with a 20-byte payload and everything else unchanged.
Limits
- The central decides. The device can ask for a connection interval and a data length, but the phone or gateway decides what it accepts, and phones differ by model and operating system version. Measure with the oldest phone you support.
- Packets per event is the least certain input. It depends on both stacks’ buffers, the PHY and radio conditions. The 20-byte comparison keeps it at 3, which a real link without data length extension may not match, so treat that line as an illustration.
- The PHY is folded in. Bluetooth 5 added the LE 2M PHY, which the Bluetooth SIG describes as optional in a stack. It shortens each packet so more can fit in an event; the calculator sees that only through the packets per event you enter.
- Intervals below 7.5 ms are rejected. That was the minimum before Bluetooth Core 6.2, which added Shorter Connection Intervals down to 375 µs. The calculator does not accept them.
- The update protocol has its own overhead. Zephyr’s device management uses the Simple Management Protocol (SMP) from MCUmgr, which runs over Bluetooth LE among other transports. Its framing and acknowledgements belong in the efficiency figure.
What to do next
Time one real update with your slowest supported phone and compare it with the estimate; the gap tells you what efficiency to enter. Our connectivity service covers Bluetooth LE connection parameters, phones and gateways, and over-the-air updates covers the bootloader, signing and the update protocol. If the same image also travels over cellular, the over-the-air data cost calculator prices it. There is more on radio links in the connectivity and power section of Field Update.
Send us your board and your plan.
A firmware review reads your schematics, code, flash layout and update plan, and ends with a written plan: what to build first, what could go wrong in the field and how updates will reach your devices.
Or email sales@fumbar.com, or call (720) 675-4202.