bluetooth-lowenergyxiaomimi

Xiaomi mi scale v1 Weight Data


I am trying to writing an application that can take weight measurement from Xiaomi mi scale version 1. I get a hex value like this 0624b2070101002e3800004c04(5.50kg) from the Body Composition Measurement service.

According to my research the first byte gives 02:measurement unit The last two bytes are the weight value, But when I convert this value to decimal and divide by 200, I don't get the correct value.

Can someone help me get the correct data?


Solution

  • The last two bytes are 4c04. Bluetooth sends data in little endian format so as an integer that is 1100.

    The "GATT Specification Supplement 4" document at https://www.bluetooth.com/specifications/specs/ says:

    3.27.2.7 Weight field

    This field is in kilograms with resolution 0.005 if the bit 0 of the Flag field is 0 or in pounds with a resolution of 0.01 if the bit 0 of the Flag field is 1.

    1100 * 0.005 = 5.5kg