diff --git a/src/controller/python/chip/ChipBleUtility.py b/src/controller/python/chip/ChipBleUtility.py index 95abc3b7c8be76..f4d868f29ef775 100644 --- a/src/controller/python/chip/ChipBleUtility.py +++ b/src/controller/python/chip/ChipBleUtility.py @@ -42,6 +42,9 @@ FAKE_CONN_OBJ_VALUE = 12121212 +# Number of bytes in service data payload +SERVICE_DATA_LEN = 8 + def VoidPtrToUUIDString(ptr, len): try: @@ -365,7 +368,7 @@ def __init__(self, pairingState, discriminator, vendorId, productId): def ParseServiceData(data): - if len(data) != 7: + if len(data) != SERVICE_DATA_LEN: return None return BleDeviceIdentificationInfo( int(data[0]),