Decode BLE raw data

282 Views Asked by At

I want to decode data (Temperature and %RH) from a BLE device. I can get data from it. I know (guessed) where the data is (0x0028). But I don't know how to decode it. Here is what I get when running :

sudo bettercap
ble.enum 60:77:71:60:d1:8f

I then guessed the data is on handles 0x0028. And here is what I get when I run :

sudo gatttool -b 60:77:71:60:d1:8f -I
connect 
char-read-hnd 0x0028
[60:77:71:60:D1:8F][LE]> char-read-hnd 0x0028
Characteristic value/descriptor: 1e 00 8e 41 00 00 00 00 ea 94 3b 42 00 00 00 00 01 01 01 01 
[60:77:71:60:D1:8F][LE]> char-read-hnd 0x0028
Characteristic value/descriptor: c6 e4 8d 41 00 00 00 00 30 73 3b 42 00 00 00 00 01 01 01 01 
[60:77:71:60:D1:8F][LE]> char-read-hnd 0x0028
Characteristic value/descriptor: c6 e4 8d 41 00 00 00 00 30 73 3b 42 00 00 00 00 01 01 01 01 
[60:77:71:60:D1:8F][LE]> char-read-hnd 0x0028
Characteristic value/descriptor: c6 e4 8d 41 00 00 00 00 9a 40 3b 42 00 00 00 00 01 01 01 01 
[60:77:71:60:D1:8F][LE]> char-read-hnd 0x0028
Characteristic value/descriptor: 1e 00 8e 41 00 00 00 00 56 2e 3b 42 00 00 00 00 01 01 01 01 
[60:77:71:60:D1:8F][LE]> char-read-hnd 0x0028
Characteristic value/descriptor: 1e 00 8e 41 00 00 00 00 42 19 3b 42 00 00 00 00 01 01 01 01 
[60:77:71:60:D1:8F][LE]> char-read-hnd 0x0028
Characteristic value/descriptor: c6 e4 8d 41 00 00 00 00 18 23 3b 42 00 00 00 00 01 01 01 01 

I think the data (°C and %RH) I'm looking for is in there but I have no idea how to decipher it.

Can somebody help ?

I tried to convert it from hex to dec but I didn't get any conclusive results. °C should be between 17 and 23 and %HR between 20 and 80.

Before warming up the sensor : 1e 00 8e 41 00 00 00 00 ea 94 3b 42 00 00 00 00 01 01 01 01 After warming up the sensor : c6 e4 8d 41 00 00 00 00 30 73 3b 42 00 00 00 00 01 01 01 01

0

There are 0 best solutions below