From 1078062f35d96ecd449148c617bf99d8010cc21e Mon Sep 17 00:00:00 2001 From: Jakub Date: Tue, 21 Mar 2023 18:25:08 +0100 Subject: [PATCH] [Tizen] Bluetooth add advertising flags setup (#25764) * Add call bt_adapter_le_set_advertising_flags * Add missing include files * Reformat --- src/platform/Tizen/BLEManagerImpl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/platform/Tizen/BLEManagerImpl.cpp b/src/platform/Tizen/BLEManagerImpl.cpp index 55144ba1b68985..1ce4d49829ea2d 100644 --- a/src/platform/Tizen/BLEManagerImpl.cpp +++ b/src/platform/Tizen/BLEManagerImpl.cpp @@ -42,6 +42,8 @@ #include #include +#include +#include #include #include @@ -677,6 +679,10 @@ int BLEManagerImpl::StartBLEAdvertising() VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_adapter_le_add_advertising_service_data() failed. ret: %d", ret)); + ret = bt_adapter_le_set_advertising_flags( + mAdvertiser, BT_ADAPTER_LE_ADVERTISING_FLAGS_GEN_DISC | BT_ADAPTER_LE_ADVERTISING_FLAGS_BREDR_UNSUP); + VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_adapter_le_set_advertising_flags() failed. ret: %d", ret)); + ret = bt_adapter_le_set_advertising_device_name(mAdvertiser, BT_ADAPTER_LE_PACKET_ADVERTISING, true); VerifyOrExit(ret == BT_ERROR_NONE, ChipLogError(DeviceLayer, "bt_adapter_le_set_advertising_device_name() failed. ret: %d", ret));