Bluetooth Low Energy is a common transport for EEG headsets, but a version number does not establish usable application throughput. The complete path includes sensor framing, peripheral buffers, connection parameters, phone controller and host behavior, application scheduling, and storage. A sequence gap can invalidate analysis unless the protocol detects it and the study defines how to handle it.
This guide focuses on something more defensible than a "zero-drop" promise: measured headroom, detectable sequence discontinuities, timing reconstruction through delivery bursts, and enough evidence to judge whether a session is usable.
Understanding the Throughput Requirement
Before tuning, calculate how many bytes per second the device produces. An 8-channel stream sampled at 250 Hz with 24-bit values generates 6,000 bytes per second of raw sample data. Add the actual protocol's framing, timestamps, sequence fields, checksums, and auxiliary channels, then measure the resulting rate with recovery headroom on the target link.
At 32 channels and 500 Hz with 24-bit samples, raw sample content is 48,000 bytes per second before framing and auxiliary data. Whether BLE has enough margin must be proved on the actual radios, firmware, packet format, and supported phones.
Use the negotiated ATT MTU
An ATT MTU of 23 bytes leaves up to 20 bytes for one notification value. Carrying 6,000 raw bytes per second at that size would require at least 300 notifications per second before protocol framing. That is an inefficient baseline whose behavior must be measured, not assumed to fail or succeed from arithmetic alone.
Request an ATT MTU your protocol can use, then size values from the negotiated result. Do not assume the requested size was accepted. As documented in the Android 14 behavior changes, the first GATT client MTU request on an ACL connection requests 517 and later requests on that connection are ignored. The negotiated minimum and callback result remain the source of truth.
There are two critical details that many developers miss:
- Define setup as a state machine. If streaming depends on a larger MTU, do not enter the streaming state until the MTU request completes successfully or the protocol selects a supported fallback.
- Communicate the usable value length to the peripheral through the protocol or derive it in firmware from the active ATT bearer. Oversized writes or notifications can fail or be truncated depending on the operation and stack; they should not become silent application framing errors.
Connection Interval Tuning
The connection interval influences how often the central and peripheral can exchange data, but it does not determine application throughput by itself. Inspect the negotiated parameters and measure delivered bytes, batching, retransmissions, and buffer occupancy during a full recording. Do not infer capacity from a nominal interval alone.
On Android, request CONNECTION_PRIORITY_HIGH for the recording phase and return to balanced policy when it ends. Treat that as a hint. Coordinate compatible preferences in firmware and measure what the link actually delivers.
The actual result depends on the central, peripheral, controller, other connections, and system policy. Adapt buffering from measured queue pressure and sequence gaps. Only warn the user when the product has an actionable recovery step.
Measuring the Actual Connection Interval
You cannot read the active connection interval directly from the public Android GATT API. Notification arrival deltas can reveal batching or degraded delivery, but they are not the connection interval because multiple packets may share an event and callbacks add scheduling jitter. Use HCI or air traces for link timing; use application telemetry for effective stream health.
Buffering Strategies on the Peripheral
Design for bursts in which the BLE link drains data more slowly than acquisition produces it. Firmware needs a bounded buffer and an explicit overflow or backpressure policy tied to the product's allowable interruption.
A common firmware design separates acquisition from transport with a bounded ring buffer. When the transport cannot keep up, preserve sequence and clock continuity and emit an explicit overflow record. The buffer size and overflow policy come from the allowed interruption and memory budget, not a universal packet count.
Do not block time-critical acquisition on BLE transport. Which samples may be discarded, if any, is a product and study-protocol decision. The engineering goal is to bound detectable loss, timestamp it, and avoid presenting a known gap as contiguous data.
Android-Side Receive Pipeline
Keep onCharacteristicChanged bounded: copy or hand off the callback value promptly, then parse, validate, persist, and render on owned execution contexts. Do not rely on one undocumented callback-thread identity across Android versions.
A receive path should separate callback ownership from parsing and persistence:
- Copy or transfer ownership of the callback value promptly and enqueue it into a bounded channel.
- On an owned execution context, validate framing and sequence, reconstruct complete records, and append them to durable session storage.
- Feed display state from a deliberately decimated view of the stream; UI cadence is independent from acquisition cadence.
Measure allocation and queue pressure in the receive path. A bounded buffer pool can reduce churn, but it also needs an explicit exhaustion policy and tests that prove buffers are not reused while still owned by downstream work.
Dealing with Android Fragmentation
Android behavior varies across phone models and OS builds. Turn that variation into a device matrix instead of a list of vendor folklore:
- Capture payload rate and sequence gaps with Wi-Fi active, the screen off, and the app backgrounded.
- Test one and multiple connected peripherals, battery-saving states, and realistic body placement.
- Use the negotiated MTU rather than inferring support from chipset or price tier.
- Use wake locks only for a measured, bounded need and release them on every terminal path.
Sequence Numbers and Error Recovery
Continuous acquisition protocols should include a sequence number, sample counter, or equivalent continuity field with documented wrap and reset behavior. On mobile, check progression and record the missing range and timing context. Do not interpolate lost physiological samples unless the scientific protocol explicitly defines and labels that transformation.
When timing matters, include a peripheral sample counter or timestamp often enough to reconstruct the capture timeline through batching, wrap, and loss. Choose its width and cadence from the longest session and required accuracy.
Testing Under Realistic Conditions
A close-range quiet-RF test is only a baseline. Add controlled attenuation and interference, realistic body placement, screen and lifecycle changes, multiple connections where supported, and the intended deployment environment. BLE and 2.4 GHz Wi-Fi coexistence belongs in the test matrix, but traces are still required before assigning a field gap to interference.
Define acceptance criteria before testing: session duration, supported phone and firmware matrix, RF stress, allowed gap count and length, reconnect behavior, buffer high-water mark, battery use, and what makes a recording invalid. Report per-session distributions rather than one aggregate loss percentage.
If an EEG stream drops samples or hides gaps, send DEVSFLOW / Connected Neurotechnology the data rate, packet format, sequence trace, and supported devices. We can review the path from firmware buffer to persisted session file.