nathanfaber / meaterble

Meater BLE reverse engineering
71 stars 15 forks source link

Meater BLE - Reverse Engineering

The goal of this project is to reverse engineer the communicaton with Meater Bluetooth Low Energy probes. Once the format is known, we will be able to implement an alternative receiver to the Block, Meater+ and the IOS/Android software.

Status

Ambient, tip, battery and IDs are all handled by the current code.

Running

Your app, block, or meater+ must be off for the probe to be seen. Each probe only allows a single low energy connection.

run.sh can be used to scan for all local probes and then it will run readMeater.py on each:

# ./run.sh 
D0:D9:4F:86:52:CE MEATER
D0:D9:4F:8B:57:25 MEATER
Connecting...
Connecting...
Connected
Connected
D0:D9:4F:86:52:CE v1.0.4 probe: 0 tip: 63.837500F/17.687500C ambient: 63.837500F/17.687500C battery: 90% age: 0s
D0:D9:4F:8B:57:25 v1.0.5 probe: 4 tip: 63.387500F/17.437500C ambient: 63.387500F/17.437500C battery: 80% age: 0s
D0:D9:4F:86:52:CE v1.0.4 probe: 0 tip: 63.837500F/17.687500C ambient: 63.837500F/17.687500C battery: 90% age: 0s
D0:D9:4F:8B:57:25 v1.0.5 probe: 4 tip: 63.387500F/17.437500C ambient: 63.387500F/17.437500C battery: 80% age: 0s
D0:D9:4F:86:52:CE v1.0.4 probe: 0 tip: 63.837500F/17.687500C ambient: 63.837500F/17.687500C battery: 90% age: 0s
D0:D9:4F:8B:57:25 v1.0.5 probe: 4 tip: 63.387500F/17.437500C ambient: 63.387500F/17.437500C battery: 80% age: 0s
D0:D9:4F:86:52:CE v1.0.4 probe: 0 tip: 63.837500F/17.687500C ambient: 63.837500F/17.687500C battery: 90% age: 0s
D0:D9:4F:8B:57:25 v1.0.5 probe: 4 tip: 63.387500F/17.437500C ambient: 63.387500F/17.437500C battery: 80% age: 0s
D0:D9:4F:86:52:CE v1.0.4 probe: 0 tip: 63.837500F/17.687500C ambient: 63.837500F/17.687500C battery: 90% age: 0s
D0:D9:4F:8B:57:25 v1.0.5 probe: 4 tip: 63.387500F/17.437500C ambient: 63.387500F/17.437500C battery: 80% age: 0s
D0:D9:4F:86:52:CE v1.0.4 probe: 0 tip: 63.837500F/17.687500C ambient: 63.837500F/17.687500C battery: 90% age: 0s
D0:D9:4F:8B:57:25 v1.0.5 probe: 4 tip: 63.387500F/17.437500C ambient: 63.387500F/17.437500C battery: 80% age: 0s

BLE handles of interest (gattool handles)

Data format (handle 43)

It looks like all of the data is formatted as account/count pairs. The 512 bytes here are 256 unique values.

Data format (handle 31)

There are 8 bytes available for read on the probe at service 2 characteristics 1.

Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7 Byte 8
Tip accum Tip count Ambient ra accum Ambient ra count Ambient oa accum Ambient oa count Unknown Unknown

One of the unknown values may be battery level but this is not confirmed.

The raw value can be calculated as accum+count*256. The accumulator will reach 255 and then roll over to the count.

Probe calculation/Ambient calculation

User Eric Thomas gave us an awesome push with the calculations and code for ambient and tip. See PR #1.

Identifying probes - block/single (handle 22 and 24)

The suffix after _ identifies the probe number, corresponding to the etch number on the block probes and 0 for singletons.

A singleton probe has the value v1.0.4_0 and 1.0.4_0

A block probe has the values v1.0.5_1 to v1.0.5_4 corresponding to the etching.

The version will assumingly change depending on the firmware on the probes, these correspond to a Meater+ probe block.