Search code examples
bluetoothbluetooth-lowenergydecodetemperature

How to decode bluetooth temperature sensor


i want to get temperature from a bluetooth device and i'm stuck :

There are some payloads, with bytes i've "cut":

06 d7 0a 00fee107081e 08 2d 35 04  08:45 27,8
06 79 0c 00fee107081e 08 2e 35 04  08:46 31,9
06 13 0d 00fee107081e 08 2f 15 04  08:47 33,5
06 e7 0d 00fee107081e 08 31 1e 01  08h49 35,6
06 fc 0d 00fee107081e 08 32 1e 01  08h50 35,8
01|02|03|     04     |05|06|07|08

(The temperature is in Degres Celsius and i've got it from android device during bluetooth logging) but i want to get it from these payloads...

So my analysis is the following : Byte 5 is HOUR. Byte 6 is Minutes.

Could you help me please ?


Solution

  • I don't know which characteristic you are reading, but I can guess that byte 02 and 03 contain the temperature information. Note that this is LSO...MSO, so you have to reverse the order of the bytes:

    d7 0a -> 0x0ad7 = 2775 --> 27.8

    79 0c -> 0x0c79 = 3193 --> 31.9

    13 0d -> 0x0d13 = 3347 --> 33.5

    e7 0d -> 0x0de7 = 3559 --> 35.6

    fc 0d -> 0x0dfc = 3580 --> 35.8