diff --git a/src/ble/BleUUID.h b/src/ble/BleUUID.h index 37e2fdc1180f5e..1c0eefd514100a 100644 --- a/src/ble/BleUUID.h +++ b/src/ble/BleUUID.h @@ -101,7 +101,6 @@ constexpr std::pair StringToUUID(const char (&str)[N]) // BlueZ API https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/org.bluez.Device.rst // describes ServiceData as "Keys are the UUIDs in string format" however no description // on actual case required -inline constexpr char CHIP_BLE_DESC_SHORT_UUID_STR[] = "2902"; inline constexpr char CHIP_BLE_SERVICE_SHORT_UUID_STR[] = "fff6"; inline constexpr char CHIP_BLE_SERVICE_LONG_UUID_STR[] = "0000fff6-0000-1000-8000-00805f9b34fb"; inline constexpr char CHIP_BLE_CHAR_1_UUID_STR[] = "18ee2ef5-263d-4559-959f-4f9c429f9d11"; diff --git a/src/platform/Tizen/BLEManagerImpl.cpp b/src/platform/Tizen/BLEManagerImpl.cpp index 377aaf7b042cb2..60ffa513ddc310 100644 --- a/src/platform/Tizen/BLEManagerImpl.cpp +++ b/src/platform/Tizen/BLEManagerImpl.cpp @@ -74,6 +74,9 @@ namespace Internal { namespace { +// Bluetooth SIG defined UUID for Client Characteristic Configuration Descriptor +constexpr const char * kClientCharacteristicConfigurationUUID = "2902"; + constexpr System::Clock::Timeout kNewConnectionScanTimeout = System::Clock::Seconds16(20); constexpr System::Clock::Timeout kConnectTimeout = System::Clock::Seconds16(20); constexpr System::Clock::Timeout kFastAdvertiseTimeout = @@ -631,10 +634,10 @@ CHIP_ERROR BLEManagerImpl::RegisterGATTServer() ChipLogError(DeviceLayer, "bt_gatt_server_set_characteristic_notification_state_change_cb() failed: %s", get_error_message(ret))); - // Create CCC Descriptor for 2nd Characteristic - ret = bt_gatt_descriptor_create(Ble::CHIP_BLE_DESC_SHORT_UUID_STR, BT_GATT_PERMISSION_READ | BT_GATT_PERMISSION_WRITE, + ret = bt_gatt_descriptor_create(kClientCharacteristicConfigurationUUID, BT_GATT_PERMISSION_READ | BT_GATT_PERMISSION_WRITE, desc_value, sizeof(desc_value), &desc); VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_descriptor_create() failed: %s", get_error_message(ret))); + ret = bt_gatt_characteristic_add_descriptor(char2, desc); VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_gatt_characteristic_add_descriptor() failed: %s", get_error_message(ret)));