platform/core/connectivity/bluetooth-frwk.git
2 months agoAdd DA logic to fix le scan fail issue 19/306819/1 accepted/tizen/7.0/unified/20240301.144826 accepted/tizen/7.0/unified/20240301.175812
Wootak Jung [Wed, 28 Feb 2024 02:30:20 +0000 (11:30 +0900)]
Add DA logic to fix le scan fail issue

Change-Id: Ibbc873d83e16fe85778e46290cec95f79dfa24f4
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
2 months agoAdd function to check whether PBAP profile is connected 37/306737/1
Wootak Jung [Tue, 27 Feb 2024 01:31:54 +0000 (10:31 +0900)]
Add function to check whether PBAP profile is connected

Change-Id: I85ac7a4e666e694917afad0583758e62eeeb7e63
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
2 months agoRemove unnecessary log 36/306736/1
Wootak Jung [Tue, 27 Feb 2024 01:30:21 +0000 (10:30 +0900)]
Remove unnecessary log

Change-Id: I15e7002a89c4bff6a021683f9b918ea5ba820cdc
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
2 months agoAdd discovery busy logic if bonding is in progress 69/306069/1 accepted/tizen/7.0/unified/20240219.160839
Wootak Jung [Thu, 24 Nov 2022 06:13:20 +0000 (15:13 +0900)]
Add discovery busy logic if bonding is in progress

Change-Id: I151e022e58c996e26d5d503836e9a2a799661431
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
2 months agoFix crash issue that occurred when disabling BT during scanning 46/305746/3 accepted/tizen/7.0/unified/20240208.094433
Wootak Jung [Wed, 7 Feb 2024 04:48:14 +0000 (13:48 +0900)]
Fix crash issue that occurred when disabling BT during scanning

All timeout callbacks for scan results should be removed.

0: 0x0000007f9da8bb5c in __bt_hal_send_le_scan_result_event (adv_info=adv_info@entry=0x55a81a9240)
   at /usr/src/debug/bluetooth-frwk-0.7.0-1.aarch64/bt-oal/bluez_hal/src/bt-hal-gatt.c:465 --> bluetooth-frwk-oal (rpm)
1: 0x0000007f9da8bbcc in __bt_hal_adv_scan_req_timeout_cb (user_data=0x55a81a9240, user_data@entry=<error reading variable: value has been optimized out>)
   at /usr/src/debug/bluetooth-frwk-0.7.0-1.aarch64/bt-oal/bluez_hal/src/bt-hal-gatt.c:756 --> bluetooth-frwk-oal (rpm)

Change-Id: Ifc8d42a31f6d70687423abe43335165edea62726
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
2 months agoChange visibility settings for DA devices 44/305644/1 accepted/tizen/7.0/unified/20240207.025319
Sohyeon Choi [Tue, 23 Jan 2024 09:35:00 +0000 (18:35 +0900)]
Change visibility settings for DA devices

Change-Id: I10d20fe86e2f2f6c6b27c358e4f6c08af2ffcc6a
Signed-off-by: Sohyeon Choi <shss.choi@samsung.com>
3 months agoFix to reallocate fd when gatt write fails 93/305393/1 accepted/tizen/7.0/unified/20240205.015613
Wootak Jung [Thu, 1 Feb 2024 06:16:04 +0000 (15:16 +0900)]
Fix to reallocate fd when gatt write fails

Change-Id: Ic9e2cf70d022c1d0f66b45587f08b382cd425421
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 months agoAdd DA logic so that A2DP connection is only possible for one device 16/304816/1 accepted/tizen/7.0/unified/20240125.012453
Wootak Jung [Wed, 24 Jan 2024 03:56:37 +0000 (12:56 +0900)]
Add DA logic so that A2DP connection is only possible for one device

A2DP and HFP can only be connected to the same device.

Change-Id: I600ffc9d7dd753f6bd9a070f8616d893b832d4bb
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 months agoFix issue where state is not restored when adv operation fails 06/304306/1 accepted/tizen/7.0/unified/20240118.092849
Wootak Jung [Fri, 5 Jan 2024 08:20:58 +0000 (17:20 +0900)]
Fix issue where state is not restored when adv operation fails

This patch reverts the iOS GM support patch below.

commit 0d9d2326e4bcc54a2a979eaad6ebec69fb9747dd
Author: Wootak Jung <wootak.jung@samsung.com>
Date:   Tue Dec 17 08:59:17 2019 +0900

    Fix iOS GM connection issue

Change-Id: I6ab48c90e5b4a57457c8ea04c570c1592ab5d234
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 months agoRevert "Integrate list of client/server info to conn info list" 05/304305/1
Wootak Jung [Mon, 6 Nov 2023 00:35:21 +0000 (09:35 +0900)]
Revert "Integrate list of client/server info to conn info list"

This reverts commit f693e2270a04917b1004cb8c7504d55aa94badfd.

Change-Id: Ifd9a5b0f429fe68e0fefead057e11eb76d6e4e2a
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 months agoRevert "Integrate gatt connection info" 04/304304/1
Wootak Jung [Mon, 6 Nov 2023 00:34:45 +0000 (09:34 +0900)]
Revert "Integrate gatt connection info"

This reverts commit 837896a29835d78365a7e1d852de09e1821635bc.

Change-Id: I1179a05fb78b678aabfe0a8528090b4f4dc900ff
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
4 months agoFix issue where state is not restored when adv operation fails 22/303822/1 accepted/tizen/7.0/unified/20240109.160537
Wootak Jung [Fri, 5 Jan 2024 08:20:58 +0000 (17:20 +0900)]
Fix issue where state is not restored when adv operation fails

Change-Id: I72428877125969a9dd682d6a2124775e45f258a4
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
4 months agoFix issue where conn info could not be found 36/303636/3 accepted/tizen/7.0/unified/20240105.014818
Wootak Jung [Wed, 3 Jan 2024 00:11:39 +0000 (09:11 +0900)]
Fix issue where conn info could not be found

Branch logic is required because remote device management method is
different depending on the stack.

In the case of bluez, it is managed by remote address,
so if you distinguish it by instance ID, conn info may not be found.

In the case of bluedroid, it is managed by conn ID,
so you need to find conn info using remote address + instance ID.

Change-Id: Ieea79d1b86ff72dc3490a68fdfb50de934b4d04d
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
4 months agoRemove A2DP related logic for Fhub only 32/303432/3 accepted/tizen/7.0/unified/20240104.073225
Wootak Jung [Wed, 27 Dec 2023 22:46:27 +0000 (07:46 +0900)]
Remove A2DP related logic for Fhub only

Change-Id: I231596417f1827eeb4eb0866f0e505adbec1ea37
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
4 months agoRemove inefficient log 76/303376/2
Wootak Jung [Wed, 27 Dec 2023 00:43:38 +0000 (09:43 +0900)]
Remove inefficient log

12-20 21:56:15.976-0500 I/BLUETOOTH_FRWK_API (P20017, T20017): bt-gatt-service.c: bluetooth_gatt_write_channel_watch_cb(393) > +
12-20 21:56:15.976-0500 I/BLUETOOTH_FRWK_API (P 6345, T 6345): bt-gatt-service.c: bluetooth_gatt_write_channel_watch_cb(393) > +
12-20 21:56:15.976-0500 I/BLUETOOTH_FRWK_API (P20017, T20017): bt-gatt-service.c: bluetooth_gatt_write_channel_watch_cb(393) > +
12-20 21:56:15.976-0500 I/BLUETOOTH_FRWK_API (P 6345, T 6345): bt-gatt-service.c: bluetooth_gatt_write_channel_watch_cb(393) > +
12-20 21:56:15.976-0500 I/BLUETOOTH_FRWK_API (P20017, T20017): bt-gatt-service.c: bluetooth_gatt_write_channel_watch_cb(393) > +

Change-Id: Ie8d440160a6d5ea445d9c67a70e2a6dc4879db50
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
4 months agoBluetooth: Increase write data limit in l2cap connection. 46/303246/1 accepted/tizen/7.0/unified/20231228.060547
Harsh Jain [Tue, 19 Dec 2023 10:57:50 +0000 (16:27 +0530)]
Bluetooth: Increase write data limit in l2cap connection.

This patch increases write limit in l2cap connection
from 672 Bytes to 4096 Bytes.

Change-Id: I7a294036ae963ef1a08b31113674317d388e2a18
Signed-off-by: Harsh Jain <jain.harsh@samsung.com>
4 months agoFix issue where adv_handle of incorrect instance was modified 00/302600/2 accepted/tizen/7.0/unified/20231212.115255
Wootak Jung [Mon, 11 Dec 2023 06:05:14 +0000 (15:05 +0900)]
Fix issue where adv_handle of incorrect instance was modified

Reproduction steps:
1) bt_adapter_le_create_advertiser()     // ADV 1 create
2) bt_adapter_le_start_advertising_new() // ADV 1 start
3) bt_adapter_le_create_advertiser()     // ADV 2 create
4) bt_adapter_le_start_advertising_new() // ADV 2 start
5) register GATT Service                 // register gatt service
6) bt_gatt_server_start()                // GATT Server Start
7) bt_adapter_le_stop_advertising()      // ADV 1 stop
8) bt_adapter_le_destroy_advertiser()    // ADV 1 destroy --> RESOURCE_BUSY

Change-Id: I3ce3847b4a4acb478869c66fda8ce55e0dcdf212
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
4 months agoAdd new DA model name 02/302502/1 accepted/tizen/7.0/unified/20231212.053552
Wootak Jung [Fri, 8 Dec 2023 00:40:27 +0000 (09:40 +0900)]
Add new DA model name

AI Hub Smart EHS

Change-Id: I3614aefa19af5b719f96c85572e228b9c9c52865
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
4 months agoMerge "Add support for A2DP source and sink both role" into tizen_7.0
Wootak Jung [Fri, 8 Dec 2023 00:33:57 +0000 (00:33 +0000)]
Merge "Add support for A2DP source and sink both role" into tizen_7.0

5 months agoFix missing response issue of getting bonded device and devices. 58/301958/1
Harsh Jain [Tue, 28 Nov 2023 11:04:42 +0000 (16:34 +0530)]
Fix missing response issue of getting bonded device and devices.

Response is missing if the request of getting bonded device and devices is coming
while bonded_list_retrieved not set.

Change-Id: I9defc6ff55e7e173ec542ad021c0f76481a41de6
Signed-off-by: Harsh Jain <jain.harsh@samsung.com>
5 months agoAdd new DA model names 74/301874/1 accepted/tizen/7.0/unified/20231128.175754
Wootak Jung [Mon, 27 Nov 2023 00:34:32 +0000 (09:34 +0900)]
Add new DA model names

Bespoke Washer
Bespoke Dryer
Appliance Emulator

Change-Id: Ib23d5aea9b222d53606ea916ae6c6931ee54296b
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
5 months agoChange the L2CAP LE buffer size to 0xFFFF 83/301783/1
Wootak Jung [Thu, 2 Nov 2023 00:31:19 +0000 (09:31 +0900)]
Change the L2CAP LE buffer size to 0xFFFF

Change-Id: Id0ba8ef701c58a380566c87763c76fd91057c388
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
5 months agoFix memory leak when scanning 93/301693/2 accepted/tizen/7.0/unified/20231124.024930
Wootak Jung [Wed, 22 Nov 2023 01:29:51 +0000 (10:29 +0900)]
Fix memory leak when scanning

Change-Id: I312e57b2f8a066f1085813103cd942fea1135a3e
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
5 months agoAdd support for A2DP source and sink both role 92/301492/1 accepted/tizen/7.0/unified/20231208.173554
Wootak Jung [Wed, 15 Nov 2023 02:28:51 +0000 (11:28 +0900)]
Add support for A2DP source and sink both role

Change-Id: I8638a5ae3728d3f4fceac03b1403b0c38d8f351a
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
5 months agoAdd logic to start hf-agent when bt is enabled in DA devices 49/301349/3 accepted/tizen/7.0/unified/20231117.111247
Wootak Jung [Wed, 15 Nov 2023 01:18:21 +0000 (10:18 +0900)]
Add logic to start hf-agent when bt is enabled in DA devices

When restarting the bluetooth adapter, hf-agent does not restart after termination.

Change-Id: Ie67312a778582e396d80f8816b03e9b5c215fc5f
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
6 months agoFix LegacyManufacturerData parsing issue 40/299840/3
Wootak Jung [Wed, 11 Oct 2023 03:13:28 +0000 (12:13 +0900)]
Fix LegacyManufacturerData parsing issue

LegacyManufacturerDataLen is stored as uint16 not uint32
LegacyManufacturerData should be stored with HAL_PROP_DEVICE_MANUFACTURER_DATA
not HAL_PROP_DEVICE_BLE_ADV_DATA

Change-Id: I6cb7fe979b7c85190383ff318a127b75a4b4357a
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
7 months agoFix uuid duplication issue 62/299562/1 accepted/tizen/7.0/unified/20231007.110036
Wootak Jung [Thu, 5 Oct 2023 04:44:30 +0000 (13:44 +0900)]
Fix uuid duplication issue

Same uuids are in used if client instance register request is coming
right before server instance initialized

Change-Id: I93438ae0cadbceefc6c819454bfec3776e40ddb6
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
8 months agohandling a2dp/avrcp auth request according to A2DP role 33/298133/1 accepted/tizen/7.0/unified/20230908.190411
Sohyeon Choi [Thu, 31 Aug 2023 09:52:09 +0000 (18:52 +0900)]
handling a2dp/avrcp auth request according to A2DP role

Change-Id: I40f5451e4b7c4b7205ebf7f33d747a4ea2c6dc39

8 months agoFix 31bytes adv data not setting issue 90/297690/1 accepted/tizen/7.0/unified/20230824.162134
Wootak Jung [Tue, 22 Aug 2023 05:34:29 +0000 (14:34 +0900)]
Fix 31bytes adv data not setting issue

31bytes should be permitted

Change-Id: I762e88860eff11704cc3c5a98bf3963f2518966d
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
8 months agoAdd new DA model names 62/296862/1 accepted/tizen/7.0/unified/20230808.172200
Wootak Jung [Mon, 7 Aug 2023 00:25:48 +0000 (09:25 +0900)]
Add new DA model names

Change-Id: I54289d0b4ee140c26bc493ab00e0220286f48710
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months agoAdd skip logic for hal_bluetooth_stop error 61/296061/3 accepted/tizen/7.0/unified/20230720.170114
Wootak Jung [Wed, 19 Jul 2023 06:07:52 +0000 (15:07 +0900)]
Add skip logic for hal_bluetooth_stop error

Change-Id: If54d0275ff109de0b2da9ad8ff2abcd6de3ef8ec
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months agoAdd support for custom advertising flags. 71/295571/1 accepted/tizen/7.0/unified/20230719.021523
Jakub Latusek [Wed, 1 Feb 2023 05:56:12 +0000 (14:56 +0900)]
Add support for custom advertising flags.

It is required to set proper advertising flags when establishing a
connection using
Bluetooth low energy to properly recognize device type.
Without this, the Linux device cannot recognize the Tizen device
properly and establish a connection.

Change-Id: I7899e9ab56a40095df3a91aa15fc956ebd2aea58
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
Signed-off-by: Jakub Latusek <j.latusek@samsung.com>
10 months agoFix svace issue 95/295295/1 accepted/tizen/7.0/unified/20230705.171224
Wootak Jung [Tue, 2 May 2023 02:36:13 +0000 (11:36 +0900)]
Fix svace issue

Change-Id: Ib744763e4b725f6d1b7c4e3d48ebd5711d2725e0
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
10 months agoAdd "Smart Cooktop" to DA model 01/293901/1 accepted/tizen/7.0/unified/20230609.165445
Wootak Jung [Thu, 8 Jun 2023 00:40:30 +0000 (09:40 +0900)]
Add "Smart Cooktop" to DA model

Change-Id: I8445630af56792d75a0e58fd1af69df7e59a2bb9
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
11 months agoFix the issue that previously set scan resp data was not removed 26/292926/1
Wootak Jung [Wed, 17 May 2023 05:42:00 +0000 (14:42 +0900)]
Fix the issue that previously set scan resp data was not removed

reproduction steps:
1. create 1st advertiser and fill scan resp data
2. start advertising by 1st advertiser
3. stop 1st advertiser
4. create 2nd advertiser and don't fill scan resp data
5. start advertising by 2nd advertiser
6. 1st scan resp data was not removed

Change-Id: Icb144e25fd67f3aa5bd488ee3a1f05c99d152501
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
11 months agoAdd ssp auto accept logic in DA Headless case 90/292490/1 accepted/tizen/7.0/unified/20230511.022348
Wootak Jung [Tue, 9 May 2023 01:13:42 +0000 (10:13 +0900)]
Add ssp auto accept logic in DA Headless case

Change-Id: Ib909e6ae5b12e2bedac9464018634bf0dcd7f245
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
12 months agoFix the logic to set visible mode by a2dp role 83/291683/3 accepted/tizen/7.0/unified/20230424.135833
Wootak Jung [Thu, 20 Apr 2023 07:28:35 +0000 (16:28 +0900)]
Fix the logic to set visible mode by a2dp role

add the logic to set visible mode in da case

Change-Id: I2ecfd35ad7ffad1ddad8cc197d12a5dd84f5fa1e
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
13 months agoAdd EIR manufacturer data handling logic 28/290928/1 accepted/tizen/7.0/unified/20230410.160648
Wootak Jung [Wed, 5 Apr 2023 05:04:14 +0000 (14:04 +0900)]
Add EIR manufacturer data handling logic

Change-Id: Ie320eeb1663f6384c20daf4c4336abdfe13e4609
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
13 months agoAdd adv data custom name handling logic 42/289742/1 accepted/tizen/7.0/unified/20230327.042652
Wootak Jung [Thu, 16 Feb 2023 06:40:30 +0000 (15:40 +0900)]
Add adv data custom name handling logic

Change-Id: Ia7a9db2d407855dfa4b38ee31f35be08f9f80bd3
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
13 months agoAdd DA feature newly 41/289741/1
Wootak Jung [Thu, 9 Feb 2023 01:17:17 +0000 (10:17 +0900)]
Add DA feature newly

da feature contains many da models as well as fhub

Change-Id: I6094be712d02db52f9f0164ab54b1620c558c6d8
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
19 months agofhub: remove duplicate code in bluetooth_hf_audio_mute API 77/282277/1 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.060830 accepted/tizen/7.0/unified/hotfix/20221116.105140 accepted/tizen/unified/20221006.065308 accepted/tizen/unified/20221006.065347 tizen_7.0_m2_release
Ayush Garg [Thu, 29 Sep 2022 09:12:06 +0000 (14:42 +0530)]
fhub: remove duplicate code in bluetooth_hf_audio_mute API

Change-Id: I914d10f81e998c4f9d208ece96c3706fce3905e9
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
19 months agofhub: terminate bt-core when the core adapter status is abnormal 03/281703/1
Ayush Garg [Wed, 21 Sep 2022 02:13:33 +0000 (07:43 +0530)]
fhub: terminate bt-core when the core adapter status is abnormal

when BT core status is abnormal (ex. recursive BT module detachment),
bt-core process is not terminated because of it is recovery mode.
then the core adapter status is stuck in BT_DEACTIVATING status,
after that the BT adapter can't be enabled / disabled.

So, in bt_check_terminating_condition, add check core status and recovery mode.
if it is abnormal, let the bt-core be terminated.

Change-Id: I48e4903e448e54743469afbd7b59d8cec7d520d2
Signed-off-by: shss-choi <shss.choi@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
19 months agofhub: add DA features 02/281702/1
Ayush Garg [Tue, 20 Sep 2022 08:18:26 +0000 (13:48 +0530)]
fhub: add DA features

Applied patches:
- add bluetooth_hf_audio_mute api
- modify to set BT frwk adapter state to 'deactived' when
adapter_enable is failed abnormally

Change-Id: Ifc77646b0ef4cac509c88b647d86855baa658d3e
Signed-off-by: shss-choi <shss.choi@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
19 months agofhub: reject A2DP sink/HF/AVRCP CT profile connect request when local a2dp role is... 01/281701/1
Ayush Garg [Tue, 20 Sep 2022 07:29:21 +0000 (12:59 +0530)]
fhub: reject A2DP sink/HF/AVRCP CT profile connect request when local a2dp role is source

Change-Id: I83a0c8c132945971acd4dde3e840f8b43c91e14b
Signed-off-by: shss-choi <shss.choi@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
19 months agofhub: reject A2DP(sink)/AVRCP(controller) multi connection 00/281700/1
Ayush Garg [Tue, 20 Sep 2022 06:46:28 +0000 (12:16 +0530)]
fhub: reject A2DP(sink)/AVRCP(controller) multi connection

if there is connected A2DP source device,
reject incoming A2DP(local: sink, remote: source) connection.
if there is connected AVRCP target device,
reject incoming AVRCP(local: CT, remote: TG) connection.

Change-Id: Id455b77641977c921eec936aaa4aa98552619652
Signed-off-by: shss-choi <shss.choi@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
19 months agofhub: set general discoverable mode to default 76/281476/2
Ayush Garg [Mon, 19 Sep 2022 09:13:19 +0000 (14:43 +0530)]
fhub: set general discoverable mode to default

in first booting, set discoverable mode to general discoverable mode (visibility on)

Change-Id: I3905052489abea0e2c68212f1b1312c065d3cb27
Signed-off-by: shss-choi <shss.choi@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
19 months agofhub: Add new profile for Family Hub 75/281475/2
Ayush Garg [Fri, 16 Sep 2022 04:39:17 +0000 (10:09 +0530)]
fhub: Add new profile for Family Hub

Change-Id: If609de47a88749fa2029b0d64048c9d0a5e21154
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
20 months agoExclude files from SAM analysis 61/280561/2
Anuj Jain [Wed, 31 Aug 2022 16:36:16 +0000 (22:06 +0530)]
Exclude files from SAM analysis

Files having calls to library functions of gio/gio.h are excluded as
they have similar syntax leading to duplicate code.

Change-Id: I8307dffcca0b22136573f840a835298531edc0cc
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
20 months agoMerge "Refactoring of Code to improve SAM score Patch-5" into tizen
Pyun DoHyun [Mon, 5 Sep 2022 03:01:22 +0000 (03:01 +0000)]
Merge "Refactoring of Code to improve SAM score Patch-5" into tizen

20 months agoMerge "Refactoring of Code to improve SAM score Patch-4" into tizen
Pyun DoHyun [Mon, 5 Sep 2022 03:01:19 +0000 (03:01 +0000)]
Merge "Refactoring of Code to improve SAM score Patch-4" into tizen

20 months agoMerge "Refactoring of Code to improve SAM score Patch-3" into tizen
Pyun DoHyun [Mon, 5 Sep 2022 03:01:16 +0000 (03:01 +0000)]
Merge "Refactoring of Code to improve SAM score Patch-3" into tizen

20 months agoMerge "Refactoring of Code to improve SAM score Patch-2" into tizen
Pyun DoHyun [Mon, 5 Sep 2022 03:01:13 +0000 (03:01 +0000)]
Merge "Refactoring of Code to improve SAM score Patch-2" into tizen

20 months agoMerge "Refactoring of Code to improve SAM score Patch-1" into tizen
Pyun DoHyun [Mon, 5 Sep 2022 03:01:11 +0000 (03:01 +0000)]
Merge "Refactoring of Code to improve SAM score Patch-1" into tizen

20 months agoRefactoring of Code to improve SAM score Patch-5 60/280560/2
Anuj Jain [Wed, 31 Aug 2022 16:34:35 +0000 (22:04 +0530)]
Refactoring of Code to improve SAM score Patch-5

Remove Duplicate code:

- Move duplicate functions to common accessible file.
- Implement new function in common file for duplicate code segment.

Change-Id: Id2e205e587a21e195aba7474b9165f8ac36b06b7
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
20 months agoRefactoring of Code to improve SAM score Patch-4 59/280559/2
Anuj Jain [Wed, 31 Aug 2022 16:26:37 +0000 (21:56 +0530)]
Refactoring of Code to improve SAM score Patch-4

Remove duplicated code:

- Create new common file and move duplicate function to it.

Change-Id: I715b5806174d05a3febb58752519ee8681c23e7b
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
20 months agoRefactoring of Code to improve SAM score Patch-3 58/280558/2
Anuj Jain [Wed, 31 Aug 2022 16:22:02 +0000 (21:52 +0530)]
Refactoring of Code to improve SAM score Patch-3

Remove duplicated code:

- Add sub function for duplicated code.

Change-Id: I4defc0de7c9f67ef397af58776cd3d04eaf0e7d2
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
20 months agoRefactoring of Code to improve SAM score Patch-2 57/280557/4
Anuj Jain [Wed, 31 Aug 2022 16:19:16 +0000 (21:49 +0530)]
Refactoring of Code to improve SAM score Patch-2

Remove duplicated code:

- Add sub function for duplicated code.

Change-Id: I4907f1d86e0530500ddff2a6777e8ef7eab5ea9a
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
20 months agoRefactoring of Code to improve SAM score Patch-1 56/280556/1
Anuj Jain [Wed, 31 Aug 2022 16:15:29 +0000 (21:45 +0530)]
Refactoring of Code to improve SAM score Patch-1

Remove duplicated code:

- Implement common function for functions with duplicated code.

Change-Id: I87c245bbe393a120439de23ec1395424a3dd1fa6
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
20 months agoFix the issue that the data is not fully delivered 89/280489/2
Wootak Jung [Wed, 31 Aug 2022 01:42:03 +0000 (10:42 +0900)]
Fix the issue that the data is not fully delivered

I/BLUETOOTH_FRWK_API( 3421): bt-l2cap-le-client.c: __write_all(542) > written: 122, len 122
I/BLUETOOTH_FRWK_API( 3421): bt-l2cap-le-client.c: __write_all(544) > index 0 : data 79
I/BLUETOOTH_FRWK_API( 3421): bt-l2cap-le-client.c: __write_all(544) > index 1 : data 1a
I/BLUETOOTH_FRWK_API( 3421): bt-l2cap-le-client.c: __write_all(544) > index 2 : data 77
I/BLUETOOTH_FRWK_API( 3421): bt-l2cap-le-client.c: __write_all(544) > index 3 : data 8b
..
I/BLUETOOTH_HAL( 9157): bt-hal-l2cap-le-dbus-handler.c: app_event_cb(255) > len: 3
I/BLUETOOTH_HAL( 9157): bt-hal-l2cap-le-dbus-handler.c: app_event_cb(257) > Received data, index: 0 : 79
I/BLUETOOTH_HAL( 9157): bt-hal-l2cap-le-dbus-handler.c: app_event_cb(257) > Received data, index: 1 : 1a
I/BLUETOOTH_HAL( 9157): bt-hal-l2cap-le-dbus-handler.c: app_event_cb(257) > Received data, index: 2 : 77
D/BLUETOOTH_HAL( 9157): bt-hal-l2cap-le-dbus-handler.c: write_all(191) > len 3
I/BLUETOOTH_HAL( 9157): bt-hal-l2cap-le-dbus-handler.c: write_all(197) > written 3

Change-Id: I4ee146230c0113592a45ad1c39f9bb6bc71cf6b5

20 months agoMerge "Modify authorize to FALSE in l2cap le connection" into tizen accepted/tizen/unified/20220823.131823 submit/tizen/20220816.082553 submit/tizen/20220822.114248
Wootak Jung [Tue, 9 Aug 2022 22:41:02 +0000 (22:41 +0000)]
Merge "Modify authorize to FALSE in l2cap le connection" into tizen

20 months agoModify authorize to FALSE in l2cap le connection 13/279413/1
Wootak Jung [Tue, 9 Aug 2022 04:19:22 +0000 (13:19 +0900)]
Modify authorize to FALSE in l2cap le connection

Change-Id: Icf4d8a51acc444765a9b61224a3a5d3fd26bfa65

21 months agoGATT: Add support for multiple services and descriptors with same UUID. 59/279059/1
Anuj Jain [Mon, 1 Aug 2022 09:16:58 +0000 (14:46 +0530)]
GATT: Add support for multiple services and descriptors with same UUID.

This patch adds support to handle GATT operations on
1. Multiple Services with same UUID.
2. Multiple Descriptors with same UUID.

Change-Id: I946183cb5c5fcc4e4d9ff2fbad2f807419b6ade5
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
21 months agoFix the crash issue when name changed 30/278930/1
Wootak Jung [Thu, 28 Jul 2022 01:48:19 +0000 (10:48 +0900)]
Fix the crash issue when name changed

Change-Id: Ie2f9290f250d1def551c6c31272970c832ce36ed

21 months agoFix paired device array exceed issue 29/278929/1
Wootak Jung [Wed, 27 Jul 2022 23:28:30 +0000 (08:28 +0900)]
Fix paired device array exceed issue

bt-hal-adapter-dbus-handler.c: __bt_adapter_bonded_devices_cb(1765) >\
Send Adapter properties changed event to HAL user, Num Prop [1] total size [1031]

Change-Id: I516b66587484c4a4ace363a34bf497ef319515b7

22 months agoAdd support for multiple charateristics with same UUID 59/277359/1
Anuj Jain [Tue, 5 Jul 2022 12:32:37 +0000 (18:02 +0530)]
Add support for multiple charateristics with same UUID

This patch adds support to handle GATT operations on multiple
characteristics of a Service with same UUID.

Change-Id: Ic3574862d76a050baf9e2ebb0e90e8767a4bbfbf
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
22 months agobt-api: Add container handling logic 71/276871/1 accepted/tizen/unified/20220629.152913 accepted/tizen/unified/20220629.152919 submit/tizen/20220627.234633 submit/tizen/20220627.235246
Wootak Jung [Mon, 27 Jun 2022 08:14:21 +0000 (17:14 +0900)]
bt-api: Add container handling logic

Don't read vconf to check le status

Change-Id: Idae35113635cdc0d51ca5cc6930b0cc737da6855

22 months agoFix Dereferencing of NULL pointer error 62/276262/1
Anuj Jain [Mon, 13 Jun 2022 13:44:06 +0000 (19:14 +0530)]
Fix Dereferencing of NULL pointer error

Change-Id: Ia3e1e098401ffe0e3ff4ec23b4bae601be570c08
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
23 months agoRemove unnecessary logs and update internal functions as static 00/275900/1 accepted/tizen/unified/20220615.135349 submit/tizen/20220614.010252
Anuj Jain [Mon, 6 Jun 2022 08:24:40 +0000 (13:54 +0530)]
Remove unnecessary logs and update internal functions as static

Change-Id: I42e6413c5350c19c3fc79bc33b474f79e4b8e404
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
23 months agoModify platform scan filter logic 92/275492/2 submit/tizen/20220531.044319 submit/tizen/20220601.225953
Wootak Jung [Thu, 26 May 2022 01:05:03 +0000 (10:05 +0900)]
Modify platform scan filter logic

Add vendor filter flag
Don't request filter operation to oal if vendor filter not supported

Change-Id: Idcdca2f1b98ed9d079035a5d00641628fb17e4f5

23 months agoFix bt-service crash issue in FHub product 95/274695/3
Anuj Jain [Fri, 6 May 2022 07:19:32 +0000 (12:49 +0530)]
Fix bt-service crash issue in FHub product

This patch fixes bt-service crash occuring due to array overflow.

Change-Id: Idde2cccd6e31c2c5fdafc06add7fff6745339fcd
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
2 years agoFix crash issue in FHub product 91/274391/1 accepted/tizen/unified/20220503.071444 submit/tizen/20220502.051527 submit/tizen/20220502.224718
Ayush Garg [Wed, 27 Apr 2022 10:25:45 +0000 (15:55 +0530)]
Fix crash issue in FHub product

Backtrace:
4  0xb62d7a4e in g_malloc0 (n_bytes=n_bytes@entry=4294967295) at ../glib/gmem.c:134 --> libglib (rpm)
5  0x00472432 in __bt_set_multi_adv_param (adv_setup=adv_setup@entry=0xbe0db954, adv_data=adv_data@entry=0xbe0dba5c, length=length@entry=2) at /usr/src/debug/bluetooth-frwk-0.6.0/bt-service/services/adapter/bt-service-core-adapter-le.c:1467 --> bluetooth-frwk-service (rpm)
6  0x004729b4 in _bt_set_scan_response_data (sender=0x518228 ":1.108", adv_handle=5764800, response=response@entry=0xbe0dba5c, length=2, use_reserved_slot=use_reserved_slot@entry=0) at /usr/src/debug/bluetooth-frwk-0.6.0/bt-service/services/adapter/bt-service-core-adapter-le.c:1768 --> bluetooth-frwk-service (rpm)

The crash was occuring due to incorrect manufacturer
length.
This patch fixes the same.

Change-Id: I16cfd653e46615ed5fa386a6e8281591526ff689
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
2 years agoFix the ADV crash issue in FHub product 32/274332/1
Ayush Garg [Tue, 26 Apr 2022 10:26:15 +0000 (15:56 +0530)]
Fix the ADV crash issue in FHub product

Backtrace:
0  0xb2c5a112 in __bt_hal_parse_uuid (len=len@entry=44300, src=0x0, src@entry=0x102 <error: Cannot access memory at address 0x102>, dest=dest@entry=0xbe3747b4 "", length=0xbe3747ac, length@entry=0xbe37478c, is_solicit=is_solicit@entry=1) at /usr/include/bits/string_fortified.h:34 --> bluetooth-frwk-oal (rpm)
1  0xb2c5b2d2 in _bt_hal_set_advertising_data (adv_param_setup=...) at /usr/src/debug/bluetooth-frwk-0.6.0/bt-oal/bluez_hal/src/bt-hal-adapter-le.c:802 --> bluetooth-frwk-oal (rpm)

The crash was occuring due to parsing of wrong appearance
characteristic length.
This patch fixes the same.

Change-Id: I48524f69158b7fd3ac01811f05f2d9dbfe139fc6
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
2 years agoFix unnecessary event sending issue 49/273949/1
Wootak Jung [Tue, 19 Apr 2022 01:34:43 +0000 (10:34 +0900)]
Fix unnecessary event sending issue

passkey conformation event is not required in auto accept case

Change-Id: Idff8dc50b14416487ec358154fd7704aa95149ec

2 years agoChange the privilege level for L2CAP listen related functions 68/273668/1
Wootak Jung [Tue, 12 Apr 2022 02:19:30 +0000 (11:19 +0900)]
Change the privilege level for L2CAP listen related functions

Change-Id: Ic5b577ab81a643e6b969e865eeb3daf204838cc5

2 years agoLE CoC: Fix LE_L2CAP socket connection timeout issue 43/273343/1
Anuj Jain [Mon, 4 Apr 2022 12:53:02 +0000 (18:23 +0530)]
LE CoC: Fix LE_L2CAP socket connection timeout issue

This patch fixes the issue of non occurence of authentication
pop-up upon connection request by client.

Change-Id: Iea5e1807c6c577baf8fe9b43da4053df97bbbc0b
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
2 years agoFix svace issue 60/272560/1 accepted/tizen/unified/20220323.062643 submit/tizen/20220322.002237
Wootak Jung [Mon, 21 Mar 2022 02:34:39 +0000 (11:34 +0900)]
Fix svace issue

Remove unnecessary check logic

Change-Id: I50ad8b43185c81722b85102de41d0b1057ba8ad1

2 years agoLE CoC: Fix socket events not coming in client role 25/272425/1
Ayush Garg [Wed, 16 Mar 2022 07:25:18 +0000 (12:55 +0530)]
LE CoC: Fix socket events not coming in client role

This patch will add the support for registering
L2CAP LE socket client events.

Change-Id: If991e7f5ed3cb2b79070fbc6daceff47482b70fe
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
2 years agoLE CoC: Fix build issue for aarch64 89/272289/1 accepted/tizen/unified/20220318.133048 submit/tizen/20220313.220938 submit/tizen/20220314.225934 submit/tizen/20220316.003414 submit/tizen/20220317.013237
Ayush Garg [Mon, 14 Mar 2022 06:39:44 +0000 (12:09 +0530)]
LE CoC: Fix build issue for aarch64

Change-Id: I2fc506e2ca46803d20275d4ec91c4693caee04be
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
2 years agoMerge "Remove mobile profile specific logic" into tizen
Wootak Jung [Fri, 11 Mar 2022 05:42:44 +0000 (05:42 +0000)]
Merge "Remove mobile profile specific logic" into tizen

2 years agoLE CoC: Add FRWK APIs for L2CAP_LE type socket 64/272064/1
Ayush Garg [Mon, 7 Mar 2022 06:28:00 +0000 (11:58 +0530)]
LE CoC: Add FRWK APIs for L2CAP_LE type socket

This patch adds the following:
- Export APIs to create and remove L2CAP_LE socket
- Export APIs to listen, connect and disconnect to
L2CAP_LE socket
- Implement event handler for connection, disconnection
and authorization.

Change-Id: I7808664b833da9f0625b75d7fe4640fdd3cd52b3
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
2 years agoRemove mobile profile specific logic 22/272022/2
Wootak Jung [Mon, 7 Mar 2022 01:31:58 +0000 (10:31 +0900)]
Remove mobile profile specific logic

Change-Id: I3d6cdfa86cca2582dd8de3532f33bbaf467201b7

2 years agoLE CoC: Add support for L2CAP_LE type socket in bt-service 53/271753/2
Ayush Garg [Wed, 23 Feb 2022 10:58:48 +0000 (16:28 +0530)]
LE CoC: Add support for L2CAP_LE type socket in bt-service

This patch adds the following:
- Implement methods to connect and listen to SOCK_TYPE_L2CAP_LE
Socket.
- Implement methods to authorize(accept/reject) incoming L2CAP_LE
connection.

Change-Id: If47da01dc9a867d892ced3f847927213da9b66cf
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
2 years agoLE CoC: Add support for L2CAP_LE type socket in OAL 57/271557/1
Ayush Garg [Mon, 21 Feb 2022 10:44:26 +0000 (16:14 +0530)]
LE CoC: Add support for L2CAP_LE type socket in OAL

This patch adds support for OAL_SOCK_L2CAP_LE type
socket.

Change-Id: I190535687e7eb312535b5ff5584f51fcac47ec38
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
2 years agoLE CoC: Add HAL implementation for L2CAP_LE type socket 37/271437/2
Ayush Garg [Mon, 21 Feb 2022 07:43:45 +0000 (13:13 +0530)]
LE CoC: Add HAL implementation for L2CAP_LE type socket

This patch adds following
- Implement HAL interface to create and remove L2CAP_LE Socket
- Implement HAL interface to listen and connect to L2CAP_LE Socket
- Support for L2CAP_LE socket authorization

Change-Id: Ifd4297f77a327ded5b7f51a3bc56c72f1416c9f1
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
2 years agoStore EIR Manufacturer specific data into the device information 23/270223/1 accepted/tizen/unified/20220206.211909 submit/tizen/20220127.054201
dh79pyun [Thu, 27 Jan 2022 00:44:26 +0000 (09:44 +0900)]
Store EIR Manufacturer specific data into the device information

Change-Id: Ia3d9d62db972f394d30b9db934bbceee6977098f
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
2 years agoDon't allow the invalid ADV handle 12/269312/1 accepted/tizen/unified/20220117.135002 submit/tizen/20220112.235928
dh79pyun [Wed, 12 Jan 2022 23:40:52 +0000 (08:40 +0900)]
Don't allow the invalid ADV handle

Change-Id: Ieca085a04733bcfdc69d028d9fde8205d21f1c67
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
2 years agoMerge "Fix Svace Issues" into tizen submit/tizen/20220110.224444
Pyun DoHyun [Tue, 11 Jan 2022 22:55:55 +0000 (22:55 +0000)]
Merge "Fix Svace Issues" into tizen

2 years agoFix Svace Issues 73/269073/3
Anuj Jain [Fri, 7 Jan 2022 07:38:41 +0000 (13:08 +0530)]
Fix Svace Issues

This patch fixes scave issues:
473071: DIVISION_BY_ZERO
473376: MEMORY_LEAK

Change-Id: I8818accf1d7ff5a5b8adbbd2311e82d292f9b568
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
2 years agoDisable the factory test mode in TV product 39/269039/1
dh79pyun [Fri, 7 Jan 2022 02:54:44 +0000 (11:54 +0900)]
Disable the factory test mode in TV product

Change-Id: I93dcce0afdf3425f7fd7763d5733426c852dc3b6
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
2 years agoReplace g_memdup to g_memdup2 84/267884/1 accepted/tizen/unified/20211222.230419 submit/tizen/20211212.233427
dh79pyun [Mon, 13 Dec 2021 02:25:50 +0000 (11:25 +0900)]
Replace g_memdup to g_memdup2

Change-Id: Ia7c3a7341073df0de79fb725435a3c47ccbca20c
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
2 years agoMerge "Add a function to find remote client info matched addr and inst id" into tizen
Pyun DoHyun [Tue, 7 Dec 2021 22:09:53 +0000 (22:09 +0000)]
Merge "Add a function to find remote client info matched addr and inst id" into tizen

2 years agoFix invalid unique name issue 74/267474/1 accepted/tizen/unified/20211207.133118 submit/tizen/20211206.062656
Wootak Jung [Mon, 6 Dec 2021 05:05:54 +0000 (14:05 +0900)]
Fix invalid unique name issue

I/BLUETOOTH_FRWK_SERVICE(  392): bt-service-main.c: __on_log_glib(85) >
g_variant_new_string: assertion 'g_utf8_validate (string, -1, NULL)' failed
E/CYNARA  (  392): Getting client credentials by calling dbus method
GetConnectionCredentials on Id <:1.19482`��U> failed with error
<GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get
credentials of name '[Invalid UTF-8]': no such name>

Change-Id: I296767876dc143449d8147e00cc3d302ce0378d8

2 years agoAdd a function to find remote client info matched addr and inst id 70/267470/1
Wootak Jung [Mon, 6 Dec 2021 04:26:36 +0000 (13:26 +0900)]
Add a function to find remote client info matched addr and inst id

Change-Id: Ifed5672d2302910a7d9521b2644535a475c432f8

2 years agoChange if statement order to set the visible mode 34/267234/1 accepted/tizen/unified/20211202.120751 submit/tizen/20211201.061349
dh79pyun [Tue, 30 Nov 2021 05:46:35 +0000 (14:46 +0900)]
Change if statement order to set the visible mode

The prioriy of the model name is higer than the
profile name.

Change-Id: Id28d03145f433da07d9b3b7ccc33848c5f6f92a5
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
2 years agoEnable the default connectable mode for the commom profile 76/267076/1 accepted/tizen/unified/20211126.111806 accepted/tizen/unified/20211130.125450 submit/tizen/20211124.060921 submit/tizen/20211129.075122
dh79pyun [Thu, 25 Nov 2021 04:29:08 +0000 (13:29 +0900)]
Enable the default connectable mode for the commom profile

Change-Id: Id7f4e80608d59e7df9dc0f6f3f6ee0ca71a5d017
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
2 years agoAdd the logic for checking privilege to container 45/266745/2
Wootak Jung [Thu, 18 Nov 2021 06:20:33 +0000 (15:20 +0900)]
Add the logic for checking privilege to container

Change-Id: Iffa438bd53b6ef0e5eee8165a5bb0f286f631898

2 years agoSet the connectable mode in IOT profile 22/266522/1 submit/tizen/20211114.231048
dh79pyun [Mon, 15 Nov 2021 02:11:24 +0000 (11:11 +0900)]
Set the connectable mode in IOT profile

Change-Id: I5fbdcf58781eeaef725fa46a625428762b740f9e
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
2 years agoCheck the privilege for register profile method 42/266342/1
dh79pyun [Wed, 10 Nov 2021 22:58:49 +0000 (07:58 +0900)]
Check the privilege for register profile method

Change-Id: I17e2b1977b22f1fa7bca19a84cc2d4d2269d4043
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
2 years agoAdd container request check logic 54/266254/2
Wootak Jung [Wed, 10 Nov 2021 01:21:28 +0000 (10:21 +0900)]
Add container request check logic

Change-Id: I8f7419f03e4937c9d41ece4a704b8f411ad04227

2 years agoIncrease the version 05/266105/2
dh79pyun [Mon, 8 Nov 2021 02:31:19 +0000 (11:31 +0900)]
Increase the version

Change-Id: I18d63c47d55e622fb7b8ace91e11e6b7e2798740
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>