diff --git a/src/platform/Ameba/BLEManagerImpl.cpp b/src/platform/Ameba/BLEManagerImpl.cpp index df0452f47b101c..0d487e4d1ee31b 100755 --- a/src/platform/Ameba/BLEManagerImpl.cpp +++ b/src/platform/Ameba/BLEManagerImpl.cpp @@ -599,11 +599,11 @@ CHIP_ERROR BLEManagerImpl::ConfigureAdvertisingData(void) /**************** Prepare advertising data *******************************************/ memset(advData, 0, sizeof(advData)); - advData[index++] = 0x02; // length - advData[index++] = CHIP_ADV_DATA_TYPE_FLAGS; // AD type : flags - advData[index++] = CHIP_ADV_DATA_FLAGS; // AD value - advData[index++] = 0x0A; // length - advData[index++] = 0x16; // AD type: (Service Data - 16-bit UUID) + advData[index++] = 0x02; // length + advData[index++] = CHIP_ADV_DATA_TYPE_FLAGS; // AD type : flags + advData[index++] = CHIP_ADV_DATA_FLAGS; // AD value + advData[index++] = static_cast(sizeof(deviceIdInfo) + CHIP_ADV_SHORT_UUID_LEN + 1); // length + advData[index++] = CHIP_ADV_DATA_TYPE_SERVICE_DATA; // AD type: (Service Data - 16-bit UUID) advData[index++] = static_cast(ShortUUID_CHIPoBLEService.value & 0xFF); // AD value advData[index++] = static_cast((ShortUUID_CHIPoBLEService.value >> 8) & 0xFF); // AD value