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>
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>
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>
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>
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
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
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
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
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
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>
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>
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>
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>
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>
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
Wootak Jung [Tue, 9 Aug 2022 22:41:02 +0000 (22:41 +0000)]
Merge "Modify authorize to FALSE in l2cap le connection" into tizen
Wootak Jung [Tue, 9 Aug 2022 04:19:22 +0000 (13:19 +0900)]
Modify authorize to FALSE in l2cap le connection
Change-Id: Icf4d8a51acc444765a9b61224a3a5d3fd26bfa65
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>
Wootak Jung [Thu, 28 Jul 2022 01:48:19 +0000 (10:48 +0900)]
Fix the crash issue when name changed
Change-Id: Ie2f9290f250d1def551c6c31272970c832ce36ed
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
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>
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
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>
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>
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
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>
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>
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>
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
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
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>
Wootak Jung [Mon, 21 Mar 2022 02:34:39 +0000 (11:34 +0900)]
Fix svace issue
Remove unnecessary check logic
Change-Id: I50ad8b43185c81722b85102de41d0b1057ba8ad1
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>
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>
Wootak Jung [Fri, 11 Mar 2022 05:42:44 +0000 (05:42 +0000)]
Merge "Remove mobile profile specific logic" into tizen
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>
Wootak Jung [Mon, 7 Mar 2022 01:31:58 +0000 (10:31 +0900)]
Remove mobile profile specific logic
Change-Id: I3d6cdfa86cca2582dd8de3532f33bbaf467201b7
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>
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>
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>
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>
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>
Pyun DoHyun [Tue, 11 Jan 2022 22:55:55 +0000 (22:55 +0000)]
Merge "Fix Svace Issues" into tizen
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>
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>
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>
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
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
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
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>
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>
Wootak Jung [Thu, 18 Nov 2021 06:20:33 +0000 (15:20 +0900)]
Add the logic for checking privilege to container
Change-Id: Iffa438bd53b6ef0e5eee8165a5bb0f286f631898
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>
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>
Wootak Jung [Wed, 10 Nov 2021 01:21:28 +0000 (10:21 +0900)]
Add container request check logic
Change-Id: I8f7419f03e4937c9d41ece4a704b8f411ad04227
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>
dh79pyun [Mon, 8 Nov 2021 02:26:39 +0000 (11:26 +0900)]
Remove the trust logic in the Robot profile
Change-Id: I77ca652fd7475c3e342c0a56e032e20f1af06c8f
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
Wootak Jung [Thu, 4 Nov 2021 04:07:47 +0000 (13:07 +0900)]
Add container handling logic
bt-service is running in host only
All requests received from container will re-direct to host
Don't read vconf to check bt status
Change-Id: If2d42cde897c8f90f700aa5279232d8ab8f8a523
dh79pyun [Sun, 31 Oct 2021 23:15:22 +0000 (08:15 +0900)]
Don't check the address for RESYNC svc change event
Change-Id: I9de5e4497c3a068a45f76796a92c2ea349d433ea
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
dh79pyun [Fri, 29 Oct 2021 01:09:45 +0000 (10:09 +0900)]
Handle BT_GATT_CLIENT_SERVICE_RESYNC event
Change-Id: I1d7f1ee6196e15cbaf9cfdc8d67fd77c4b6c4559
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
INSUN PYO [Wed, 27 Oct 2021 22:25:33 +0000 (07:25 +0900)]
Remove unused code
Change-Id: I6ab2e413f95bf4bcaf2d7e679c7c6142f36a5ec4
dh79pyun [Fri, 22 Oct 2021 00:53:44 +0000 (09:53 +0900)]
Add more conditions for the robot profile
Change-Id: I9dcb05d93c711231b2e46d45eb8018bcabb48ea9
Signed-off-by: dh79pyun <dh79.pyun@samsung.com>
Wootak Jung [Fri, 6 Aug 2021 05:21:40 +0000 (14:21 +0900)]
Fix coverity issue
param should be initialized
Change-Id: I5da0ab3ad7f6a74322038b97357e7141f2983ac3
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
Anuj Jain [Tue, 3 Aug 2021 08:44:07 +0000 (14:14 +0530)]
GATT: Parse client address in StartNotify and StopNotify DBUS APIs
This patch enables client address to be reported in
Notification Enable/Diable callback in Tizen CAPI.
In GATT server role, client address is parsed from incoming dbus
message and is passed up the stack.
This patchset should be merged with the following capi and bluez's
patchset in order to match API and avoid crash:
bluez Change-Id: I81a0994f2299e988f8ef6428537647c899700fda
capi Change-Id: Ic4868234a4fc682f9bff2c66ac1aee2683f3d6c6
Change-Id: Ib54ba54c318692b4ee0eaef9b2310c60dadeb661
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Wootak Jung [Wed, 28 Jul 2021 04:23:53 +0000 (13:23 +0900)]
Fix gatt service uuid duplicated registration issue
Change-Id: I33aa85aa436badf16d82226fcd69d7e65f85ce9d
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
Anuj Jain [Sun, 20 Jun 2021 04:08:32 +0000 (09:38 +0530)]
GATT: Clear dbus pending invocation list when gatt disconnection occurs.
In GATT client role, When an application makes a dbus sync request
to BT-Service and is waiting for its reply,
Meanwhile BT-Service encounters GATT disconnection, because of which
it could not send the corresponding replies to application as the
connection info is already removed and thus causing dbus timeout error.
This patch will prevent such situation by sending BLUTOOTH_INTERNAL_ERROR
reply corresponding to all those pending dbus invocations when GATT
disconnection occurs.
Change-Id: Ib1cc93427a0d7156885381174e81616010cf9267
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
Ayush Garg [Sun, 20 Jun 2021 04:48:55 +0000 (10:18 +0530)]
Revert "GATT: Clear dbus pending invocation list when gatt disconnection occurs."
This reverts commit
702713c02a0256416f1a3f2a1aa49eff30408316.
Anuj Jain [Sun, 20 Jun 2021 04:08:32 +0000 (09:38 +0530)]
GATT: Clear dbus pending invocation list when gatt disconnection occurs.
In GATT client role, When an application makes a dbus sync request
to BT-Service and is waiting for its reply,
Meanwhile BT-Service encounters GATT disconnection, because of which
it could not send the corresponding replies to application as the
connection info is already removed and thus causing dbus timeout error.
This patch will prevent such situation by sending BLUTOOTH_INTERNAL_ERROR
reply corresponding to all those pending dbus invocations when GATT
disconnection occurs.
Change-Id: Ib1cc93427a0d7156885381174e81616010cf9267
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
DoHyun Pyun [Wed, 9 Jun 2021 23:25:05 +0000 (08:25 +0900)]
Fix the coverity issue (Memory leak)
Change-Id: I5d8c9e91f73e005606f274d071983d36b49c5b14
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Wootak Jung [Wed, 2 Jun 2021 02:01:30 +0000 (11:01 +0900)]
Add auto accept and set trusted logic for robot
Change-Id: If99c752a1163c611eb461503093f5b6f4723c5fe
Wootak Jung [Tue, 1 Jun 2021 00:15:30 +0000 (09:15 +0900)]
Add robot socket channel
Change-Id: Iab39beae121598e659f5e646d306ac7577600269
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
DoHyun Pyun [Mon, 31 May 2021 01:22:11 +0000 (10:22 +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: Ie925246c23078c070898f84a5fd8db908d2c854b
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
anuj.bhumiya [Tue, 25 May 2021 08:58:41 +0000 (14:28 +0530)]
Fix coverty issues
Change-Id: I06b246df43582a066d071b899558b9a39b9be57d
Signed-off-by: anuj.bhumiya <anuj.bhumiya@samsung.com>
DoHyun Pyun [Thu, 13 May 2021 02:40:01 +0000 (11:40 +0900)]
Fix the crash issue in FHub product
0xb60d394a in print_bt_properties (num_properties=1, properties=0xbe2d1160) at /usr/src/debug/bluetooth-frwk-0.6.0/bt-oal/common/oal-utils.c:205
i = <optimized out>
__func__ = "print_bt_properties"
Backtrace stopped: Cannot access memory at address 0x2d6c6166
Change-Id: I3dcbafb6ffd1b10a6db41f03df8658653e1d0b27
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Pyun DoHyun [Mon, 26 Apr 2021 05:53:36 +0000 (05:53 +0000)]
Merge "Mesh: added message response on Node Role" into tizen
anuj.bhumiya [Mon, 19 Apr 2021 10:00:19 +0000 (15:30 +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: Ic70c7589f9328dd80ebcf5de7a76937c9c640e6c
Signed-off-by: anuj.bhumiya <anuj.bhumiya@samsung.com>
Wootak Jung [Wed, 14 Apr 2021 04:31:51 +0000 (13:31 +0900)]
Remove unnecessary dependency
Change-Id: Iba251c1e6ce130c9269b0794aaf698ec9ad517eb
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
DoHyun Pyun [Mon, 12 Apr 2021 23:17:51 +0000 (08:17 +0900)]
Correct the privilege check for BT_UPDATE_LE_CONNECTION_MODE
Change-Id: I974080862a48defc67752e3b3a0f5d23200182db
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Wootak Jung [Tue, 6 Apr 2021 04:15:36 +0000 (13:15 +0900)]
Fix gatt attributes not freed issue
next pointer should be set before removing gslist
Change-Id: I5a0e13ba2f9d35746a368d6fa42659b40f0ee91a
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
DoHyun Pyun [Thu, 1 Apr 2021 23:04:41 +0000 (08:04 +0900)]
Prevent the buffer overflow error for adv data
0xb239567c in _bt_hal_set_advertising_data (adv_param_setup=...)
adv_data = "\021\006", '\000' <repeats 14 times>, "\f]\021\006Z\266\f]Z\266\000@Z\266h"
adv_data_str = "1106", '0' <repeats 29 times>, "
C5D11065AB60C5D5AB600405AB668E"
index = <optimized out>
proxy = <optimized out>
error = 0x0
ret = <optimized out>
temp = <optimized out>
builder = <optimized out>
event = <optimized out>
length = 36
i = <optimized out>
slot_id = <optimized out>
__func__ = "_bt_hal_set_advertising_data"
Change-Id: I20caf761dd9f006159783ae6eded349e7cc92948
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Pyun DoHyun [Tue, 30 Mar 2021 04:21:33 +0000 (04:21 +0000)]
Merge "Mesh: Implement Mesh Node Role API's" into tizen
anuj.bhumiya [Fri, 26 Feb 2021 11:15:25 +0000 (16:45 +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: I79fa3c390a08076d84c0e20450f7c32aec1bdf6e
Signed-off-by: anuj.bhumiya <anuj.bhumiya@samsung.com>
DoHyun Pyun [Tue, 16 Mar 2021 23:42:31 +0000 (08:42 +0900)]
Fix the memory leak
Change-Id: I95cc117fbc4ac314712f9e1e60e23d5cafd7e4ba
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Wootak Jung [Mon, 15 Mar 2021 04:41:41 +0000 (13:41 +0900)]
Fix gatt handle number limitation issue
Change-Id: I69771df30f0f3b6aa9f4be2bd9dacbd392bcda92
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
Ayush Garg [Mon, 1 Mar 2021 13:00:11 +0000 (18:30 +0530)]
Set trusted profile/device in ACCEPT_ALWAYS authorization case
If ACCEPT_ALWAYS option is selected in authorization popup,
This change will set Profile as trusted if the profile is
PBAP, MAP or SAP. Otherwise it will put device in the
trusted list.
This will allow the user to connect automatically
in future connections without asking for authorization.
Change-Id: I2033f34b8436987d4c4ea87db57c2193cfa7c34c
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
DoHyun Pyun [Mon, 8 Feb 2021 23:34:07 +0000 (08:34 +0900)]
Move haltest package to hal-api-bluetooth
Change-Id: I07ffaf4219c460fd5c3d053733b333efdee51669
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
INSUN PYO [Wed, 3 Feb 2021 04:27:36 +0000 (13:27 +0900)]
Change systemd-devel package name
Change-Id: I6b6b7b00cb866600c62a1bb1e76c860ac55b5b66
Ayush Garg [Mon, 1 Feb 2021 08:54:08 +0000 (14:24 +0530)]
GATT: Clear g_pending_write_list when GATT disconnection occurs
This change will clear all the pending prepare_write_request
for a specific connection id when abrupt disconnection occurs
during GATT long write operation.
Change-Id: I6576329cb9d560c37f3d2b89243fa1f957424918
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
Wootak Jung [Fri, 29 Jan 2021 05:06:11 +0000 (14:06 +0900)]
Fix the received-bytes merged issue
When multiple write-data come on fd in continuously, the data merged.
- reproduction sequnce
1. makes gatt connection
2. writes on characteristic continuously in client side
3. received-data merged on write_value_requested_cb
Change-Id: Ieed5e2a115220d9ebfa48eae03fbf45ebb4402d5
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
Pyun DoHyun [Wed, 27 Jan 2021 23:02:17 +0000 (23:02 +0000)]
Merge "GATT: Handle prepare_authorize parameter in WriteValue DBUS API" into tizen
Pyun DoHyun [Wed, 27 Jan 2021 23:02:13 +0000 (23:02 +0000)]
Merge "Implement Long Write Operations for Tizen TV" into tizen
Ayush Garg [Wed, 27 Jan 2021 14:15:59 +0000 (19:45 +0530)]
GATT: Handle prepare_authorize parameter in WriteValue DBUS API
In GATT Server role, prepare_authorize parameter will be set
when bluez wants authorization permission from the application when
ATT_PREPARE_WRITE_REQUEST PDU receive for the first time in case
of long write.
This is an initial patchset to parse prepare_authorize parameter from
bluez and avoid crash. Subsequent patches will be added to handle
authorization completely.
This patchset should be merged with the following bluez's patchset
in order to match API and avoid crash:
bluez Change-Id: I93bc46151ebbe695c74b224c3a3579c6e5d0de14
Change-Id: Ic4397ae86760177e08ccd283e80d4526bd32e0c4
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
Ayush Garg [Sat, 23 Jan 2021 09:20:06 +0000 (14:50 +0530)]
Implement Long Write Operations for Tizen TV
In Tizen Platform, For long write operations, bluez handles
all the ATT_Prepare_Write_Req packets and sends the complete
data to the BT-Service when ATT_EXEC_WRITE_REQ is received.
Where as in Tizen TV, Bluedroid works in a different manner.
It sends every ATT_Prepare_Write_Req packet to bt-service using
OAL_EVENT_GATTS_REQUEST_WRITE event with flag is_prep=1 and thus,
allows upper layers to handle long write operation on its own.
This change will perform all the below operations(in case of bluedroid)
at bt-service level which bluez performs for GATT long write:
1. Appending all the Prepare_Write_Req data in a list and send
prepare_write_resp.
2. Passing the complete data to the capi when
OAL_EVENT_GATTS_EXEC_REQUEST_WRITE event comes.
Thus this change will help in maintaining uniformity at CAPI level
irrespective of Bluez or Bluedroid.
Change-Id: Iae005dc3643d54783dbd3ddd8c1dc70a1684be99
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
Wootak Jung [Tue, 26 Jan 2021 01:26:42 +0000 (10:26 +0900)]
Add stack down functionality in bt-core
it's better to use actd instead of script
Change-Id: I0fbaf022fe7597c46d295a3edb84928ac338b1b6
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
Pyun DoHyun [Mon, 25 Jan 2021 00:23:39 +0000 (00:23 +0000)]
Merge "GATT: Fix bug in GATT Send indication" into tizen
Anupam Roy [Fri, 22 Jan 2021 07:14:33 +0000 (12:44 +0530)]
GATT: Fix bug in GATT Send indication
Issue: When remote device address is NULL,
fd is searched in fd list and returned error if not found.
But, it is possible that, fd is not found because,
GATT characteristic attribute is not acquired by stack.
In such case, currently, GATT FRWK is wrongly missing to send
GATT indication to remote device.
Fix: Handle GATT send indication in following way
- If device address is valid unicast, send DBUS indication
- If device addres is NULL or "00:00:00:00:00:00"
a/ First, try to find fd for multicast over socket
b/ if fd not found, fallback to multicast over DBUS
Change-Id: Ib0e4b9d49ca3a6f3b75d8a691a1a01750152893b
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
Wootak Jung [Thu, 14 Jan 2021 07:38:49 +0000 (16:38 +0900)]
Apply next HAL architecture
Add cap_sys_module capability to bt-core
Change-Id: I428e77e429c277d21d8ba41dc8f7e4ce7d477b8e
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
Pyun DoHyun [Wed, 13 Jan 2021 04:27:59 +0000 (04:27 +0000)]
Merge "Revert "Fix svace issues"" into tizen
Wootak Jung [Wed, 13 Jan 2021 03:48:28 +0000 (12:48 +0900)]
Revert "Fix svace issues"
This reverts commit
e4ce93a114e464d34a1b59cba44848ecc54ae4da.
Change-Id: I4456ccd2a34e343cd543bb57a15cf4c4c49a6375
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
anuj.bhumiya [Tue, 12 Jan 2021 06:00:44 +0000 (11:30 +0530)]
Fix memory leak
Change-Id: If43686456767f74d95fc879b99551ef4a07957ae
Signed-off-by: anuj.bhumiya <anuj.bhumiya@samsung.com>