TEJVONTechnologies Pvt. Ltd.
Back to Insights
BLE · Android 2 min readMay 2026

Why every BLE app needs a write queue

Android's BLE stack handles one operation at a time and does not queue the rest for you. Most flaky BLE bugs start there.

T

Surendra — Tejvon

Senior Android & BLE Engineer

Android's Bluetooth stack processes one GATT operation at a time. If you start a second write before the first one has been acknowledged, the second is not queued. It is rejected or silently lost.

This is behind a large share of BLE bugs that seem random. Two parts of the app write at nearly the same moment, one of them disappears, and the device ends up in a state nobody can reproduce on demand.

The fix is structural, not a retry. In the BLE serial stack we built in Kotlin, every write goes through a single queue. An operation is sent, the queue waits for the stack's callback, and only then does the next one go out. Reads, writes and notification setup all share that one line.

Once the queue exists, other things become simple. Fragmented payloads are just many entries in the queue. Timeouts are handled in one place. Logging the queue gives you an exact record of what was sent and in what order, which is the first thing you want when a device misbehaves in the field.

If a BLE app works on your desk and fails occasionally for users, check whether writes are serialised before looking anywhere else.

Topics

BLEAndroid

Working on a similar challenge?

Let's discuss the architecture before you build.

BLE system design, OTA reliability, and connected product engineering — this is what TEJVON does every day.

Book a Technical Consultation