From cb83cda06a621b095e52029edbfa4049a9a84bb9 Mon Sep 17 00:00:00 2001 From: Thomas Weller Date: Wed, 23 Oct 2024 19:39:12 +0200 Subject: [PATCH] Fix comments for AD types in advertising (#10512) --- libraries/BLE/src/BLEAdvertising.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/BLE/src/BLEAdvertising.cpp b/libraries/BLE/src/BLEAdvertising.cpp index 1f2e6cd2887..2d71c4d7478 100644 --- a/libraries/BLE/src/BLEAdvertising.cpp +++ b/libraries/BLE/src/BLEAdvertising.cpp @@ -352,7 +352,7 @@ void BLEAdvertisementData::setCompleteServices(BLEUUID uuid) { switch (uuid.bitSize()) { case 16: { - // [Len] [0x02] [LL] [HH] + // [Len] [0x03] [LL] [HH] cdata[0] = 3; cdata[1] = ESP_BLE_AD_TYPE_16SRV_CMPL; // 0x03 addData(String(cdata, 2) + String((char *)&uuid.getNative()->uuid.uuid16, 2)); @@ -361,7 +361,7 @@ void BLEAdvertisementData::setCompleteServices(BLEUUID uuid) { case 32: { - // [Len] [0x04] [LL] [LL] [HH] [HH] + // [Len] [0x05] [LL] [LL] [HH] [HH] cdata[0] = 5; cdata[1] = ESP_BLE_AD_TYPE_32SRV_CMPL; // 0x05 addData(String(cdata, 2) + String((char *)&uuid.getNative()->uuid.uuid32, 4)); @@ -370,7 +370,7 @@ void BLEAdvertisementData::setCompleteServices(BLEUUID uuid) { case 128: { - // [Len] [0x04] [0] [1] ... [15] + // [Len] [0x07] [0] [1] ... [15] cdata[0] = 17; cdata[1] = ESP_BLE_AD_TYPE_128SRV_CMPL; // 0x07 addData(String(cdata, 2) + String((char *)uuid.getNative()->uuid.uuid128, 16)); @@ -453,7 +453,7 @@ void BLEAdvertisementData::setPartialServices(BLEUUID uuid) { case 128: { - // [Len] [0x04] [0] [1] ... [15] + // [Len] [0x06] [0] [1] ... [15] cdata[0] = 17; cdata[1] = ESP_BLE_AD_TYPE_128SRV_PART; // 0x06 addData(String(cdata, 2) + String((char *)&uuid.getNative()->uuid.uuid128, 16));