Bluetooth LE
The testo 330 and testo 320 offer the measurement export over Bluetooth Low Energy. Your app reads the same JSON as in the QR code, without scanning and without a size limit.
- Roles: the instrument is the BLE peripheral / GATT server; your app is the central / GATT client.
- Payload: gzip-compressed JSON in the testo JSON format (schema and version in
$schema), one measurement per line (JSON Lines). Field description: QR code › Data format. - Security: from instrument software version 34.0 your device must be paired with the instrument (LE Secure Connections with numeric comparison: protected against man-in-the-middle attacks, encrypted link). From 2027 your app must in addition be authorised through the testo Cloud, see below.
From 2027: your app must be authorised through the testo Cloud
From 2027 the instrument releases measurement data over Bluetooth only to apps that have authenticated with the testo Cloud and received an authorisation for this instrument. Pairing alone will no longer be enough. Plan for this now:
- Your app will have to be registered with testo and connect to the testo Cloud to obtain the authorisation.
- Keep connecting, pairing, authorising and reading as separate steps in your code, so the authorisation step can be added without rewriting the transfer.
The procedure (registration, sign-in, how often an internet connection is needed) is not yet published. It will be described on this page well in advance.
sequenceDiagram
participant C as Your app
participant D as testo 330
C->>D: Scan for name T330_ / T320_ and connect
D-->>C: Pairing: same 6-digit number on both screens, confirm on both (once)
C->>D: Read EC01 -> {ready, size, crc}
loop until size bytes collected
C->>D: Write EC01 = uint32 LE offset
C->>D: Read EC02 -> next chunk
end
C->>C: Check CRC-32, gunzip, split lines, parse JSON
1. Provide a measurement on the instrument
The instrument holds one export at a time. A new export replaces the previous one. An export is provided when
- the technician saves a measurement and the QR code is shown, or
- the technician chooses Export › Third-party app for one or more measurements (use this for measurements too large for a QR code).
2. Connect and pair
Scan for a device whose name starts with T330_ or T320_, followed by the serial number.
Do not rely on a service UUID in the advertisement.
From instrument software version 34.0 the export characteristics require an authenticated, encrypted link. The first read answers Insufficient Authentication, and the operating system starts pairing:
- Phone/PC and instrument show the same six-digit number.
- The user confirms on both.
- The bond is stored; later connections are encrypted without asking again.
Comparing the number protects the pairing against man-in-the-middle attacks. Pairing without this confirmation (Just Works) is not accepted.
| Platform | Pairing |
|---|---|
| Android, iOS, Windows, macOS | the system shows the pairing dialog automatically on the first protected read |
| Linux (BlueZ) | a pairing agent must be running, e.g. pair once with bluetoothctl (agent DisplayYesNo, pair <address>) |
Lost bond
If the instrument was reset or the bond was removed on one side, reading fails again with an authentication error. Remove the instrument in the Bluetooth settings of your device and pair again.
The standard Device Information Service (0x180A) can be read without pairing.
3. GATT layout
Testo service FC7B
Service UUID 0000fc7b-0000-1000-8000-00805f9b34fb. The export characteristics use 128-bit UUIDs on the base
0000XXXX-c0d1-4e9e-aa76-bb27f81eb485.
| Characteristic | UUID | Properties | Purpose |
|---|---|---|---|
| Export Control (EC01) | 0000ec01-c0d1-4e9e-aa76-bb27f81eb485 |
read / write / notify, encrypted + authenticated | Read: status JSON {ready, size, crc}. Write: uint32 LE offset of the next chunk. Notify: a new export is available. |
| Export Payload (EC02) | 0000ec02-c0d1-4e9e-aa76-bb27f81eb485 |
read, encrypted + authenticated | One chunk of the gzip payload, starting at the offset last written to EC01. |
The service contains further characteristics used by testo Smart. Ignore them.
Device Information Service 0x180A
| Field | UUID | Example |
|---|---|---|
| Manufacturer Name | 0x2A29 |
Testo |
| Model Number | 0x2A24 |
material / model number |
| Serial Number | 0x2A25 |
instrument serial number |
| Software Revision | 0x2A28 |
software version |
| Firmware Revision | 0x2A26 |
firmware version (optional) |
4. Read the export
Step 1: status
Read EC01. It returns UTF-8 JSON:
{ "ready": true, "size": 1912, "crc": 3426087878 }
| Key | Type | Meaning |
|---|---|---|
ready |
bool | true when an export is available |
size |
number | length of the compressed payload in bytes |
crc |
number | CRC-32 (IEEE, as zlib.crc32) over the compressed bytes |
Subscribe to EC01 notifications to learn when a new export is available.
Step 2: chunks
offset = 0
while offset < size:
write EC01 = uint32_le(offset) # where the next chunk starts
chunk = read EC02 # up to min(ATT_MTU - 3, 500) bytes, at least 20
append chunk
offset += len(chunk)
A GATT read is limited to 512 bytes, so the payload is read in chunks with an offset you control. This works on every GATT stack with plain read and write. Request a large MTU (e.g. 517) to need fewer round trips.
Step 3: verify and parse
crc32(buffer) == crc, otherwise discard and read again.gunzip(buffer)→ UTF-8 text.- Split into lines; each line is one JSON document (one measurement).
The content is the same as the QR code of the testo 330, not the testo 300 format. If you support the testo 300 today, see Migrating from testo 300.
5. Python example
With bleak (Windows, macOS, Linux). Pair the instrument once as described
in section 2, then:
#!/usr/bin/env python3
"""Read the measurement export of a testo 330 / 320 over Bluetooth LE.
pip install bleak
python3 read_export_ble.py --scan # find instruments
python3 read_export_ble.py <ADDRESS> # read the export (instrument must be paired)
"""
import argparse
import asyncio
import gzip
import json
import struct
import zlib
from bleak import BleakClient, BleakScanner
from bleak.exc import BleakError
EC01 = "0000ec01-c0d1-4e9e-aa76-bb27f81eb485" # export control / status
EC02 = "0000ec02-c0d1-4e9e-aa76-bb27f81eb485" # export payload
PREFIXES = ("T330_", "T320_")
async def scan(timeout: float = 8.0) -> None:
found = await BleakScanner.discover(timeout=timeout, return_adv=True)
for dev, adv in found.values():
name = adv.local_name or dev.name or ""
if name.startswith(PREFIXES):
print(f"{dev.address} {name} rssi={adv.rssi}")
async def read_export(address: str) -> list[dict]:
async with BleakClient(address) as client:
try:
status = json.loads(bytes(await client.read_gatt_char(EC01)))
except BleakError as e:
raise SystemExit(f"Read failed ({e}). Is the instrument paired? See section 2.")
if not status.get("ready"):
raise SystemExit("No export on the instrument. Save a measurement or use Export > Third-party app.")
size, crc = status["size"], status["crc"]
buf = bytearray()
while len(buf) < size:
await client.write_gatt_char(EC01, struct.pack("<I", len(buf)), response=True)
chunk = bytes(await client.read_gatt_char(EC02))
if not chunk:
raise RuntimeError("empty chunk, transfer stalled")
buf += chunk
if zlib.crc32(buf) & 0xFFFFFFFF != crc:
raise ValueError("CRC mismatch, read again")
text = gzip.decompress(buf).decode("utf-8")
return [json.loads(line) for line in text.splitlines() if line.strip()]
if __name__ == "__main__":
ap = argparse.ArgumentParser()
ap.add_argument("address", nargs="?")
ap.add_argument("--scan", action="store_true")
args = ap.parse_args()
if args.scan or not args.address:
asyncio.run(scan())
else:
for m in asyncio.run(read_export(args.address)):
print(m["type"].get("id"), [c["type"]["name"] for c in m["channels"]])
6. Checklist
- Find the instrument by name prefix
T330_/T320_. - Handle pairing (numeric comparison) and a lost bond.
- Read EC01; honour
ready,size,crc. - Chunk loop over EC01/EC02 until
sizebytes are read. - Check CRC-32, gunzip, split into lines, parse each line as JSON.
- Read timestamps as seconds and channels by
type.name(see data format). - (optional) Subscribe to EC01 notifications.
- (optional) Read the Device Information Service.
- (from 2027) Authorisation through the testo Cloud as a separate step before reading (see Planned changes).
Planned changes
testo is extending the security of the instrument interfaces step by step. For Bluetooth this means: from 2027 your app must authenticate with the testo Cloud before the instrument releases the measurement data. Pairing remains required in addition. Keep connecting, pairing, authorising and reading separate in your code so the authorisation step can be added. The procedure will be announced here in advance.