Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A little Game/Quiz: Do you see my values? (Interpreting Hex-Values)

Okay I need some Help... I got a bluetooth-le-weight-scale. I can connect my Raspberry Pi to this scale and get some data. But its not easy for me to read my values in this hex-salad.

After every measurement I get two lines of Information, which should contain my values

(I simulated all measurements ... Person 5 is just me pushing my hands on the scale .. Person 2 + 3 is me wearing socks on the scale, so no need to give me some medical advices if you find some unrealistic values :D )

Scale: starts with 5.0kg(officaly, but i can see a 4.9 as starting point), Max 180kg (this could be just a safety note. its a glass-scale), d = 100g

what I noted from the Display:

#  | Person | m kg| Fat % | TbW % | Mus % | Bone kg | kcal | BMI
1  |   5    |13,3 |   5   |  72,7 |  60,1 |   0,8   | 1056 | 13,3
2  |   3    |73,6 |  26,3 |  51,1 |  34,2 |   3,5   | 2428 | 24,3
3  |   2    |76,8 |  18,5 |  61,1 |  41,9 |   3,4   | 2741 | 24,8
4  |   5    |15,0 |   5   |  70,3 |  58,4 |   0,9   | 1092 | 15,0
5  |   6    | 5,1 |   5   |  73   |  66,5 |   0,5   | 881  | 5,1

What I received via Bluetooth:

# | handle | Byte   0  1  2  3  4  5  6  7  8  9  10 11 12 13 14 15 16 17 18
-----------------------------------------------------------------------------
1 | 0x001b | value: 1d 32 05 00 fe 0f 13 11 11 01 12 00 ff 05 09 00 00 00 00  
1 | 0x001e | value: 6f 0f 13 11 11 05 20 04 32 f0 d7 f2 59 f2 08 f0 00 00 00 
-----------------------------------------------------------------------------
2 | 0x001b | value: 1d c0 1c 00 fe 45 06 00 00 7a 13 00 ff 03 09 00 00 00 00  
2 | 0x001e | value: 6f 45 06 00 00 03 7c 09 07 f1 ff f1 56 f1 23 f0 00 00 00 
-----------------------------------------------------------------------------
3 | 0x001b | value: 1d 00 1e 00 fe 37 01 00 00 d7 12 00 ff 02 09 00 00 00 00  
3 | 0x001e | value: 6f 37 01 00 00 02 b5 0a b9 f0 63 f2 a3 f1 22 f0 00 00 00 
-----------------------------------------------------------------------------
4 | 0x001b | value: 1d dc 05 00 fe 80 14 11 11 83 18 00 ff 05 09 00 00 00 00  
4 | 0x001e | value: 6f 80 14 11 11 05 44 04 32 f0 bf f2 48 f2 09 f0 00 00 00 
-----------------------------------------------------------------------------
5 | 0x001b | value: 1d fe 01 00 fe 5c 15 11 11 ac 16 00 ff 06 09 00 00 00 00   
5 | 0x001e | value: 6f 5c 15 11 11 06 71 03 32 f0 da f2 99 f2 05 f0 00 00 00 

Note: Each time before receiving the values, I have to send my scale a Unix-timestamp.. most of the times, I had just send 1111111111 or 0000000000 or something like that.. but I did not note what I send.. sorry..

there is always another incoming line where I spotted the user values, that are stored in the scale. So I think these are unimportant but maybe I'm wrong

P2, male, Height: 176cm, Age: 34

P3, female, Height: 174cm, Age: 23

P5, male, Height: 100cm, Age: 10

so maybe someone could tell me, like where I can find the Information that represents my weight. I just have spotted the person numbers

thanks for helping & greetings from germany

like image 819
Edmundo Del Gusto Avatar asked Dec 15 '15 10:12

Edmundo Del Gusto


2 Answers

ok ok.. I solved it...

0x1b:

weight: byte: 1 & 2

timestamp: byte 5-8

person: byte 13

0x1e:

timestamp: byte 1-4

person: 5

kcal: 6 & 7

fat: 8 & 9

tbw: 10 & 11

muscle: 12 & 13

bone: 14 & 15

like image 153
Edmundo Del Gusto Avatar answered Nov 09 '22 14:11

Edmundo Del Gusto


To add some more details: values decode as unsigned integers, little endian. For some obscure reason the 2 byte (short) integers have a most significant nibble as 0xf. Transmission starts off with indication 0x25 which contains the programmed properties of the person detected (i.e. weight is within +/- 2 kg of last measurement).

0x25:
person: byte 2
gender: byte 4 (1=male, 2=female)
age: byte 5
size: byte 6
activity: byte 8 (0=normal, 3=high)
like image 24
Keptenkurk Avatar answered Nov 09 '22 13:11

Keptenkurk