BLUETOOTH MODULES
Americas: +1-800-492-2320 Option 3 1 Laird Technologies
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
www.lairdtech.com/bluetooth
BLUETOOTH LATENCY AND DATA
Application Note v1.0
1 INTRODUCTION
This document describes and presents the results from a series of tests to determine overall Bluetooth data
throughput, given inherent latencies present in a packet-based protocol such as Bluetooth.
This transfer protocol results in a lot of data in one direction and minimal data in the reverse direction. One device
sends a single byte acknowledgement, and the other takes this acknowledgement as a cue to send a large packet.
One protocol which behaves in this fashion is Xmodem.
This document describes the creation of a test procedure, which uses an application on a Windows PC to measure
the latencies and throughput, and makes suggestion as to how the overall data throughput can be increased.
2 TEST SETUP
The test setup consists of a sufficiently fast Windows PC (>2Ghz processor) with two serial ports capable of rates up
to 460800 baud, two Laird Bluetooth Intelligent serial modules, and an application which transfers data between
the two serial ports and measures various time intervals using a very high resolution timer. This timer is accurate to
within microseconds.
The physical setup is as shown in Figure 1.
Figure 1: Latency Test Setup
The application sends an ‘X’ character out from serial port A and on receipt of that character at serial port B, sends a
packet (1029 bytes) out from serial port B which is subsequently received at serial port A.
The large packet consists of a string made up of the characters ‘0’ to ‘9’ and the ‘.’ character. In addition the packet
is delimited by a ‘*’ as the first character and ‘#’ as the last character. These special delimiting characters, plus the
‘X’ trigger character in the reverse direction allows the application to measure various time intervals.
These time measurements are collected into various histogram arrays, all rounded up to the nearest millisecond.
2.1 Normal Test vs. Optimized Test
In one set of tests (Normal), the time measurements/markers are as shown in Figure 2.
Bluetooth Latency and Data
Application Note
Americas: +1-800-492-2320 Option 2 2 Laird Technologies
Europe: +44-1628-858-940
Hong Kong: +852 2923 0610
www.lairdtech.com/bluetooth
Serial Port A (TX)
Serial Port A (RX)
Serial Port B (TX)
Serial Port B (RX)
0 T1 T2 T3
'X'
'X'
'*'
'*'
'#'
'#'
Figure 2: Timing - Normal Test
In the second set of tests (Optimised), the time measurement/markers are as below. When data transfer starts, many
trigger characters are sent to ensure that the data transfer direction is kept primed. For each packet received, fresh
acknowledgements are sent. This is shown in Figure 3.
Serial Port A (TX)
Serial Port A (RX)
Serial Port B (TX)
Serial Port B (RX)
Multiple 'X's
'#'
'*'
'X'
'X'
Multiple 'X's
'*'
'#'
'*' '*'
'#' '#'
0 T4
'X' 'X'
'X' 'X'
Figure 3: Timing - Optimised Test