platform/core/api/bluetooth.git
8 weeks agoAdd new L2CAP socket API to get the maximum buffer size 01/307401/1 accepted/tizen/7.0/unified/20240330.125439
Wootak Jung [Tue, 27 Feb 2024 04:41:27 +0000 (13:41 +0900)]
Add new L2CAP socket API to get the maximum buffer size

Change-Id: I07346e76772c3d8379f2eb713bb55996fa1d3bba
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 months agoFix crash issue when write_cb is NULL 98/305398/1 accepted/tizen/7.0/unified/20240205.015610
Wootak Jung [Thu, 1 Feb 2024 06:45:38 +0000 (15:45 +0900)]
Fix crash issue when write_cb is NULL

Change-Id: I4dc116d88a8d527ffc865e2fbeeed17e5365fde3
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 months agoFix issue of server disconnect on client disconnection 03/304303/1 accepted/tizen/7.0/unified/20240118.092854
Harsh Jain [Mon, 15 Jan 2024 10:25:25 +0000 (15:55 +0530)]
Fix issue of server disconnect on client disconnection

This patch Address client disconnect initiated in process 1, which leads to unintended disconnection of process 2 server.

Change-Id: I06c204314acd6889e3a6552efb99b1d50b2bc5b6
Signed-off-by: Harsh Jain <jain.harsh@samsung.com>
4 months agoFix gatt connection state changed cb not coming issue 32/303332/1 accepted/tizen/7.0/unified/20231228.060551
Wootak Jung [Thu, 9 Feb 2023 08:08:59 +0000 (17:08 +0900)]
Fix gatt connection state changed cb not coming issue

Regardless of registering new callback,
the callback from previous one should be come

Change-Id: Id37cf39734d4cd8762d1db58733ab94deade601d
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
4 months agoGATT : Fix connection change callback on Client disconnection 31/303331/1
Anuj Jain [Thu, 6 Oct 2022 12:33:21 +0000 (18:03 +0530)]
GATT : Fix connection change callback on Client disconnection

Change-Id: I6f3026f6ecb46e16539bc1d1c7503b3011005593
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
4 months agoAdd new DA model name 99/302499/1 accepted/tizen/7.0/unified/20231212.053549
Wootak Jung [Fri, 8 Dec 2023 00:38:19 +0000 (09:38 +0900)]
Add new DA model name

AI Hub Smart EHS

Change-Id: I88969aba4ea33fa163c5903e14db07af4541f86c
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
4 months agoGATT : Fix Server disconnection state change callback 43/302443/1 accepted/tizen/7.0/unified/20231208.173557
Anuj Jain [Fri, 7 Oct 2022 06:51:45 +0000 (12:21 +0530)]
GATT : Fix Server disconnection state change callback

This patch fixes the issue of GATT server disconnection callback not
received when server connection state change callback is set using
bt_gatt_server_set_connection_state_changed_cb.

This patch also adds some INVALID_INPUT_PARAMETER checks to new GATT
APIs.

Change-Id: Ie651f9822702a7a15c327361cff8ebd34c156613
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
4 months agoGATT : New GATT connect APIs 42/302442/1
Anuj Jain [Thu, 29 Sep 2022 16:33:57 +0000 (22:03 +0530)]
GATT : New GATT connect APIs

This patch saperate the connection state change callbacks for GATT
client and server.
This patch add the following:
-New callback APIs for GATT client and server connection state change
-New GATT client connect API.

Change-Id: Ida1d672db2b41f9a7ea6b210c30dac1e83d929ba
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
5 months agoAdd new DA model names 73/301873/1 accepted/tizen/7.0/unified/20231128.175756
Wootak Jung [Mon, 27 Nov 2023 00:34:42 +0000 (09:34 +0900)]
Add new DA model names

Bespoke Washer
Bespoke Dryer
Appliance Emulator

Change-Id: I927cfef23b0f8f1a15998ac787f69ec4739a0300
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
6 months agoChange the HFP supported device to DA from FHUB 46/300746/1 accepted/tizen/7.0/unified/20231102.181235
Wootak Jung [Wed, 1 Nov 2023 23:20:06 +0000 (08:20 +0900)]
Change the HFP supported device to DA from FHUB

Change-Id: I16145f8c4f14a9a381f87f0d20aff8b37846adbc
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
8 months agoAdd new DA model names 60/296860/1 accepted/tizen/7.0/unified/20230808.172204
Wootak Jung [Mon, 7 Aug 2023 00:26:24 +0000 (09:26 +0900)]
Add new DA model names

Change-Id: I44894b50555d9b1bef70247de467a37f006afcc8
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
9 months agoAdd support for custom advertising flags. 72/295572/2 accepted/tizen/7.0/unified/20230719.021521
Jakub Latusek [Wed, 1 Feb 2023 05:50:11 +0000 (14:50 +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: I4ac31464007f67711ea05a6227a7a46c33b6c8ef
Signed-off-by: Jakub Latusek <j.latusek@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
10 months agoAdd "Smart Cooktop" to DA model 00/293900/1 accepted/tizen/7.0/unified/20230609.165442
Wootak Jung [Thu, 8 Jun 2023 00:38:40 +0000 (09:38 +0900)]
Add "Smart Cooktop" to DA model

Change-Id: Ib41325519adeb07a10698c38b56915c73daad3d0
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
11 months agoFix authentication request cb not coming issue 89/292489/1 accepted/tizen/7.0/unified/20230511.022350
Wootak Jung [Tue, 9 May 2023 01:16:07 +0000 (10:16 +0900)]
Fix authentication request cb not coming issue

If you set the authentication request_cb only, cb is not called.
If you don't set the req_cb, request_cb is not called.

Change-Id: Ica53667f5e4d7b92708788c58e47632dcb7f827d
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
12 months agoFix svace issue 55/292055/1 accepted/tizen/7.0/unified/20230502.051235
Wootak Jung [Thu, 23 Mar 2023 02:21:35 +0000 (11:21 +0900)]
Fix svace issue

Change-Id: I16316b95bf29536d36a0d2f81bb7996948ca560b
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
12 months agoFix Coverity issue 61/291361/1 accepted/tizen/7.0/unified/20230417.162202
Anuj Jain [Wed, 15 Mar 2023 06:46:09 +0000 (12:16 +0530)]
Fix Coverity issue

This patch fixes Coverity issue:
CID : 1668452 (RESOURCE_LEAK)

Change-Id: Idf35488d83e6f2da939a6b4dbe302cfd26a304e1
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
13 months agoFix svace issues 60/289860/1 accepted/tizen/7.0/unified/20230327.150408
Wootak Jung [Wed, 15 Mar 2023 01:47:17 +0000 (10:47 +0900)]
Fix svace issues

Change-Id: If2c317e0e57f23602a114eaa7dd882280dbcb2e7
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
13 months agoAdd custom name removing API 40/289740/1 accepted/tizen/7.0/unified/20230327.042650
Wootak Jung [Mon, 20 Feb 2023 07:21:12 +0000 (16:21 +0900)]
Add custom name removing API

fix ad type removing function

Change-Id: Ic47a8ef39b0cc8d954326cb683d3816543e8b273
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
13 months agoAdd custom name setting API in advertising data 39/289739/1
Wootak Jung [Thu, 16 Feb 2023 06:41:49 +0000 (15:41 +0900)]
Add custom name setting API in advertising data

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

da feature contains many da models as well as fhub

Change-Id: Ia8d75c4c0e759f9721b2a786adacabcaf70fff4d
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
19 months agofhub: Add DA features 72/282272/1 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.063739 accepted/tizen/7.0/unified/hotfix/20221116.104614 accepted/tizen/unified/20221006.065311 accepted/tizen/unified/20221006.065349 tizen_7.0_m2_release
Ayush Garg [Thu, 29 Sep 2022 08:06:43 +0000 (13:36 +0530)]
fhub: Add DA features

Applied patches
- add BT_HF_EVENT_AUDIO_MUTE event for audio mute function
- modify profile check routine for HFP & PBAP

This patchset should be merged with the following bluetooth-frwk's
patchset in order to build successfully:
bluetooth-frwk Change-Id: Ifc77646b0ef4cac509c88b647d86855baa658d3e

Change-Id: I3144f6091206891a67e19e81badf80737d8c5df6
Signed-off-by: shss-choi <shss.choi@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
19 months agofhub: add bt_adapter_get_hci_address API 71/282271/1
Ayush Garg [Thu, 29 Sep 2022 06:53:42 +0000 (12:23 +0530)]
fhub: add bt_adapter_get_hci_address API

Change-Id: I4b5d35b48e53e031a2f6fc0bfd4e7b4794bb8c97
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 70/282270/1
Ayush Garg [Thu, 29 Sep 2022 06:09:19 +0000 (11:39 +0530)]
fhub: Add new profile for Family Hub

Change-Id: Ibcb5f1803f74c3125f361948e854c110b9503a60
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
20 months agoMerge "Make uuid generation RFC 4122 compliant" into tizen
Abhay Agarwal [Thu, 25 Aug 2022 08:39:48 +0000 (08:39 +0000)]
Merge "Make uuid generation RFC 4122 compliant" into tizen

20 months agoAdd device name for l2cap le advertising 72/279572/1 accepted/tizen/unified/20220823.131815 submit/tizen/20220816.082553 submit/tizen/20220822.114248
Wootak Jung [Wed, 10 Aug 2022 23:24:57 +0000 (08:24 +0900)]
Add device name for l2cap le advertising

Change-Id: Ia91934a2499f8d41e3128e23b7f6dc78e8983087

20 months agoMake uuid generation RFC 4122 compliant 38/279438/1
Abhay Agarwal [Tue, 9 Aug 2022 07:04:04 +0000 (12:34 +0530)]
Make uuid generation RFC 4122 compliant

This patch makes the ble mesh uuid generation RFC 4122 compliant
as requried by bletooth-meshd stack.

Change-Id: I30d187c99e526d99b5ff08f7c2fba23a2fb8b5f7
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
21 months agoFix memory leak 61/277461/1
Wootak Jung [Thu, 7 Jul 2022 08:25:22 +0000 (17:25 +0900)]
Fix memory leak

Change-Id: I7b69d7dd795cc532efac9aaee4dab653ac2c60dc

22 months agoRemove gcov rpm 75/276975/2 accepted/tizen/unified/20220630.211953 submit/tizen/20220629.005223
Wootak Jung [Wed, 29 Jun 2022 00:07:10 +0000 (09:07 +0900)]
Remove gcov rpm

Do not make gcov rpm if run coverage manually

Change-Id: Ie465c77d1ac0d0214e3081e36373a13aea46b761

23 months agotest/unittest: Add l2cap le utc 55/275055/2 accepted/tizen/unified/20220615.135357 submit/tizen/20220531.044319 submit/tizen/20220601.225953 submit/tizen/20220614.010252
Wootak Jung [Mon, 16 May 2022 05:15:45 +0000 (14:15 +0900)]
test/unittest: Add l2cap le utc

[   44s] Success [ 581 /  581]
[   44s] Error   [   0 /  581]

Change-Id: I59aca60b6e5f7653ae70580c2d87b6ee88f11872

23 months agotest/bt_unit_test: Fix socket_send_data result log 54/275054/2
Wootak Jung [Wed, 11 May 2022 01:38:49 +0000 (10:38 +0900)]
test/bt_unit_test: Fix socket_send_data result log

Change-Id: I2f00912741958a73174cde2c5cc21bda9c87f40c

23 months agoble_mouse_with_error: Update PTS certification logic 45/274745/1
Wootak Jung [Wed, 4 May 2022 06:32:11 +0000 (15:32 +0900)]
ble_mouse_with_error: Update PTS certification logic

Change-Id: I71339a9f626f4f1e87ce35806b744c2e42193f1d

2 years agoFix wrong param for setting conectable mode 79/274579/1
Wootak Jung [Tue, 3 May 2022 02:25:17 +0000 (11:25 +0900)]
Fix wrong param for setting conectable mode

Change-Id: I40ddd53d0eeff0db2763e678f7f09c0850b90eee

2 years ago[ACR-1694] Add new APIs for L2CAP LE CoC functionality 25/273625/6 accepted/tizen/unified/20220502.003743 submit/tizen/20220428.025526 submit/tizen/20220429.071758
Wootak Jung [Sun, 10 Apr 2022 23:47:16 +0000 (08:47 +0900)]
[ACR-1694] Add new APIs for L2CAP LE CoC functionality

- add new feature:
tizen.org/feature/network.bluetooth.le.coc

Change-Id: I193513b0524daeac8e8c538f8226285ccc07a895

2 years agoAdd PTS certificate related logic 25/273925/1 submit/tizen/20220419.002419
Wootak Jung [Fri, 15 Apr 2022 05:38:59 +0000 (14:38 +0900)]
Add PTS certificate related logic

Change-Id: Ie182427ade7bbf8552baf4dae8354b408c111b22

2 years agoFix bt_unit_test crash issue 32/273732/1
Wootak Jung [Wed, 13 Apr 2022 05:33:07 +0000 (14:33 +0900)]
Fix bt_unit_test crash issue

if service_data_len is 0, crash occured in case of reading service_data

__bt_adapter_le_scan_result_cb:1776() C8:A3:AF:17:AB:21 Adv 22 Scan resp 22 RSSI -80 Addr_type 1
__bt_adapter_le_scan_result_cb:1837() TX Power level = -20
__bt_adapter_le_scan_result_cb:1853() Service UUID[1] = FE2C
__bt_adapter_le_scan_result_cb:1855()         Data[1] = 0x00...(len: 11)
__bt_adapter_le_scan_result_cb:1853() Service UUID[2] = FE03
__bt_adapter_le_scan_result_cb:1830() Device name = JBL CLUB PRO+ TWS-LE

Change-Id: Ib5f3bbcee103a83a850203d866b4bd13aaa3187f

2 years agoLE CoC: Fix disconnection on multiple writes 42/273342/1
Anuj Jain [Mon, 4 Apr 2022 12:46:59 +0000 (18:16 +0530)]
LE CoC: Fix disconnection on multiple writes

This patch fixes the the issue of LE_L2CAP socket disconnection
when write operation is performed more than once by either client or
server.

Change-Id: I6bd2e7fdbfe8ba1931d4a141266da8c902deb228
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
2 years agoLE CoC: Add unit test for L2CAP_LE type socket connection 66/272066/2 accepted/tizen/unified/20220318.133054 submit/tizen/20220313.220938 submit/tizen/20220314.225934 submit/tizen/20220316.003414 submit/tizen/20220317.013237
Ayush Garg [Mon, 7 Mar 2022 13:06:15 +0000 (18:36 +0530)]
LE CoC: Add unit test for L2CAP_LE type socket connection

This patch adds the following unit test for L2CAP_LE type socket:
- create socket
- destroy socket
- listen socket
- connect socket
- Accept and Reject socket connection
- get psm of listening socket

Change-Id: Ic6adf2738155b3334ce77dbff149b3e04a78a94f
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
2 years agoLE CoC: Implement CAPIs 65/272065/2
Ayush Garg [Mon, 7 Mar 2022 11:50:54 +0000 (17:20 +0530)]
LE CoC: Implement CAPIs

This patch primarily handles following:
- CAPIs to create and listen to L2CAP_LE socket
- CAPIs to connect and disconnect to L2CAP_LE socket
- CAPIs to get PSM of the listening L2CAP_LE socket
- Event Handlers for connection, disconnection and
authorization of L2CAP_LE socket

Change-Id: I6ac0595799602db1402778da3f73109366a013c2
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
2 years agoFix gatt send response logic 96/270796/1 accepted/tizen/unified/20220210.105859 submit/tizen/20220209.062549
Wootak Jung [Wed, 9 Feb 2022 06:11:46 +0000 (15:11 +0900)]
Fix gatt send response logic

no need to send response if response_need false

Change-Id: I23f524212fa0dab76b73a17299f3bc85bb75ac5b

2 years agoAdd the module name in the gcov install path 30/270130/1 accepted/tizen/unified/20220127.133235 submit/tizen/20220126.073444
dh79pyun [Wed, 26 Jan 2022 04:52:45 +0000 (13:52 +0900)]
Add the module name in the gcov install path

Change-Id: Idbc17f5e22c8585ee861677b87570d22032a5120
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
2 years agoReplace g_memdup to g_memdup2 83/267883/1 accepted/tizen/unified/20211222.230627 submit/tizen/20211212.233427
dh79pyun [Mon, 13 Dec 2021 02:29:15 +0000 (11:29 +0900)]
Replace g_memdup to g_memdup2

Change-Id: I5a302c2b1810e1d3896ec04f338ce7a74267c62c
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
2 years agoFix pointer corruption in gatt_server_deinitialize 32/267432/1
Ayush Garg [Fri, 3 Dec 2021 10:40:05 +0000 (16:10 +0530)]
Fix pointer corruption in gatt_server_deinitialize

The next node pointer of the gatt_server_list must be
stored before removing the current node.

Change-Id: I416a3a17d0c314f246449d6f458cffe6daaff2c3

2 years agoAdd the custom scan mode setting API 16/267116/1 accepted/tizen/unified/20211130.125443 submit/tizen/20211129.075122
dh79pyun [Fri, 26 Nov 2021 00:29:56 +0000 (09:29 +0900)]
Add the custom scan mode setting API

Change-Id: I9fa8453d31c07fa4599246eb0c7ef2d4c6d44029
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
2 years agoIncrease the version 09/266109/1 submit/tizen/20211109.024659 submit/tizen/20211114.231048
dh79pyun [Mon, 8 Nov 2021 04:10:43 +0000 (13:10 +0900)]
Increase the version

Change-Id: I29869069b060f48f32a78381616970922ee564dd
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
2 years agoGet the default client if the address is NULL 54/265854/1 accepted/tizen/unified/20211102.024818 submit/tizen/20211101.044616
dh79pyun [Sun, 31 Oct 2021 23:14:47 +0000 (08:14 +0900)]
Get the default client if the address is NULL

Change-Id: I327169a22292034f33a5122de7f84837d9b85066
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
2 years agoHandle BT_GATT_CLIENT_SERVICE_RESYNC event 99/265799/1
dh79pyun [Fri, 29 Oct 2021 00:49:53 +0000 (09:49 +0900)]
Handle BT_GATT_CLIENT_SERVICE_RESYNC event

Change-Id: I86582b12e6e89e9a3c6fe20ce3aedeabbb333036
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
2 years agoAdd the coverage exception for internal function 90/265390/1
dh79pyun [Mon, 18 Oct 2021 05:09:21 +0000 (14:09 +0900)]
Add the coverage exception for internal function

Change-Id: I3bfefd0ed1b17e9e20eaf3a68b30e0a44228913c
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
2 years ago[ACR-1666] Add gatt service resync change type 89/264789/2 accepted/tizen/6.5/unified/20211028.094520 accepted/tizen/unified/20211001.001241 submit/tizen/20210930.054510 submit/tizen_6.5/20211028.161701 tizen_6.5.m2_release yes
Wootak Jung [Wed, 29 Sep 2021 23:32:56 +0000 (08:32 +0900)]
[ACR-1666] Add gatt service resync change type

Change-Id: Ifa1a29f098d4c738cdcc356f3999a478f7862e63
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
2 years agoModify the doxygen of audio profile type 92/263392/3
Wootak Jung [Wed, 1 Sep 2021 23:50:55 +0000 (08:50 +0900)]
Modify the doxygen of audio profile type

Change-Id: Ibc597e96acd91a19fd0cc62944614a63c4bdb30e
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
2 years agoGATT: New callback API for notification state change 70/262170/3 accepted/tizen/unified/20210805.131636 submit/tizen/20210804.223925
Anuj Jain [Tue, 3 Aug 2021 08:49:42 +0000 (14:19 +0530)]
GATT: New callback API for notification state change

Make new callback api for notification enable/disable which
provides additional functionality of reporting client address
on notification state change.

This patchset should be merged with the following bluez and
bluetooth-frwk's patchset in order to match API and avoid crash:
bluez Change-Id:I81a0994f2299e988f8ef6428537647c899700fda
bluetooth-frwk Change-Id: Ib54ba54c318692b4ee0eaef9b2310c60dadeb661

Change-Id: Ic4868234a4fc682f9bff2c66ac1aee2683f3d6c6
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
2 years agoNative TCT fix for HDP 83/261983/3 accepted/tizen/unified/20210802.135804 submit/tizen/20210730.080510
Anuj Bhumiya [Fri, 30 Jul 2021 03:51:23 +0000 (09:21 +0530)]
Native TCT fix for HDP

The app handle is already freeing at the time of
deregistration so no need to free it at registration time.

Change-Id: I0fe1cf3a2f99dfae4e7a846f4b1aa6afb70b2aff
Signed-off-by: Anuj Bhumiya <anuj.bhumiya@samsung.com>
2 years agoFix Svace defect 24/261524/1 accepted/tizen/unified/20210726.135433 submit/tizen/20210726.004751
Anuj Bhumiya [Tue, 20 Jul 2021 12:18:23 +0000 (17:48 +0530)]
Fix Svace defect

This patch includes the fix of svace defect on latest CAPI code.

Change-Id: Ibc49749a28313c2efac315f9f5d551a4a522ef19
Signed-off-by: Anuj Bhumiya <anuj.bhumiya@samsung.com>
2 years agoAllow zero length for GATT server write request 02/259002/1 accepted/tizen/unified/20210607.124357 submit/tizen/20210606.232858
DoHyun Pyun [Mon, 31 May 2021 01:11:21 +0000 (10:11 +0900)]
Allow zero length for GATT server write request

Google's Chromecast app needs to response for zero
length write request in GATT server.

Change-Id: I5142ecd4dc7964caa2421aa0ecb39f0d0055c305
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
2 years agoAdd the coverage exception code for new internal APIs 96/258596/1
Wootak Jung [Fri, 21 May 2021 02:07:52 +0000 (11:07 +0900)]
Add the coverage exception code for new internal APIs

Change-Id: I816eaf5804ec7668ec834d7297b933ee555a7538
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoMove HF type definitions from internal to extension 38/257938/1
DoHyun Pyun [Fri, 7 May 2021 02:34:53 +0000 (11:34 +0900)]
Move HF type definitions from internal to extension

Change-Id: I0e87bd7c9f0de4fbd2d2d0cf53a8e56de90c38db
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoMesh: added message response on Node Role 27/257127/3 accepted/tizen/unified/20210427.085759 submit/tizen/20210426.061315
anuj.bhumiya [Mon, 19 Apr 2021 10:09:45 +0000 (15:39 +0530)]
Mesh: added message response on Node Role

This patch implements the message response from node
side to Provisioner node when it receive any message
from provisioner.

Change-Id: I3b8f1d092985bd489a5732a685eecedc74212e6a
Signed-off-by: anuj.bhumiya <anuj.bhumiya@samsung.com>
3 years agoAdd the coverage exception for internal function 99/256499/1
DoHyun Pyun [Tue, 6 Apr 2021 00:05:29 +0000 (09:05 +0900)]
Add the coverage exception for internal function

Change-Id: I33a628f5f9ae5474e4f885aea3dfb867bb721c3b
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoMesh: Implement Mesh Node Role API's 25/254325/5 accepted/tizen/unified/20210331.054026 submit/tizen/20210330.044039
anuj.bhumiya [Fri, 26 Feb 2021 11:30:48 +0000 (17:00 +0530)]
Mesh: Implement Mesh Node Role API's

This patch implements the Mesh node role for device.
Join API create a fresh node and set callbacks for join complete
and message execution callbacks.
Cancel API destroy the outgoing request initiated by Join API
and destroy the node from the application

Change-Id: Ic7127b90849223626c94351c63a2e86e092065f6
Signed-off-by: anuj.bhumiya <anuj.bhumiya@samsung.com>
3 years agoRemove spp test service file 95/254195/1 accepted/tizen/unified/20210226.131933 submit/tizen/20210225.094502
DoHyun Pyun [Thu, 25 Feb 2021 00:42:07 +0000 (09:42 +0900)]
Remove spp test service file

Change-Id: I8e3e7adb140748208c1568a155d86c93b4d50144
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoAdd the coverage exception for internal function 94/254194/1
DoHyun Pyun [Wed, 24 Feb 2021 23:40:20 +0000 (08:40 +0900)]
Add the coverage exception for internal function

Change-Id: Ic1a556c05bfbde00fa732a52719d5c7e03fdb7cf
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoAdd advertising data setting function for TDS AD type 39/253139/2 accepted/tizen/unified/20210209.124411 submit/tizen/20210208.222837
Wootak Jung [Thu, 4 Feb 2021 23:30:44 +0000 (08:30 +0900)]
Add advertising data setting function for TDS AD type

Change-Id: Ia8567a27457adf75a488a633d0e8833690b80973
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoMesh: Add Join Network API 13/251513/2
anuj.bhumiya [Thu, 14 Jan 2021 11:21:30 +0000 (16:51 +0530)]
Mesh: Add Join Network API

This patch add support of Mesh Node Role,
this API create a fresh unprovisioned
Mesh Node available to attach/provision in
any Network.

Change-Id: Ief4e9f4c92f9934b6e074d728b3e0f74b1022874
Signed-off-by: anuj.bhumiya <anuj.bhumiya@samsung.com>
3 years agoFix the svace issue (UNINIT.LOCAL_VAR.EX) 50/250350/2 accepted/tizen/unified/20201229.124655 accepted/tizen/unified/20210128.132331 submit/tizen/20201228.031005 submit/tizen/20210127.232224
DoHyun Pyun [Thu, 24 Dec 2020 00:29:24 +0000 (09:29 +0900)]
Fix the svace issue (UNINIT.LOCAL_VAR.EX)

Change-Id: I16a8a39fcea1618164112708ceec83f5ded3e99a
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoRemove the html link for privilege name 92/249792/1 accepted/tizen/unified/20201218.124453 submit/tizen/20201217.021725
DoHyun Pyun [Thu, 17 Dec 2020 00:12:24 +0000 (09:12 +0900)]
Remove the html link for privilege name

Change-Id: Ia64fb3712ef63ecf6c8b01a1226b32ff6fe8a99f
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoAdd GATT Service handlers to GATT handle list 48/248948/2
Ayush Garg [Thu, 3 Dec 2020 11:16:44 +0000 (16:46 +0530)]
Add GATT Service handlers to GATT handle list

At present, The validation check logic for GATT service handler is
returning error in some GATT client role's APIs (ex. bt_gatt_get_uuid)
because their handlers were not maintained in the 'gatt_handle_list'.
This change will maintain such handlers.

Change-Id: I39e35f6df7a5de7ea0e574d3ef4a71f1c67c074b
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
3 years agoFix svace issues 19/248719/1 accepted/tizen/unified/20201202.124931 submit/tizen/20201202.002505
Wootak Jung [Tue, 1 Dec 2020 23:50:14 +0000 (08:50 +0900)]
Fix svace issues

Change-Id: I529d4113f1bbfffd5a9459dba3f7f564ebf792d0
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoValidate GATT handle in CAPI 33/248433/1
Ayush Garg [Thu, 26 Nov 2020 11:28:37 +0000 (16:58 +0530)]
Validate GATT handle in CAPI

Validation of GATT handle is missing in few CAPIs (ex. bt_gatt_characteristic_destroy)
which leads to coredump sometimes.
One such scenario is when application accidently calls bt_gatt_characteristic_destroy
even after destroying the GATT server.
This change will handle such cases.

Change-Id: Iafb43af73ee25b192bfa673bbde7f96498c1557e
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
3 years agoFix position of setting is_own GATT attribute handle 69/248069/2
Anupam Roy [Fri, 20 Nov 2020 07:10:52 +0000 (12:40 +0530)]
Fix position of setting is_own GATT attribute handle

Issue: is_own_handle variable is wrongly set when
GATT read/write callback is found for the
attribute handle. But, it is possible that, callback is
explicitly not set by application for one of its
own handle. In such case, is_own_handle will remain
false, even when the attribute is owned by the app.
This will cause to miss the GATT internal response
by CAPI, when response is needed for that attribute.

Fix: is_own_handle is set to true, when GATT attribute is
matched for an application.

Change-Id: I85be0fcc03881372c46c76c56cfc69e1952f0163
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoModify TDS transport type enums 24/247624/1
Wootak Jung [Fri, 13 Nov 2020 01:22:34 +0000 (10:22 +0900)]
Modify TDS transport type enums

Change-Id: I35449316d8c2bf6a15ced2288d0e8b1c5320f087
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoAdd TDS transport type 33/247533/2 accepted/tizen/unified/20201113.130837 submit/tizen/20201113.003453
Wootak Jung [Thu, 12 Nov 2020 02:22:21 +0000 (11:22 +0900)]
Add TDS transport type

Change-Id: Ic6283adb0d6b5ee20d1f973a7f11c12ce17ad573
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoAdd api to set advertising interval 18/246718/3 accepted/tizen/unified/20201111.124823 submit/tizen/20201109.212850
anuj.bhumiya [Tue, 3 Nov 2020 10:11:15 +0000 (15:41 +0530)]
Add api to set advertising interval

This api provides a way to set advertising intervals for
a particular advertising instance.

Change-Id: I9d2164d156e21694f68154b611a0fdbabe50b171
Signed-off-by: anuj.bhumiya <anuj.bhumiya@samsung.com>
3 years agoImplement unit test for bt_adapter_le_is_scan_filter_supported() CAPI 09/246609/1
Ayush Garg [Mon, 2 Nov 2020 09:28:39 +0000 (14:58 +0530)]
Implement unit test for bt_adapter_le_is_scan_filter_supported() CAPI

Change-Id: I9e7b1b3d82c9fa2e40688d3270ee4f9daff52a64
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
3 years agoImplement RSSI scan filter 15/246515/2 accepted/tizen/unified/20201103.052003 submit/tizen/20201102.065935
Ayush Garg [Fri, 30 Oct 2020 10:06:41 +0000 (15:36 +0530)]
Implement RSSI scan filter

Change-Id: Ic4d4256f1a21d116fd3c7d9557f5983922d5f6e6
Signed-off-by: ayushgrg04 <ayush.garg@samsung.com>
3 years agoApply GATT function for TDS API 94/246294/2
Wootak Jung [Wed, 28 Oct 2020 00:01:10 +0000 (09:01 +0900)]
Apply GATT function for TDS API

Change-Id: I065886e5aab498b0b0a64c53f0e11f7d25d3869f
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoAdd the coverage exception for internal function 98/246198/1 accepted/tizen/unified/20201029.125009 submit/tizen/20201027.003129
DoHyun Pyun [Mon, 26 Oct 2020 23:04:29 +0000 (08:04 +0900)]
Add the coverage exception for internal function

Change-Id: I63d74438f316a8e955e57fcca49e116922e23cfa
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoValidate address for sending GATT notification 70/245570/2
Anupam Roy [Mon, 12 Oct 2020 07:44:49 +0000 (13:14 +0530)]
Validate address for sending GATT notification

This patch handles validating remote address provided
by application for sending GATT server notification.

Change-Id: Iaae70970bd9f03b2da2beb8e9f0e63f8fad2ea43
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoFix the valgrind issue 50/244750/1 accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.122631 accepted/tizen/6.0/unified/hotfix/20201103.004928 accepted/tizen/6.0/unified/hotfix/20201103.052335 accepted/tizen/unified/20200928.004603 submit/tizen/20200924.060847 submit/tizen_6.0/20201029.205102 submit/tizen_6.0_hotfix/20201102.192502 submit/tizen_6.0_hotfix/20201103.114802 tizen_6.0.m2_release
DoHyun Pyun [Thu, 24 Sep 2020 03:12:36 +0000 (12:12 +0900)]
Fix the valgrind issue

Invalid read of size 1
   at 0x4B02F70: ____strtoul_l_internal (strtol_l.c:432)
   by 0x4B027F7: strtoul (strtol.c:106)
   by 0x489628F: ??? (in /usr/lib/libcapi-network-bluetooth.so.0.6.0)

Change-Id: I074cacec908b65fd87e5376be16d96df528aa9f1
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoFix the coverity issues 85/244285/1 accepted/tizen/unified/20200923.093732 submit/tizen/20200917.075044 submit/tizen/20200923.005759
DoHyun Pyun [Wed, 16 Sep 2020 23:06:21 +0000 (08:06 +0900)]
Fix the coverity issues

Change-Id: I2e09d3d35cc6c820a303f6c2fbb0f495b55fbacf
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoMesh: Fix crash due to derefence of NULL pointer 46/243946/1 accepted/tizen/unified/20200914.131334 submit/tizen/20200913.230045
Abhay Agarwal [Fri, 11 Sep 2020 09:36:37 +0000 (15:06 +0530)]
Mesh: Fix crash due to derefence of NULL pointer

This patch fix the crash occured due to dererencing without null check

(gdb) bt
0  0xf7051b4a in g_slist_length () from /lib/libglib-2.0.so.0
1  0xf716ab6c in __bt_mesh_destroy_network_handles (net=net@entry=0x1fc9100) at /usr/src/debug/capi-network-bluetooth-0.6.0/src/bluetooth-mesh.c:869
2  0xf716ae14 in __bt_mesh_destroy_network_handles (net=0x1fc9100) at /usr/src/debug/capi-network-bluetooth-0.6.0/src/bluetooth-mesh.c:854
3  __mesh_unload_network_configurations (data=0x1fc9100, user_data=<optimized out>) at /usr/src/debug/capi-network-bluetooth-0.6.0/src/bluetooth-mesh.c:709
4  0xf7051b6c in g_slist_foreach () from /lib/libglib-2.0.so.0
5  0xf716bc9e in bt_mesh_deinitialize () at /usr/src/debug/capi-network-bluetooth-0.6.0/src/bluetooth-mesh.c:731

Change-Id: I25aee100d88f4fa281cdeb6f04b64bf6d60184ff
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
3 years agoMesh: Fix coding style issue 63/243863/1
Abhay Agarwal [Thu, 10 Sep 2020 15:17:28 +0000 (20:47 +0530)]
Mesh: Fix coding style issue

Change-Id: Ie89ac34cb0d7668ef3165b99caf47fe52dfef02d
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
3 years agoFix le advertising service data parsing logic 66/243766/1 accepted/tizen/unified/20200910.123916 submit/tizen/20200910.053710
Wootak Jung [Thu, 10 Sep 2020 02:11:46 +0000 (11:11 +0900)]
Fix le advertising service data parsing logic

Change-Id: I02a964819ebf1e51a39f9f78cf55c30fda5bc700
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoAdd gtest testcases for mesh network 22/243322/3 accepted/tizen/unified/20200909.014254 submit/tizen/20200907.031811
Amit Purwar [Fri, 4 Sep 2020 14:14:49 +0000 (19:44 +0530)]
Add gtest testcases for mesh network

Add the testcase for node reset, mesh network destroy,
model, group send msg and get primary address

Change-Id: I3e43ec7f81819ec7d7815f204efe25997aa9798b
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
3 years agoFix the API reference error 87/243087/1
DoHyun Pyun [Thu, 3 Sep 2020 05:24:27 +0000 (14:24 +0900)]
Fix the API reference error

Change-Id: I5e555ec99548f4769fd4ea62dc0a919c23a55b0f
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoMerge "Mesh: unit test: set transition time for node control" into tizen accepted/tizen/unified/20200902.011921 submit/tizen/20200901.064142
Pyun DoHyun [Tue, 1 Sep 2020 06:34:23 +0000 (06:34 +0000)]
Merge "Mesh: unit test: set transition time for node control" into tizen

3 years agoMesh: unit test: set transition time for node control 20/242820/2
Abhay Agarwal [Tue, 1 Sep 2020 04:01:55 +0000 (09:31 +0530)]
Mesh: unit test: set transition time for node control

Default values for the Generic Default Transition Step Resolution
and the Default Transition Number of Steps are implementation
speficic and are defined by a device manufacturer.
This patch sets transition time while controlling node.

Change-Id: I5cfbfd186efc9957790ec16b156fc18fa037cc41
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
3 years agoFix the ASAN build error 37/242737/1
DoHyun Pyun [Tue, 1 Sep 2020 00:45:49 +0000 (09:45 +0900)]
Fix the ASAN build error

Change-Id: Ic4f782c2bb1950f39d8d61405605bb77c3673a71
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoFix the memory leak 36/242736/1
DoHyun Pyun [Mon, 31 Aug 2020 23:14:00 +0000 (08:14 +0900)]
Fix the memory leak

Change-Id: I979015708fe61ab9146cdd56a8670b8adba6019b
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoCover the missed coverage functions and lines 96/242696/1 accepted/tizen/unified/20200901.042006 submit/tizen/20200831.035527
DoHyun Pyun [Mon, 31 Aug 2020 02:02:37 +0000 (11:02 +0900)]
Cover the missed coverage functions and lines

Change-Id: I07be13e0b7b539cec36c07db474b30e4e4f023c3
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoPrevent the heap buffer overflow 62/242562/1
DoHyun Pyun [Fri, 28 Aug 2020 02:16:06 +0000 (11:16 +0900)]
Prevent the heap buffer overflow

It is possible to occur the heap buffer overflow without
checking the length. So limit the maximum length for it.

==bluetooth-native-itc==12977==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xaf4531e0 at pc 0xb6a037eb bp 0xbedf4994 sp 0xbedf4560
READ of size 18 at 0xaf4531e0 thread T0
0xb6a037e8 in printf_common(void*, char const*, std::__va_list) /usr/src/debug/gcc-9.2.0/obj/armv7l-tizen-linux-gnueabi/libsanitizer/asan/../../../../libsanitizer/sanitizer_common/sanitizer_common_interceptors_format.inc:546
0xb6a0452e in __interceptor_vfprintf /usr/src/debug/gcc-9.2.0/obj/armv7l-tizen-linux-gnueabi/libsanitizer/asan/../../../../libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:1720 (discriminator 10)
0xaf4531e0 is located 0 bytes to the right of 16-byte region [0xaf4531d0,0xaf4531e0)
0xb67ed18e in bt_adapter_get_local_oob_data /usr/src/debug/capi-network-bluetooth-0.5.3/src/bluetooth-adapter.c:1107
0xb6f68994 in ITc_bluetooth_adapter_bt_adapter_get_local_oob_data_p src/ITs-bluetooth-adapter.c:750

Change-Id: I719c97fd97f919a5376cd9fd7e633612b855655e
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoMerge "Mesh: Accept Token in unit TC for loading Network" into tizen accepted/tizen/unified/20200831.002541 submit/tizen/20200827.215651
Pyun DoHyun [Thu, 27 Aug 2020 01:09:33 +0000 (01:09 +0000)]
Merge "Mesh: Accept Token in unit TC for loading Network" into tizen

3 years agoMerge "Mesh: Fix bug in Network load API" into tizen
Pyun DoHyun [Thu, 27 Aug 2020 01:09:30 +0000 (01:09 +0000)]
Merge "Mesh: Fix bug in Network load API" into tizen

3 years agoMerge "CAPI:Allows multiple service data in LE advertising" into tizen
Pyun DoHyun [Thu, 27 Aug 2020 01:08:26 +0000 (01:08 +0000)]
Merge "CAPI:Allows multiple service data in LE advertising" into tizen

3 years agoMerge "Modify logs in the mesh senario" into tizen
Pyun DoHyun [Thu, 27 Aug 2020 01:07:59 +0000 (01:07 +0000)]
Merge "Modify logs in the mesh senario" into tizen

3 years agoMerge "Fix the svace issue (SIZE MISMATCH)" into tizen
Pyun DoHyun [Thu, 27 Aug 2020 01:07:50 +0000 (01:07 +0000)]
Merge "Fix the svace issue (SIZE MISMATCH)" into tizen

3 years agoMesh: Accept Token in unit TC for loading Network 15/242415/2
Anupam [Wed, 26 Aug 2020 17:55:48 +0000 (23:25 +0530)]
Mesh: Accept Token in unit TC for loading Network

This patch also handles initialization of node
vendor & feature info during node creation.

Change-Id: I2ed4b7c77f42f20fca877860c1fb12037c144812
Signed-off-by: Anupam <anupam.r@samsung.com>
3 years agoMesh: Fix bug in Network load API 14/242414/1
Anupam [Wed, 26 Aug 2020 17:48:14 +0000 (23:18 +0530)]
Mesh: Fix bug in Network load API

This patch handles following:-
- Network handle was not returned
  after Networking loading is successful.
- Vendor & Feature informations were not
  initialized.

Change-Id: I929e95f30f78d5b59bee592be6d0620e28a74153
Signed-off-by: Anupam <anupam.r@samsung.com>
3 years agoMesh gtest: Fix the load network testcase 11/242411/1
Amit Purwar [Wed, 26 Aug 2020 16:07:38 +0000 (21:37 +0530)]
Mesh gtest: Fix the load network testcase

Change-Id: I3dd5a55529af20a38063c8fa4b52ada0623f6f82
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
3 years agoCAPI:Allows multiple service data in LE advertising 60/241360/5
Amit Purwar [Wed, 19 Aug 2020 10:29:51 +0000 (15:59 +0530)]
CAPI:Allows multiple service data in LE advertising

Change-Id: I07307798b29b3ed00c59c2416c2ae82c03f6198c
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
3 years agoModify logs in the mesh senario 64/242364/1
DoHyun Pyun [Tue, 25 Aug 2020 23:15:13 +0000 (08:15 +0900)]
Modify logs in the mesh senario

Change-Id: Id3ea2ce5c5eea339f7bc47f8a9415e18e1ce46e0
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoFix the svace issue (SIZE MISMATCH) 63/242363/1
DoHyun Pyun [Tue, 25 Aug 2020 23:04:05 +0000 (08:04 +0900)]
Fix the svace issue (SIZE MISMATCH)

Change-Id: Iaa43e331d02b4653654d9f22815f0cbacb919d55
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>