Skip to content

Honor CH100 scale support #378

Closed
Closed

Description

@anongeek

Hello,
I'm looking for support for Honor CH100. I do some capture
Hope you could help for integrating this scale into the application.
I've attached the openScale logs and also HCI snoop.

Thanks in advance !

Best regards,
screenshot_20190113-230927

openScale_2019-01-13_23-00.txt

hci_snoop20190113225006.cfa.txt

Activity

  1. added
    scale support
    on Jan 14, 2019
  2. oliexdev commented on Jan 14, 2019

    @oliexdev
    Owner

    Thanks we need all true data of your measurement regarding to the hci_snoop log for e.g. fat, water, muscle mass, sex, body height, activity level and so on.

  3. anongeek commented on Jan 14, 2019

    @anongeek
    Author

    Hello,

    here's the data requested for the current measure :
    sex : male
    weight : 66,3kg
    fat percentage : 18,8%
    muscle mass : 51,3kg
    I stay available if you need more informations.

    best regards,

  4. jpintor14 commented on Jan 17, 2019

    @jpintor14

    Hello, I'm working in this integration too.

    According a Huawei Support ticket, the Body Fat Scale uses the "Weight Standard Profile". The specifications doc here.

    I see that if the scale support multiple users, to read the "Weight" or "Body Composition Measurement", you have to write the "User Control Point" first. The document says (setcion 4.6.3.2.2):

    To request the consent of a Weight Scale user in order to access their UDS Characteristics, the Collector shall use the Consent Op Code followed by an array of 3 UINT8 Parameter Values that represents the User Index (1 octet) followed by the Consent Code (2 octets) defined by the user as defined

    But, How I know what is this "Consent Operator Code".

    Best regards,
    Javier Pintor

  5. oliexdev commented on Jan 17, 2019

    @oliexdev
    Owner

    @anongeek your entered body height is missing. Could you provide this piece of information.

    @jpintor14 is your implementation open-source? You could maybe look into the hci_snoop log to find the "consent operator code", see here.

  6. jpintor14 commented on Jan 18, 2019

    @jpintor14

    Thanks for the help! This is the log of the official app.

    I can't see in it the write operation with the standart command(0x2A9F).
    There are two "Sent Write Request" with the characteristic 0xFAA2.
    I can't decode it yet, any idea?

    This is a piece of code of my project (Xamarin Android App in C#):

    - DeviceControlActivity:

    public void LoadPesoHuaweiCharacteristic(BluetoothGattService gattService)
    {

    if (UUID_USER_DATA_SERVICE.ToString() == gattService.Uuid.ToString())
    {
        BluetoothGattCharacteristic userControlPoint = null;
        BluetoothGattCharacteristic userIndex = null;
    
        IList<BluetoothGattCharacteristic> gattCharacteristics = gattService.Characteristics;
        foreach (BluetoothGattCharacteristic gattCharacteristic in gattCharacteristics)
        {
            if (UUID_USER_INDEX.Equals(gattCharacteristic.Uuid))
            {
                userIndex = gattCharacteristic;
            }
            if (UUID_USER_CONTROL_POINT.Equals(gattCharacteristic.Uuid))
            {
                userControlPoint = gattCharacteristic;
            }
        }
    
        if (userIndex!=null && userControlPoint != null)
        {
            Thread.Sleep(300);
            mBluetoothLeService.SetCharacteristicNotification(userIndex, true);
            Thread.Sleep(300);
            mBluetoothLeService.SetCharacteristicNotification(userControlPoint, true);
            Thread.Sleep(300);
            mBluetoothLeService.ReadCharacteristic(userIndex);
            Thread.Sleep(300);
            mBluetoothLeService.ReadCharacteristic(userControlPoint);
            Thread.Sleep(300);
    
            mBluetoothLeService.mandado = true;
            mBluetoothLeService.setDeviceControlActivity(this);
    
            Intent gattServiceIntent = new Intent(this, typeof(BluetoothLeService));
            BindService(gattServiceIntent, mServiceManager, Bind.AutoCreate);
        }
    
    
    }
    
    if (UUID_WEIGHT_SCALE_SERVICE.ToString() == gattService.Uuid.ToString())
    {
        BluetoothGattCharacteristic weightMeasurement = null;
    
        IList<BluetoothGattCharacteristic> gattCharacteristics = gattService.Characteristics;
        foreach (BluetoothGattCharacteristic gattCharacteristic in gattCharacteristics)
        {
            if (UUID_WEIGHT_MEASUREMET_HUAWEI.Equals(gattCharacteristic.Uuid))
            {
                weightMeasurement = gattCharacteristic;
            }
        }
    
    
    
        if (weightMeasurement != null && weightFeature != null)
        {
            mNotifyCharacteristic = weightMeasurement;
            Thread.Sleep(300);
            mBluetoothLeService.SetCharacteristicNotification(weightMeasurement, true);
            
            mBluetoothLeService.mandado = true;
            mBluetoothLeService.setDeviceControlActivity(this);
            
            Intent gattServiceIntent = new Intent(this, typeof(BluetoothLeService));
            BindService(gattServiceIntent, mServiceManager, Bind.AutoCreate);
        }
        
    }
    
    
    if (UUID_BODY_COMPOSITION_SERVICE.ToString() == gattService.Uuid.ToString())
    {
        BluetoothGattCharacteristic bodyCompositionMeasurement = null;
    
        IList<BluetoothGattCharacteristic> gattCharacteristics = gattService.Characteristics;
        foreach (BluetoothGattCharacteristic gattCharacteristic in gattCharacteristics)
        {
            if (UUID_WEIGHT_BODY_COMPOSITION_MEASUREMET_HUAWEI.Equals(gattCharacteristic.Uuid))
            {
                bodyCompositionMeasurement = gattCharacteristic;
            }
        }
    
    
        if (bodyCompositionMeasurement != null)
        {
            mNotifyCharacteristic = bodyCompositionMeasurement;
            mBluetoothLeService.SetCharacteristicNotification(bodyCompositionMeasurement, true);
            
            mBluetoothLeService.mandado = true;
            mBluetoothLeService.setDeviceControlActivity(this);
    
            Intent gattServiceIntent = new Intent(this, typeof(BluetoothLeService));
            BindService(gattServiceIntent, mServiceManager, Bind.AutoCreate);
        }
    
    }
    

    }

    - BluetoothLeService:

    public void ReadCharacteristic(BluetoothGattCharacteristic characteristic)
    {
    if (mBluetoothAdapter == null || mBluetoothGatt == null)
    {
    Log.Warn(TAG, "BluetoothAdapter not initialized");
    return;
    }

    if (UUID_USER_CONTROL_POINT.Equals(characteristic.Uuid))
    {
        try
        {
    
            byte[] magicBytes = new byte[] { (byte)0x00, (byte)0x9f, (byte)0x2a };
            Log.Error("MagicBytes", characteristic.Uuid.ToString() + "->" + BitConverter.ToString(magicBytes));
            characteristic.SetValue(magicBytes);
            characteristic.WriteType = GattWriteType.Default;
            mBluetoothGatt.WriteCharacteristic(characteristic);
    
        }
        catch (Exception e)
        {
    
        }
    
    }
    else
    {
        mBluetoothGatt.ReadCharacteristic(characteristic);
    }
    

    }

    public void SetCharacteristicNotification(BluetoothGattCharacteristic characteristic, bool enabled)
    {
    if (mBluetoothAdapter == null || mBluetoothGatt == null)
    {
    Log.Warn(TAG, "BluetoothAdapter not initialized");
    return;
    }
    mBluetoothGatt.SetCharacteristicNotification(characteristic, enabled);

    #region weight
    if (UUID_WEIGHT_MEASUREMENT_MEDISANA.Equals(characteristic.Uuid))
    {
        Log.Error(TAG, "Medisana Measurement SetIndicationOn");
        BluetoothGattDescriptor descriptor = characteristic.GetDescriptor(
            UUID.FromString(SampleGattAttributes.CLIENT_CHARACTERISTIC_CONFIG));
        descriptor.SetValue(BluetoothGattDescriptor.EnableIndicationValue.ToArray());
        mBluetoothGatt.WriteDescriptor(descriptor);
    
    }
    
    if (UUID_WEIGHT_FEATURE_MEDISANA.Equals(characteristic.Uuid))
    {
        Log.Error(TAG, "Medisana Feature SetIndicationOn");
        BluetoothGattDescriptor descriptor = characteristic.GetDescriptor(
            UUID.FromString(SampleGattAttributes.CLIENT_CHARACTERISTIC_CONFIG));
        descriptor.SetValue(BluetoothGattDescriptor.EnableIndicationValue.ToArray());
        mBluetoothGatt.WriteDescriptor(descriptor);
    
    }
    
    if (UUID_WEIGHT_BODY_COMPOSITION_MEASUREMET_HUAWEI.Equals(characteristic.Uuid))
    {
        Log.Error(TAG, "Huawei SetIndicationOn");
        BluetoothGattDescriptor descriptor = characteristic.GetDescriptor(
            UUID.FromString(SampleGattAttributes.CLIENT_CHARACTERISTIC_CONFIG));
        descriptor.SetValue(BluetoothGattDescriptor.EnableIndicationValue.ToArray());
        mBluetoothGatt.WriteDescriptor(descriptor);
    }
    
    if (UUID_WEIGHT_BODY_COMPOSITION_FEATURE_HUAWEI.Equals(characteristic.Uuid))
    {
        Log.Error(TAG, "Huawei SetIndicationOn");
        BluetoothGattDescriptor descriptor = characteristic.GetDescriptor(
            UUID.FromString(SampleGattAttributes.CLIENT_CHARACTERISTIC_CONFIG));
        descriptor.SetValue(BluetoothGattDescriptor.EnableIndicationValue.ToArray());
        mBluetoothGatt.WriteDescriptor(descriptor);
    }
    
    if (UUID_WEIGHT_MEASUREMET_HUAWEI.Equals(characteristic.Uuid))
    {
        Log.Error(TAG, "Huawei SetIndicationOn");
        BluetoothGattDescriptor descriptor = characteristic.GetDescriptor(
            UUID.FromString(SampleGattAttributes.CLIENT_CHARACTERISTIC_CONFIG));
        descriptor.SetValue(BluetoothGattDescriptor.EnableIndicationValue.ToArray());
        mBluetoothGatt.WriteDescriptor(descriptor);
    }
    
    if (UUID_WEIGHT_FEATURE_HUAWEI.Equals(characteristic.Uuid))
    {
        Log.Error(TAG, "Huawei SetIndicationOn");
        BluetoothGattDescriptor descriptor = characteristic.GetDescriptor(
            UUID.FromString(SampleGattAttributes.CLIENT_CHARACTERISTIC_CONFIG));
        descriptor.SetValue(BluetoothGattDescriptor.EnableIndicationValue.ToArray());
        mBluetoothGatt.WriteDescriptor(descriptor);
    }
    
    if(UUID_USER_CONTROL_POINT.Equals(characteristic.Uuid))
    {
        Log.Error(TAG, "Huawei SetIndicationOn");
        BluetoothGattDescriptor descriptor = characteristic.GetDescriptor(
            UUID.FromString(SampleGattAttributes.CLIENT_CHARACTERISTIC_CONFIG));
        descriptor.SetValue(BluetoothGattDescriptor.EnableNotificationValue.ToArray());
        mBluetoothGatt.WriteDescriptor(descriptor);
    }
    #endregion
    

    }

    public void BroadcastUpdate(String action, BluetoothGattCharacteristic characteristic)
    {
    Intent intent = new Intent(action);

    byte[] data = characteristic.GetValue();
    Log.Info("SendBroadcast", characteristic.Uuid.ToString() );
    for (int x = 0; x < data.Length; x++)
    {
        Log.Info(characteristic.Uuid.ToString(), x + ": " + data[x]);
    }
    
    
    SendBroadcast(intent);
    

    }

    The UpdateBroadcast() method is not fired with the rightcharacteristics

    Best regards,
    Javier Pintor

  7. oliexdev commented on Jan 18, 2019

    @oliexdev
    Owner

    what is happened if your send the same 0xFAA2 command to the scale?

  8. jpintor14 commented on Jan 19, 2019

    @jpintor14

    Apparently, there is not response.

  9. raven-ie commented on Jan 22, 2019

    @raven-ie

    I just got Huawei Body Fat Scale AH100 and wanted to open ticket along with the logs - is Honor CH100 just a rebrand of the same scale? If so I could maybe help with some logs?

  10. jpintor14 commented on Jan 22, 2019

    @jpintor14

    @raven-ie yes, is the same model.
    I have the Huawei AH100, but later de Bluettoth device is called CH100 too.

    @oliexdev I am still testing writing to the 0xFAA1, but the FxFAA2 is not changed.
    I recevive the FxFAA2 values when the Scale connect to the App, not when the measurement is completed

    This is my doc with the sequence registered in the log Comandos Huawei.xlsx

  11. jpintor14 commented on Jan 23, 2019

    @jpintor14

    There is point when the app receive the same structure of the characteristic 0xfaa2.
    I have repeated some times the mesurement and there are the results, but I can't decode yet.
    The dynamic parts are in parentheses:

    bc 11 0e bf (c6 c3 7e) d7 d6 eb d5 (fe 21 c2 11 8a 18) 76 0b => 84.7 kg
    bc 11 0e bf (dd c3 78) d7 d6 eb d5 (fe 23 cf 19 8a 56) 76 0b => 85.2 kg
    bc 11 0e bf (dd c3 78) d7 d6 eb d5 (fe 23 f9 37 8a 52) 76 0b => 85.2 kg
    bc 11 0e bf (da c3 67) d7 d6 eb d5 (fe 24 d4 2b 8a 51) 76 0b => 85.1 kg
    bc 11 0e bf (da c3 67) d7 d6 eb d5 (fe 24 d6 11 8a 50) 76 0b => 85.1 kg
    bc 11 0e bf (dc c3 78) d7 d6 eb d5 (fe 24 c0 2f 8a 5f) 76 0b => 85.3 kg
    bc 11 0e bf (dd c3 67) d7 d6 eb d5 (fe 24 c4 37 8a 5e) 76 0b => 85.2 kg
    bc 11 0e bf (dc c3 67) d7 d6 eb d5 (fe 24 f3 09 8a 5d) 76 0b => 85.3 kg
    bc 11 0e bf (da c3 66) d7 d6 eb d5 (fe 24 fe 16 8a 5c) 76 0b => 85.1 kg
    bc 11 0e bf (da c3 64) d7 d6 eb d5 (fe 25 cf 38 8a a0) 76 0b => 85.1 kg

    The second variable part could be a datetime, but the first one, it doesn't have much logic:

    da c3 =? 85.1 kg
    dd c3 =? 85.2 kg
    dc c3 =? 85.3 kg

    These values of 0xfaa2 are received when the app writes 'bd 01 20 21'

  12. david-gam commented on Apr 18, 2019

    @david-gam

    Hola, estoy intentando leer las lecturas de peso de la bascula Huawei ch100 y ch18 y estoy teniendo los mismos problemas, alguien puede ayudarme?

  13. jpintor14 commented on Apr 19, 2019

    @jpintor14

    I could research and the info is encrypted, and the Huawei support answer me that the product not allow third party integrations

  14. quixony commented on Jun 1, 2019

    @quixony

    Is any progress been made within this issue? I could provide additional decoding data if that helps.

  15. jahav commented on Jun 3, 2020

    @jahav

    Hi,

    I have taken several samples from my scale (Huawei AH100, but reports as ChipseaT_82:65:40 (CH100S), same as other ogs from the thread) and analyzed the data to determine an algorithm to get a weight from the raw value of the bluetooth log.

    Unfortunately it gives correct values only for my scale (on my sample of 60 values). When I tried to use same algorithm for other logs posted in this thread, it doesn't give expected values.

    Basically I have to find a received value with characteristic 0xfaa2 starting with bc110e (it seems to always be followed by another that starts with bc118e, not sure what is it for yet). The fifth and sixth byte are a raw value for weight in little endian.

    Example:

    • raw value from log: bc 11 0e 30 6e 59 8d e8 b3 b5 10 44 6e 58 66 00 7e 42 ce
    • the app shows 83.0 kg.

    You can find it easily in the bluetooth dump, there is always a second received value that looks similar, it has similar prefix.

    Ok, we have a raw value, it's in little endian: 596e.
    Convert it to binary: 0101 1001 0110 1110
    Split it to following parts, dump rest

    • bits0-4: b01110 (14)
    • bits5-6: b11 (3)
    • bits7-8: b10 (2)
    • bit9: b0 (0)

    Now we transform pieces of the raw value into kg value

    decimal TransformRawToKg(int raw)
    {
    	int bits0_4 = raw & 0b00_0001_1111;
    	int bits5_6 = (raw & 0b00_0110_0000) >> 5;
    	int bits7_8 = (raw & 0b01_1000_0000) >> 7;
    	int bit9 = (raw & 0b10_0000_0000) >> 9;
    
    	var kg_value = 
    	      (((bits0_4 + 16m) / 10m) % 3.2m)    // 1
    	    + 3.2m * (                            // 2
    		           ((bits5_6 + 2) % 4)    // 3
    	             + (bits7_8 << 2)             // 4
    	             + ((~bit9 & 1) << 4)         // 5
    	             );
    	 return kg_value;
    }

    Line explanation

    1. First 5 bits are a part of weight that don't really need much adjustment. When bit0_4 go up by 1, weight goes up by 0.1 kg. The modulo and scale are for alignment.
    2. Since bit0_4 specify values less than 3.2, the upper bits represent a band 3.2 kg wide, so normalize the transformed value.
    3. bits5_6 are kind of weird. The bit values cycle correctly 10 -> 11 -> 00 -> 01, but the carry that should happen when 11 increases to 00 + carry doesn't happen. Instead, the carry happens when 01 goes to 10. The modulo basically shifts the cycle so carry is in correct place (i.e. b10 changes to b00, b11 changes to b01, b00 to b10 and b01 to b11).
    4. bits7_8 are fine as is, no need to change them
    5. bit9 is 1 until roughly 55 kg and then it is 0. So just invert it, so it is 0 for values under roughly 55 kg and 1 for higher values.

    The raw values from my logs (along with code for checking the algorithm) can be found at pastebin.

    I have attached a some of the logs I used for the decoding:
    openScale-AH100-logs.zip

  16. 26 remaining items

  17. Iliaroz commented on Aug 26, 2022

    @Iliaroz
    Contributor

    Scale documenatation says, that weigth could be +/- 2 kg..
    Yes, it would be nice to have log, thank you.

  18. rufik commented on Aug 26, 2022

    @rufik

    I did 2 offline measurements and then third one (at 11:33) as online. As expected, only the online one has been fetched successfully.
    See the log attached: openScale_2022-08-26_11-33.txt

  19. Iliaroz commented on Aug 26, 2022

    @Iliaroz
    Contributor

    Could you repeat? again make a few offline measurements and online one

  20. rufik commented on Aug 26, 2022

    @rufik

    Well, pretty the same story - only online measurement.
    openScale_2022-08-26_17-25.txt

  21. Iliaroz commented on Aug 26, 2022

    @Iliaroz
    Contributor

    @rufik
    Thank you for trying and time you spend for testing.

    I have a question to you
    What official app do you use?

  22. rufik commented on Aug 27, 2022

    @rufik

    @Iliaroz It's Huawei Body Fat Scale version CH100_V1.1.11.120 from Play Store: https://play.google.com/store/apps/details?id=com.huawei.ch100
    The scale is clearly Huawei AH-100 model.

    I think getting online measurements is the crucial part here. It seems to work well, so maybe it should be merged into official app now? Offline measurements can be handled after that , I can help testing :)

  23. Iliaroz commented on Aug 27, 2022

    @Iliaroz
    Contributor

    @rufik
    While I test program on my own scale, there was the situation, when offline measurements was read by official app, but not by OpenScale. The reason is scale "think" that current measurement belong to user from officialapp. Check, please, do you have your offline measurements read by Body Fat Scale. You can try:

    1. change user profile in official app (add 5 kg to your weight)
    2. make online measurement from official app (with your new weight, take a 5 kg dumbbell in your hands)
    3. make online measurement from OpenScale with own weight
    4. make offline measurement(s)
    5. make again online measurement from OpenScale , offline measurements should be read from scale (hopely :) )
  24. rufik commented on Aug 29, 2022

    @rufik

    @Iliaroz
    I removed data from scale (using official app) and removed all profiles from app. Then I have registered new profile "+5kg" as you wrote, took online measurement :) So official app should be fooled.
    Then I've started with fresh openscale - took "initial" online measurement first. Then:

    • took 2 or 3 offline measurements
    • took online measurement and...sorry, only no offline read from scale :/

    I've tried this sequence (2-3 offline, then online) few times, the same story. Even today - see logs attached.
    openScale_2022-08-29_14-45.txt

    PS. there is one thing that has changed, the scale started to show Fat % values in offline mode. There were ----- signs previously.

  25. Iliaroz commented on Aug 29, 2022

    @Iliaroz
    Contributor

    @rufik
    Ok. The ---- mark for offline measures means that two or more apps (from different devices) use the same scale for same user (~same weight of user +-2kg )
    The -- mark for offline measures means that there is no data for current user (weight, height,...) in scale.

    When offline measurements show fat%, it means data is stored inside your scale for some user.
    Just to be sure: have you made online measurement from official app with new weight? And was the new weight for official app really +5kg to your own?

  26. rufik commented on Aug 29, 2022

    @rufik

    So it looks offline measurements are being performed correctly on my scale.
    Yes, I took online measurement in official app first, 84.8 kg, see attachment:
    Screenshot_20220829-165922

    Then I went to open scale app, all tried were between 81.0 and 82.0 kg. So 2.8kg difference at least.

  27. added
    help wanted
    no-progress
    on Dec 8, 2025
  28. oliexdev commented on Dec 8, 2025

    @oliexdev
    Owner

    Since there has been no progress on this issue for a long time, I am closing it for now.

    Please note that implementation of new scale support requires access to the actual scale.

    If someone wants to continue working on this, feel free to reopen this issue or submit a working implementation via a pull request.

    For guidance on how to add a new scale handler into openScale, see the updated wiki page: How to support a new scale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedno-progressscale support

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions