platform/upstream/bluez.git
7 weeks agoMerge "adapter: Fix storing IRK causing invalid read" into tizen_7.0 accepted/tizen_7.0_unified tizen_7.0 accepted/tizen/7.0/unified/20250422.163711
Wootak Jung [Tue, 22 Apr 2025 02:00:09 +0000 (02:00 +0000)]
Merge "adapter: Fix storing IRK causing invalid read" into tizen_7.0

8 weeks agoadapter: Fix storing IRK causing invalid read 43/322843/2
Luiz Augusto von Dentz [Fri, 22 Oct 2021 20:10:09 +0000 (13:10 -0700)]
adapter: Fix storing IRK causing invalid read

When storing an IRK the storage file may not have been created yet
since that uses the device address which is likely changed to the
identity address causing the following trace:

Invalid read of size 8
   at 0x196452: store_irk.constprop.0 (adapter.c:8679)
   by 0x198C92: new_irk_callback (adapter.c:8737)
   by 0x1CF6DC: queue_foreach (queue.c:207)
   by 0x1D1394: process_notify (mgmt.c:308)
   by 0x1D1394: can_read_data (mgmt.c:374)
   by 0x1E0634: watch_callback (io-glib.c:157)
   by 0x4954A9E: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.6600.8)
   by 0x49A6A97: ??? (in /usr/lib64/libglib-2.0.so.0.6600.8)
   by 0x4954162: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.6600.8)
   by 0x1E0CD4: mainloop_run (mainloop-glib.c:66)
   by 0x1E10B1: mainloop_run_with_signal (mainloop-notify.c:188)
   by 0x12E3FC: main (main.c:1210)
 Address 0x6534418 is 8 bytes inside a block of size 16 free'd

Change-Id: I55ecfc9864003c6676029a024696addba04757cf
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
8 weeks agoadapter: Change bonding_timeout from 120seconds to 40seconds 95/322795/1 accepted/tizen/7.0/unified/20250418.085610
heejeong.woo [Thu, 10 Apr 2025 11:59:56 +0000 (20:59 +0900)]
adapter: Change bonding_timeout from 120seconds to 40seconds

Change-Id: I82c6c8ab018c80d98b5b90ef24f2a10c10bb0813
Signed-off-by: heejeong.woo <heejeong.woo@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
2 months agoAdd new DA model types 53/321553/2 accepted/tizen/7.0/unified/20250326.132859
Wootak Jung [Tue, 25 Mar 2025 06:05:46 +0000 (15:05 +0900)]
Add new DA model types

- Water Purifier(AI Home)
- Wine Cellar(AI Vision)

Change-Id: Ic891b28baf16cd46d507d4ef56c13a9c586d3c07
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 months agodevice: Fix LE bond created cb not occured issue 20/321120/1 accepted/tizen/7.0/unified/20250320.061617
Wootak Jung [Fri, 14 Mar 2025 01:32:29 +0000 (10:32 +0900)]
device: Fix LE bond created cb not occured issue

Change-Id: Iff3b087ab47a35efc3abfe0c410afd7d64615398
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 months agodevice: Fix to report Paired event after services resolved in LE bond 28/319928/2 accepted/tizen/7.0/unified/20250220.162436
Sohyeon Choi [Tue, 18 Feb 2025 03:58:50 +0000 (12:58 +0900)]
device: Fix to report Paired event after services resolved in LE bond

- emit Paired after LE services resolving done in LE bond procedure.
- do not set GATT connected status when the connection is for LE bond.

Change-Id: I270f7042388eec718a398716a57c8b4cf73ca683
Signed-off-by: Sohyeon Choi <shss.choi@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
4 months agodevice: Fix issue with LE bonding-io closing before gatt client is ready 94/319494/2 accepted/tizen/7.0/unified/20250218.165110
Wootak Jung [Wed, 12 Feb 2025 01:11:48 +0000 (10:11 +0900)]
device: Fix issue with LE bonding-io closing before gatt client is ready

Change-Id: Ia2961de4bd9de3a7e947607173488e0617003a95
Signed-off-by: Sohyeon Choi <shss.choi@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
4 months agoFix DA device Bonding/Unbonding issue 08/319408/1 accepted/tizen/7.0/unified/20250212.164004
Anuj Jain [Mon, 10 Feb 2025 12:55:45 +0000 (18:25 +0530)]
Fix DA device Bonding/Unbonding issue

This Patch fixes the irregularity in device reference count.

Change-Id: If4d0df0a6de3a708ecfc6b998cfaab6b5ff3db9f
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
4 months agodevice: Fix LE bonding-io double free issue 72/318472/1 accepted/tizen/7.0/unified/20250123.171836
Wootak Jung [Fri, 17 Jan 2025 06:36:12 +0000 (15:36 +0900)]
device: Fix LE bonding-io double free issue

io will be unref on g_attrib_unref().
g_io_channel_unref(attrib->io);

Change-Id: If8fe1b29a1f8af1d226aeb9efc31567c355f02af
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
5 months agoget device type instead of model name to check DA devices 69/317069/2 accepted/tizen/7.0/unified/20241227.151103
Sohyeon Choi [Mon, 23 Dec 2024 04:13:45 +0000 (13:13 +0900)]
get device type instead of model name to check DA devices

Change-Id: I7a0f0da79165cc8efbef12ef0df0a2d473425adb
Signed-off-by: Sohyeon Choi <shss.choi@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
5 months agoshared/gatt-client: Do not read device name gatt char in DA 39/316739/3 accepted/tizen/7.0/unified/20241219.160525
Sohyeon Choi [Fri, 13 Dec 2024 06:19:53 +0000 (15:19 +0900)]
shared/gatt-client: Do not read device name gatt char in DA

if remote adv is non-discoverable and not bonded,
request for reading GATT characterisitic device name (2A00) makes confirm popup for security.
to prevent unnecessary popup, Do not read device name in DA products.

Change-Id: Id3067e8e1ec83ec0c5c985022b9164822fd6780c
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
6 months agodevice: Fix issue where the le connection was not completely released when le bond... 23/315523/1 accepted/tizen/7.0/unified/20241217.173206
Wootak Jung [Fri, 29 Nov 2024 00:41:45 +0000 (09:41 +0900)]
device: Fix issue where the le connection was not completely released when le bond completed

Change-Id: I5069dc4e7f005f019af4cb370698510aaf0ef4c0
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
6 months agoadapter: Fix the reusing gerror without re-initialization 22/315522/1
Tedd Ho-Jeong An [Fri, 11 Feb 2022 02:00:52 +0000 (18:00 -0800)]
adapter: Fix the reusing gerror without re-initialization

When the GError variable is freeed with g_error_free(), it is not set to
NULL and reusing the same variable again can cause the seg_fault because
it is still pointing the old memory address which is freed.

This patch relaces the g_error_free() to g_clear_error() which frees the
variable and set it to NULL if the variable is used in the function
again.

Fixes: 2287c517ca1bd ("adapter: Fix unchecked return value")
Fixes: https://github.com/bluez/bluez/issues/276
Change-Id: Icdf8d253fa436da4b315985b8b66ee824a1d36e1
Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
6 months agoshared/gatt-client: Add op validation check logic and debug log 22/320422/1 accepted/tizen/7.0/unified/20241118.161615
Wootak Jung [Fri, 15 Nov 2024 05:13:23 +0000 (14:13 +0900)]
shared/gatt-client: Add op validation check logic and debug log

Change-Id: Ibb7d302978ad99a93e63a24fc1faac1731be7c39
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
7 months agodevice: Change FHUB logic to DA logic 88/319588/1 accepted/tizen/7.0/unified/20241030.161058
Wootak Jung [Mon, 28 Oct 2024 06:15:04 +0000 (15:15 +0900)]
device: Change FHUB logic to DA logic

Change-Id: I561202a6a4153c7cc0aa8e8c013076ea7a5243e9
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
7 months agogatt-client: Fix use-after-free crash issue 82/319182/1 accepted/tizen/7.0/unified/20241018.012942
Wootak Jung [Thu, 17 Oct 2024 01:53:42 +0000 (10:53 +0900)]
gatt-client: Fix use-after-free crash issue

Change-Id: I4385d6332f0fac3cba33d4a07f410f7d78a81618
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
7 months agoAdds AVRCP get element attribute for FHUB 93/319093/1 accepted/tizen/7.0/unified/20241016.163249
Sameer Kumar [Tue, 15 Oct 2024 06:43:53 +0000 (12:13 +0530)]
Adds AVRCP get element attribute for FHUB

Change-Id: I929a2196ede378fa904326eac4f62f31d3b863f3
Signed-off-by: Sameer Kumar <sameer.kumar@samsung.com>
8 months agoadapter: Fix crash issue 28/319028/1 accepted/tizen/7.0/unified/20241014.165024
Wootak Jung [Thu, 10 Oct 2024 04:29:50 +0000 (13:29 +0900)]
adapter: Fix crash issue

Change-Id: Icf5e484ae079c559d90cbd7cbdecfbede9ad6868
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
8 months agoAdd new DA model name 70/318870/2 accepted/tizen/7.0/unified/20241011.075915
Wootak Jung [Thu, 10 Oct 2024 07:43:01 +0000 (16:43 +0900)]
Add new DA model name

AI Home*

Change-Id: Iae12c95633186948743136cc8697e42cd33c5cc8
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
8 months agogatt-client: Fix crash issue when gatt notification occurs 18/318318/1 accepted/tizen/7.0/unified/20241002.160649
Wootak Jung [Fri, 27 Sep 2024 01:12:20 +0000 (10:12 +0900)]
gatt-client: Fix crash issue when gatt notification occurs

Change-Id: I2e88a7568565639b1b4709e138931b3decc92c5a
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months agoFix Buds reconnection with Fhub Issue. 06/316806/2 accepted/tizen/7.0/unified/20240902.164100
Sameer Kumar [Wed, 28 Aug 2024 10:21:37 +0000 (15:51 +0530)]
Fix Buds reconnection with Fhub Issue.

Change-Id: I0de536ffe7c62a339d63c7d7e574f2ff9ebd57c6
Signed-off-by: Sameer Kumar <sameer.kumar@samsung.com>
9 months agoFix issue with storing info to cache file in DA 51/316851/2
Sohyeon Choi [Thu, 29 Aug 2024 05:31:49 +0000 (14:31 +0900)]
Fix issue with storing info to cache file in DA

Change-Id: Id74f36a9bbbbc6bb91f1cd1b05a28950bb1a7426
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months agoFix timeout issue when acquire notify fails 11/316411/1 accepted/tizen/7.0/unified/20240829.160005
Wootak Jung [Wed, 21 Aug 2024 05:00:07 +0000 (14:00 +0900)]
Fix timeout issue when acquire notify fails

Change-Id: Ic43b1ce1ce36bec3cb52551b54483eedb020f5eb
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
11 months agoFix svace issue (DEREF_OF_NULL) 66/313966/1 accepted/tizen/7.0/unified/20240705.165240
Wootak Jung [Wed, 3 Jul 2024 02:09:44 +0000 (11:09 +0900)]
Fix svace issue (DEREF_OF_NULL)

Change #if to #ifdef

Change-Id: I5e684de618a46c178a23287e1f88031918d39308
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
11 months agoChange cache dir to /run/ for DA model 24/313724/3 accepted/tizen/7.0/unified/20240702.164430
Wootak Jung [Mon, 1 Jul 2024 07:29:03 +0000 (16:29 +0900)]
Change cache dir to /run/ for DA model

Change-Id: Ideda7b9aca1c92ebbfeb96c26474245d01792dc0
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
11 months agoFix Crash issue 98/312898/2 accepted/tizen/7.0/unified/20240620.154529
Anuj Jain [Mon, 17 Jun 2024 05:57:22 +0000 (11:27 +0530)]
Fix Crash issue

This patch fixes crash issue occuring due to access of freed
gatt client pointer.

Change-Id: I064ea4bd624373fde9bbb74923eebd2dc1d081d8
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
12 months agoaudio/transport: Disable set_volume functionality in DA product 01/312101/2 accepted/tizen/7.0/unified/20240605.155451
Wootak Jung [Tue, 4 Jun 2024 07:36:12 +0000 (16:36 +0900)]
audio/transport: Disable set_volume functionality in DA product

Change-Id: Ibca427f5f6824878c0a615f6792a90139b59993a
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
12 months agoAdd new DA model names 92/312092/1
Wootak Jung [Tue, 4 Jun 2024 07:15:21 +0000 (16:15 +0900)]
Add new DA model names

AI Home Smart EHS
Smart Oven
Smart AC
AI Vision Refrigerator

Change-Id: Iddcee26408bf55ac9eba816475ce82046c2ae95c
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
12 months agoGet local IRK value 75/311875/1
Sameer Kumar [Fri, 24 May 2024 10:21:54 +0000 (15:51 +0530)]
Get local IRK value

This patch adds support to get local IRK value.

Change-Id: Iae9293c6d93688d8b9a6672bdaf2261c41668a9f
Signed-off-by: Sameer Kumar <sameer.kumar@samsung.com>
12 months agoRevert "Fix crash issue when destroying notify io" 47/311447/2 accepted/tizen/7.0/unified/20240524.012250
Wootak Jung [Tue, 21 May 2024 08:18:59 +0000 (17:18 +0900)]
Revert "Fix crash issue when destroying notify io"

This reverts commit 50734b06177e2160c3309dfc3aad3aed9b766e39.

Change-Id: I1f0a72a0806df969ff011151e278af09c213164d

12 months agoFix crash issue 23/311423/3
Wootak Jung [Tue, 21 May 2024 02:52:31 +0000 (11:52 +0900)]
Fix crash issue

0  0xaae6c8da in notify_io_destroy (data=0xac2cbcb0) at src/gatt-client.c:1698
1698            DBG("notify_io destroyed. length: %d", queue_length(client->chrc->notify_clients));
(gdb) info args
data = 0xac2cbcb0
(gdb) p client
$1 = (struct notify_client *) 0xac2cbcb0
(gdb) p *client
$2 = {chrc = 0x0, ref_count = 0, owner = 0x0, watch = 0, notify_id = 56}

$1 = (struct notify_client *) 0x55a1388d20
(gdb)
$2 = (struct notify_client *) 0x55a1388d20
(gdb) p *client
p *client
$3 = {chrc = 0x1, ref_count = 0, owner = 0x0, watch = 0, notify_id = 0}

Change-Id: Icb84e5995d7a2cd5ce1447d075a30ce1cc1a2f2f
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
12 months agoFix crash issue when destroying notify io 92/311192/2 accepted/tizen/7.0/unified/20240521.012533
Wootak Jung [Thu, 16 May 2024 02:00:26 +0000 (11:00 +0900)]
Fix crash issue when destroying notify io

0  0x0000005592375a48 in notify_io_destroy (data=0x55a1388d20) at src/gatt-client.c:1692 --> bluez (rpm)
1  0x0000005592373420 in sock_io_destroy (io=0x55a137df70) at src/gatt-client.c:1195 --> bluez (rpm)
2  0x0000005592377900 in characteristic_free (data=0x55a1384570) at src/gatt-client.c:2015 --> bluez (rpm)

Revert "Allow AcquireNotify without CCC"

This reverts commit 4c19ca3b4973feea3e663e3bbd7483d71cb9dabb.

Change-Id: If23642af016fe507c1b14a7b26acb515faf5b894

14 months agodevice: Set disconnect timer to zero for fast disconnection 42/309242/1 accepted/tizen/7.0/unified/20240409.073801 accepted/tizen/7.0/unified/20240409.104411
Sohyeon Choi [Sun, 7 Apr 2024 14:11:32 +0000 (23:11 +0900)]
device: Set disconnect timer to zero for fast disconnection

Change-Id: I8d6d3741b05abb9c2f5a18a34eb197f9a924d149

14 months agogatt: Fix not establishing a socket for each device 72/308772/1 accepted/tizen/7.0/unified/20240401.145447
Luiz Augusto von Dentz [Mon, 24 Jul 2023 20:57:34 +0000 (13:57 -0700)]
gatt: Fix not establishing a socket for each device

AcquireWrite and AcquireNotify shall establish a socket pair for each
device connected otherwise the application cannot distinct the
operations of each client.

Fixes: https://github.com/bluez/bluez/issues/460
Change-Id: I41e63c8ac8164205c43612670ed1cd5d0d09e147

14 months agoavdtp: Modify disconnect timer for Buds2 04/308704/1
Wootak Jung [Fri, 29 Mar 2024 05:19:06 +0000 (14:19 +0900)]
avdtp: Modify disconnect timer for Buds2

Change-Id: Id5f88e3636b80cd222e9c75469ef7c5cea78cd57
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
14 months agodevice: Fix issue where the connection was not completely released when coc disconnected 91/308691/2 accepted/tizen/7.0/unified/20240330.125455
Wootak Jung [Thu, 28 Mar 2024 23:53:25 +0000 (08:53 +0900)]
device: Fix issue where the connection was not completely released when coc disconnected

Change-Id: Ia2cbcea8a3a30a14426645b61631d9fea217c185
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
14 months agoAdd timeout logic for le coc connection request 58/308558/1
Anuj Jain [Wed, 27 Mar 2024 10:27:52 +0000 (15:57 +0530)]
Add timeout logic for le coc connection request

This patch adds 10 sec timeout upon receiving l2cap_le
connection request.

Change-Id: Id4cf266603e64eab8685325f218b1180c9c5b125
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
14 months agodevice: Modify DA specific logic 79/308279/1 accepted/tizen/7.0/unified/20240321.152652
Wootak Jung [Wed, 20 Mar 2024 23:02:02 +0000 (08:02 +0900)]
device: Modify DA specific logic

Change-Id: Ic8d04b2c3c8e45b2a1c5aa86ae7aab6535f75ecd
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
14 months agoRevert "Apply DA model specification" 89/308089/1 accepted/tizen/7.0/unified/20240318.050115
Wootak Jung [Sun, 17 Mar 2024 22:42:11 +0000 (07:42 +0900)]
Revert "Apply DA model specification"

This reverts commit 936def7977917acff76828c02a080d91ecb26b95.

Change-Id: I3741d5136b021a681c0453b47889040ab34d1b6e

15 months agogatt-client: Add debug logs 82/307382/5 accepted/tizen/7.0/unified/20240308.120333
Wootak Jung [Thu, 7 Mar 2024 23:35:40 +0000 (08:35 +0900)]
gatt-client: Add debug logs

Change-Id: Id46df448a9bf77b00ae6168dd04b0e4f38fa3ebe
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
15 months agodevice: Add DA logic to restrict the connection to only one mobile device 32/306932/1 accepted/tizen/7.0/unified/20240304.044929
Wootak Jung [Thu, 29 Feb 2024 02:18:14 +0000 (11:18 +0900)]
device: Add DA logic to restrict the connection to only one mobile device

Change-Id: Ibd4e485a594b2644ef5ab89de8e559a766480cf0
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
16 months agoApply DA model specification 87/305887/2 accepted/tizen/7.0/unified/20240214.013044
Wootak Jung [Tue, 13 Feb 2024 00:21:11 +0000 (09:21 +0900)]
Apply DA model specification

Disable A2DP/AVRCP profiles

Change-Id: Ie20002629367c9383973dba6f900425aa0e9a763
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
16 months agomain_da.conf: Update ReconnectUUIDs and ReconnectAttempts for the DA model 08/304408/2 accepted/tizen/7.0/unified/20240124.062503
Wootak Jung [Wed, 17 Jan 2024 04:14:29 +0000 (13:14 +0900)]
main_da.conf: Update ReconnectUUIDs and ReconnectAttempts for the DA model

Change-Id: I4144ccafaa7b3cff83d960c055be81aed06f8798
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
16 months agoFix issue of not reconnecting when disconnected due to timeout 24/304324/1
Wootak Jung [Tue, 16 Jan 2024 03:53:35 +0000 (12:53 +0900)]
Fix issue of not reconnecting when disconnected due to timeout

Change-Id: I0f263370df9c22d8fdc98ceb33bc1e364b828ba8
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
17 months agoadapter: Fix issue where adv stop request disables unintended instance 54/304154/1 accepted/tizen/7.0/unified/20240115.170647
Wootak Jung [Thu, 11 Jan 2024 00:09:19 +0000 (09:09 +0900)]
adapter: Fix issue where adv stop request disables unintended instance

Reproduction steps:
1. adv1, adv2 are in progress
2. LE connected and adv2 has stopped for a while and is scheduled(timer) to restart
3. adv1 stop request before restart timer is run
4. timer is removed and adv1 is stopped
5. adv2 is not restarted even though it should

Change-Id: I5d2f7a2ae87d87d180e92f380505e8118fc973b0
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
17 months agoadapter: Fix issue where the adv restart logic operates even though adv stop is requested 35/303435/4 accepted/tizen/7.0/unified/20240109.160534
Wootak Jung [Thu, 28 Dec 2023 00:12:59 +0000 (09:12 +0900)]
adapter: Fix issue where the adv restart logic operates even though adv stop is requested

Fix the adv restart logic to only operate when adv is enabled

Change-Id: I9aebdc393050b6c7b3674281ffd801c6db18f14c
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
18 months agogdbus/object: Fix issue where the 'Powered' property changed was not emitted 78/302678/1 accepted/tizen/7.0/unified/20231212.115258
Wootak Jung [Tue, 12 Dec 2023 02:17:48 +0000 (11:17 +0900)]
gdbus/object: Fix issue where the 'Powered' property changed was not emitted

property changed should be emitted after interface is published.

Change-Id: Ibaf34eec7e804a0943e8647285c8da28ef65571a
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
18 months agoshared/att: Fix mtu not updated issue 89/302589/1 accepted/tizen/7.0/unified/20231212.053547
Wootak Jung [Mon, 11 Dec 2023 01:27:49 +0000 (10:27 +0900)]
shared/att: Fix mtu not updated issue

Reproduction steps:
1. gatt connected
2. request to the remote with mtu 517
3. when getting mtu, 517 returned
4. mtu 512 changed received from the remote
5. when getting mtu, 517 returned. (Should be 512)

Change-Id: Ic2c6b19690d7da7572762083ab9577cb3b9e0e97
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
18 months agoAdd new DA model name 04/302504/1
Wootak Jung [Fri, 8 Dec 2023 00:41:55 +0000 (09:41 +0900)]
Add new DA model name

AI Hub Smart EHS

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

18 months agoFix the security vulnerability issue 74/301974/1
Wootak Jung [Tue, 28 Nov 2023 05:51:49 +0000 (14:51 +0900)]
Fix the security vulnerability issue

A variant of this attack works when bluetoothctl shows that bluetooth is
discoverable, pariable, and discovering (only a subset may be necessary). On
Ubuntu 22.04 Desktop this becomes true when the GNOME panel for
bluetooth settings is opened.

BlueZ's setting ClassicBondedOnly=true prevents this attack.
This parameter is not enabled in CVE-2020-0556 patches and all distros
I checked have not opted into this setting. Most members of the distros list
are likely affected.

Change-Id: Ib4883d1766d314bcd415308a9e4805e196462f3a
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
18 months agoAdd new DA model names 76/301876/1 accepted/tizen/7.0/unified/20231128.175749
Wootak Jung [Mon, 27 Nov 2023 00:11:36 +0000 (09:11 +0900)]
Add new DA model names

Bespoke Washer
Bespoke Dryer
Appliance Emulator

Change-Id: Id57796968c980e43f8c552aa22f670eb6b3bdf6e
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
18 months agoAdd support for A2DP source and sink both role 93/301493/1 accepted/tizen/7.0/unified/20231208.173552
Wootak Jung [Wed, 15 Nov 2023 04:21:54 +0000 (13:21 +0900)]
Add support for A2DP source and sink both role

- Change DefaultA2DPRoleSink to DefaultA2DPRole
- Enable both role in DA devices

Change-Id: I51c2a083f55e220d3430723e11d1af61de4fa4b7
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
20 months agomain.conf: Change the TemporaryTimout value to 180 56/299956/1 accepted/tizen/7.0/unified/20231016.045452
Wootak Jung [Fri, 13 Oct 2023 01:10:53 +0000 (10:10 +0900)]
main.conf: Change the TemporaryTimout value to 180

temporary devices will be removed after 180s not 30s

Change-Id: I6741644d7dd1df7d7ea885e7750600ec5614e93e
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
22 months agoAdd new DA model names 63/296863/1 accepted/tizen/7.0/unified/20230808.172157
Wootak Jung [Mon, 7 Aug 2023 00:24:11 +0000 (09:24 +0900)]
Add new DA model names

Change-Id: I411e8ef51a3dafd0cc583ff8da2c6111dbbf99a0
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
23 months agoAdd support for custom advertising flags. 74/295574/1 accepted/tizen/7.0/unified/20230719.021526
Jakub Latusek [Wed, 1 Feb 2023 06:00:13 +0000 (15:00 +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: I2dcbcd053a8de4c4954653ae8a5f55fbed775f66
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
Signed-off-by: Jakub Latusek <j.latusek@samsung.com>
23 months agogatt-database: Add OCF service handling logic 17/295417/1 accepted/tizen/7.0/unified/20230710.155130
Wootak Jung [Thu, 6 Jul 2023 05:59:20 +0000 (14:59 +0900)]
gatt-database: Add OCF service handling logic

1. invalid handle issue
For bluez, the handle increases whenever service is added.
Invalid handle error occurs because mobile caches the handle for paired remote
device. Modify to use reserved handle for ocf uuid.

2. service persistence issue
Mobile is caching without service if gatt connection is lost while service is
removed.
Modify service changed notification not to be delivered for ocf service.

Change-Id: I48d6b649a7adbc3142a2525e02c904271e9b9f9c
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
2 years agoAdd "Smart Cooktop" to DA model 04/293904/1 accepted/tizen/7.0/unified/20230609.165447
Wootak Jung [Thu, 8 Jun 2023 00:44:21 +0000 (09:44 +0900)]
Add "Smart Cooktop" to DA model

Change-Id: Ib62cbde072f59918b69465837fc605ef844a6629
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
2 years agoshared/gatt-server: Fix att length check logic 58/291058/1 accepted/tizen/7.0/unified/20230410.160645
Wootak Jung [Fri, 7 Apr 2023 05:50:34 +0000 (14:50 +0900)]
shared/gatt-server: Fix att length check logic

Change-Id: I04d44a2ae04fbdb69af449035335346a97931933
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
2 years agoRevert "main_da.conf: Change ExchangeMTU value" 69/290769/1 accepted/tizen/7.0/unified/20230405.151601
Wootak Jung [Mon, 3 Apr 2023 04:41:55 +0000 (13:41 +0900)]
Revert "main_da.conf: Change ExchangeMTU value"

This reverts commit 0896e3f493e7a266208b9f845c88741c26e14379.

Change-Id: I8e79b09b6ad29535af7dd97e33f00c900bfc1717

2 years agomain_da.conf: Change ExchangeMTU value 92/289892/1 accepted/tizen/7.0/unified/20230327.150405
Wootak Jung [Wed, 15 Mar 2023 06:48:07 +0000 (15:48 +0900)]
main_da.conf: Change ExchangeMTU value

Change-Id: I11a8a199070f6c0a96981fcfe959c7051653aded

2 years agoadapter_le_vsc_features: Do not set adv_inst_max to 1 in DA case 49/289749/1 accepted/tizen/7.0/unified/20230327.042656
Wootak Jung [Thu, 9 Mar 2023 06:08:51 +0000 (15:08 +0900)]
adapter_le_vsc_features: Do not set adv_inst_max to 1 in DA case

Change-Id: Iecaf149146e335d04e83c1db25c15ec46431593b
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
2 years agoadapter: Add adv data custom name handling logic 48/289748/1
Wootak Jung [Thu, 16 Feb 2023 06:36:58 +0000 (15:36 +0900)]
adapter: Add adv data custom name handling logic

If the name filed is not empty, custom name is already set

Change-Id: Icf5aac6275fc09a3090a47283c994fbc69c9d7c3
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
2 years agoadapter: Fix pending_settings value not clear issue 47/289747/1
Wootak Jung [Tue, 14 Feb 2023 05:14:53 +0000 (14:14 +0900)]
adapter: Fix pending_settings value not clear issue

Remove the duplicated connectable mode setting logic

Change-Id: I994a87907394d705a9c20401aff2719845805f7a
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
2 years agoda: Add DA feature newly 46/289746/1
Wootak Jung [Fri, 27 Jan 2023 09:18:32 +0000 (18:18 +0900)]
da: Add DA feature newly

da feature contains many da models as well as fhub

Use da feature for below functions:
set adv data flag, offloading, log

Change-Id: I34f3b4039b421f7c22e1fca1c5d2a296ee1ee5cf
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
2 years agofhub: apply DA feature (offloading) 45/289745/1
Wootak Jung [Fri, 27 Jan 2023 09:14:54 +0000 (18:14 +0900)]
fhub: apply DA feature (offloading)

Change-Id: Iae80e51a7d7180ef3563fb744e58b4d6dc47f64e
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
2 years agocore: Use timeout_add_seconds 44/289744/1
Wootak Jung [Mon, 5 Dec 2022 04:20:29 +0000 (13:20 +0900)]
core: Use timeout_add_seconds

Replace calls to g_timeout_add_seconds() by the timeout_add_seconds()
wrapper which takes care of 0 delay.

Change-Id: I9b8cc6d6d3f625eb3a51720446b4aaf720ca65ec
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
2 years agofhub: create the bluez log to /run/network/log 43/289743/1
Ayush Garg [Thu, 22 Sep 2022 08:56:49 +0000 (14:26 +0530)]
fhub: create the bluez log to /run/network/log

Change-Id: I6564eeb4b46e142de74587c350c13427b773d04c
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
2 years agoEnable HoG (HID over GATT) plugin 77/287777/3 accepted/tizen/7.0/unified/20230214.172148 accepted/tizen/7.0/unified/20230215.030712
Jonghwa Lee [Mon, 6 Feb 2023 04:01:53 +0000 (13:01 +0900)]
Enable HoG (HID over GATT) plugin

It enables the HoG plugin to support BLE joypad.
To enable the feature only, it adds additional configuration
option, '--enable-hog', and enables it in BREDR+LE as default.
The feature was checked with Xbox wireless controller.

Change-Id: Ia10efbe99565644ba9ed3aacdbad68e7fafae7b2
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2 years agoSeparate bluez-test package into tests and tools 56/284756/2 accepted/tizen/7.0/unified/20221130.171517
Jonghwa Lee [Fri, 25 Nov 2022 06:03:11 +0000 (15:03 +0900)]
Separate bluez-test package into tests and tools

Currently, bluez-test package contains both test programs
and bluez's configuration tools. Because of test scripts
in the pacakge, it has a dependancy to 'dbus-python' which
is not neeeded for other tools in the same package.
By separating of tools from the package, it can become more
deployable.

Change-Id: Id2edb654e2c963a1ba5fc2248acace8d32a732e9
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2 years agoFix the coverity issues 56/281456/1 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.062900 accepted/tizen/7.0/unified/hotfix/20221116.110628 accepted/tizen/unified/20220920.110657 tizen_7.0_m2_release
Wootak Jung [Mon, 19 Sep 2022 07:28:33 +0000 (16:28 +0900)]
Fix the coverity issues

Change-Id: Iea3544fb1a71b9cde9693646b598310777bae66e

2 years agofhub: diallaow A2DP multistream and change avrcp version 38/281338/1
Ayush Garg [Wed, 14 Sep 2022 04:48:52 +0000 (10:18 +0530)]
fhub: diallaow A2DP multistream and change avrcp version

Change-Id: I4f89fe9e46689fc7854b2f7313aca46f41226bc3
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
2 years agofhub: apply DA feature (default a2dp mode, adv data flag) 45/281145/2
Ayush Garg [Tue, 13 Sep 2022 09:19:48 +0000 (14:49 +0530)]
fhub: apply DA feature (default a2dp mode, adv data flag)

Change-Id: I9251ad5ddac62efeb6c743ed086c13f526594c21
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
2 years agofhub: do not support Player Application Settings in AVRCP TG role 48/281048/1
Ayush Garg [Thu, 8 Sep 2022 08:05:29 +0000 (13:35 +0530)]
fhub: do not support Player Application Settings in AVRCP TG role

Change-Id: I566d1fe5aa1dd0e047a7c6bb5614a6d8fc5e4e2b
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
2 years agofhub: Add new profile for Family Hub 20/280820/1
Ayush Garg [Mon, 5 Sep 2022 09:32:21 +0000 (15:02 +0530)]
fhub: Add new profile for Family Hub

Change-Id: I9b3bb497e4359e1e4c33817fab4c7bb8f9a8fb56
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
3 years agoadapter: Set max_filter to 0 not empty if filter not supported 43/275843/2 accepted/tizen/unified/20220615.135403 submit/tizen/20220614.010252
Wootak Jung [Thu, 2 Jun 2022 23:19:55 +0000 (08:19 +0900)]
adapter: Set max_filter to 0 not empty if filter not supported

D/BLUETOOTH_HAL( 6284): bt-hal-adapter-dbus-handler.c:
    __bt_adapter_all_properties_cb(862) > LE Supported features
D/BLUETOOTH_HAL( 6284): bt-hal-adapter-dbus-handler.c:
    __bt_adapter_all_properties_cb(888) > le supported features values are NOT provided by Stack
...
E/BLUETOOTH_HAL( 2510): bt-hal-adapter-le.c:
    _bt_hal_get_available_adv_slot_id(347) > le_adv_slot is NULL
E/BLUETOOTH_HAL( 2510): bt-hal-gatt-server.c:
    bt_hal_gatts_allocate_adv_slot(3637) > failed to get the adv_slot
E/BLUETOOTH_HAL( 2510): bt-hal-gatt-server.c:
    gatt_server_multi_adv_enable(3749) > failed to get adv_slot

Change-Id: I41515e7efa47dbb2255451e845b209a31d0a6b5f

3 years agoMerge "adapter: Disable platform scan filter feature" into tizen submit/tizen/20220531.044319 submit/tizen/20220601.225953
Wootak Jung [Thu, 26 May 2022 22:45:00 +0000 (22:45 +0000)]
Merge "adapter: Disable platform scan filter feature" into tizen

3 years agoadapter: Disable platform scan filter feature 93/275493/1
Wootak Jung [Thu, 26 May 2022 01:04:01 +0000 (10:04 +0900)]
adapter: Disable platform scan filter feature

Change-Id: I27798e150d25068c59706f18eeded947d75ad00b

3 years agoRemove the ceritifcate definition 80/275480/1
Dohyun Pyun [Wed, 25 May 2022 22:34:14 +0000 (07:34 +0900)]
Remove the ceritifcate definition

We will handle the certification logic in the runtime

Change-Id: Ic8b96a2f88d7821f1cdba7c8244618c637e5685d
Signed-off-by: Dohyun Pyun <dh79.pyun@samsung.com>
3 years agoCheck the certification mode in the runtime 89/275389/1
Dohyun Pyun [Mon, 23 May 2022 05:25:26 +0000 (14:25 +0900)]
Check the certification mode in the runtime

Change-Id: Ibde861ed71f0998d61fdbab25681c8226df19ed7
Signed-off-by: Dohyun Pyun <dh79.pyun@samsung.com>
3 years agoModify the packaging for hcidump 91/274891/1
Dohyun Pyun [Wed, 11 May 2022 11:18:15 +0000 (20:18 +0900)]
Modify the packaging for hcidump

Change-Id: I443586fcbc5fe01dae47a8edd826f5875e98751e
Signed-off-by: Dohyun Pyun <dh79.pyun@samsung.com>
3 years agoshared/gatt-server: Add PTS certification logic 49/274749/1
Wootak Jung [Mon, 9 May 2022 01:31:26 +0000 (10:31 +0900)]
shared/gatt-server: Add PTS certification logic

GATT/CL/GAI/BI-01-C
GATT/SR/GAR/BI-04-C
GATT/SR/GAR/BI-10-C
GATT/SR/GAW/BI-12-C

Change-Id: I4fce46e7f2ea669b445767b597d0a6475e71381f

3 years agoaudio/avrcp: Add PTS certification related logic 19/273919/3 accepted/tizen/unified/20220503.071451 submit/tizen/20220419.002311 submit/tizen/20220502.051527 submit/tizen/20220502.224718
Wootak Jung [Mon, 18 Apr 2022 00:55:02 +0000 (09:55 +0900)]
audio/avrcp: Add PTS certification related logic

IOPT/SR/SDSS/BV-02-I

Change-Id: I8d209bd6f2e541870d8e6446522dceb533dfdb0d

3 years agoshared/gatt-server: Add PTS certification related logic 18/273918/3
Wootak Jung [Mon, 18 Apr 2022 00:52:10 +0000 (09:52 +0900)]
shared/gatt-server: Add PTS certification related logic

GATT/SR/GAW/BI-05-C
GATT/SR/GAR/BI-34-C
GATT/SR/GAR/BI-35-C
GATT/SR/GAW/BI-12-C

Change-Id: I049f410d9eecdc490ba275c907891def179ee8c7

3 years agoAdd certificate definition for PTS 17/273917/1
Wootak Jung [Mon, 18 Apr 2022 00:46:42 +0000 (09:46 +0900)]
Add certificate definition for PTS

Change-Id: I3619e2dc82cdd7253e08109ee1345e9e1527c1fd

3 years agoFix svace issue 59/272559/1 accepted/tizen/unified/20220323.062650 submit/tizen/20220322.002237
Wootak Jung [Mon, 21 Mar 2022 02:35:36 +0000 (11:35 +0900)]
Fix svace issue

Remove unnecessary check logic

Change-Id: I39d8c4753d30be92c300bafb7f7aef11d4f7f9b9

3 years agoRemove unnecessary dbus policy 45/272445/1 accepted/tizen/unified/20220318.133040 submit/tizen/20220317.013237
Wootak Jung [Thu, 17 Mar 2022 01:20:10 +0000 (10:20 +0900)]
Remove unnecessary dbus policy

FAILED(assert) at /busconfig/policy[1]/allow[5] : You mustn't use
send_interface without send_destination or send_destination_prefix,
unless you limit the rule to only signals with send_type="signal"

Change-Id: I0074697fa485ea60fe2a1264e7499043cd41a2e6

3 years agoMerge "Add avtest to test rpm" into tizen submit/tizen/20220314.225934 submit/tizen/20220316.003414
Wootak Jung [Mon, 14 Mar 2022 07:58:46 +0000 (07:58 +0000)]
Merge "Add avtest to test rpm" into tizen

3 years agoAdd avtest to test rpm 81/272281/1
Wootak Jung [Mon, 14 Mar 2022 05:20:37 +0000 (14:20 +0900)]
Add avtest to test rpm

Change-Id: I36cb45a3d2f3da08374dff4094ae45a6491984c6

3 years agoUpdate the version to 5.63 bluez_upgrade_5.63 submit/tizen/20220313.220938
Ayush Garg [Fri, 11 Mar 2022 13:40:49 +0000 (19:10 +0530)]
Update the version to 5.63

Change-Id: I04c0b9d1795e7ad9c9b8101f9e69131e43f102a7
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
3 years agoRelease 5.63
Marcel Holtmann [Wed, 5 Jan 2022 21:49:00 +0000 (22:49 +0100)]
Release 5.63

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
3 years agogattrib: Fix passing NULL to memcpy
Luiz Augusto von Dentz [Tue, 21 Dec 2021 20:48:31 +0000 (12:48 -0800)]
gattrib: Fix passing NULL to memcpy

This fixes the following runtime error:

  attrib/gattrib.c:198:2: runtime error: null pointer passed as
  argument 2, which is declared to never be null

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
3 years agobootstrap-configure: Enable sanitizer options
Luiz Augusto von Dentz [Mon, 20 Dec 2021 23:50:52 +0000 (15:50 -0800)]
bootstrap-configure: Enable sanitizer options

This makes bootstrap-configure enables all sanitizers.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
3 years agobuild: Fix build when sanitizer are enabled
Luiz Augusto von Dentz [Mon, 20 Dec 2021 23:51:49 +0000 (15:51 -0800)]
build: Fix build when sanitizer are enabled

This fixes various issues found when sanitizers are enabled.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
3 years agobuild: Add sanitizer options
Luiz Augusto von Dentz [Mon, 20 Dec 2021 23:49:45 +0000 (15:49 -0800)]
build: Add sanitizer options

Build using Address Sanitizer (asan), Leak Sanitizer (lsan), or
Undefined Behavior Sanitizer (ubsan) by using one of these options for
the configure script:

  --enable-asan
  --enable-lsan
  --enable-ubsan

For each of these to work, the compiler must support the requested
sanitizer and the requisite libraries must be installed (libasan,
liblsan, libubsan).

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
3 years agotest-hog: Add monitor support
Luiz Augusto von Dentz [Tue, 21 Dec 2021 19:32:51 +0000 (11:32 -0800)]
test-hog: Add monitor support

This adds monitor support so data can properly be decoded by the likes
of btmon:

= test-hog: /TP/HGRF/RH/BV-01-I - init
= test-hog: /TP/HGRF/RH/BV-01-I - setup
= test-hog: /TP/HGRF/RH/BV-01-I - setup complete
= test-hog: /TP/HGRF/RH/BV-01-I - run
> test-hog: User Data RX
      ATT: Read By Group Type Request (0x10) len 6
        Handle range: 0x0001-0xffff
        Attribute group type: Primary Service (0x2800)

Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
3 years agodevice: Fix bogus errors on load_att_info
Luiz Augusto von Dentz [Wed, 15 Dec 2021 22:48:07 +0000 (14:48 -0800)]
device: Fix bogus errors on load_att_info

load_att_info would attempt to load attributes file from the storage but
in case it doesn't exists it would print an error instead of just
bailing out as attributes file is created on demand when there are
something to be stored.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
3 years agoadvertising: Fix reporting advertising properties
Claudio Takahasi [Wed, 15 Dec 2021 18:05:27 +0000 (15:05 -0300)]
advertising: Fix reporting advertising properties

InterfacesAdded signal for LEAdvertisingManager1 might be emitted
containing initial/default properties values and property changed is
not emitted after reading advertising features. This patch registers
the interface (LEAdvertisingManager1) after reading advertising features
from kernel.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
3 years agoshared/gatt-client: Skip included service if it cannot be resolved
Luiz Augusto von Dentz [Wed, 10 Nov 2021 22:10:53 +0000 (14:10 -0800)]
shared/gatt-client: Skip included service if it cannot be resolved

Instead of failing if the included service cannot be resolved just
skip it so doesn't fail and the discovery is stop due to a possible
application error.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
3 years agobtdev: Add support for BT_HCI_CMD_LE_CREATE_CONN_CANCEL
Luiz Augusto von Dentz [Fri, 10 Dec 2021 23:19:07 +0000 (15:19 -0800)]
btdev: Add support for BT_HCI_CMD_LE_CREATE_CONN_CANCEL

This adds support for BT_HCI_CMD_LE_CREATE_CONN_CANCEL so it is able to
generate proper command complete.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>