platform/core/connectivity/bluetooth-frwk.git
5 years agoMatch the correct privilege for RFCOMM listen and accept API 00/194300/1
DoHyun Pyun [Mon, 3 Dec 2018 01:59:58 +0000 (10:59 +0900)]
Match the correct privilege for RFCOMM listen and accept API

Change-Id: I1a19d3222ec033a55a16f20e8d906a61c6f0b6b7
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoRemove g_bus_own_name() logic in bt-telephony 00/192700/1
Wootak Jung [Thu, 8 Nov 2018 05:12:09 +0000 (14:12 +0900)]
Remove g_bus_own_name() logic in bt-telephony

It is not good to call g_bus_own_name() in api layer, it causes
service name of sender is changed to org.tizen.csd.Call.Instance.

This interface has been used on bluetooth-agent and it can call
method on this interface by using sender_name instead of service_name.

Change-Id: I6f77e23ee15b9b1f9e4a4ce53f4993e852006bce

6 years agoMigrate insmod logic into bt-stack-up.service 91/192391/1 accepted/tizen/unified/20181109.062817 submit/tizen/20181106.081159 submit/tizen/20181108.005303 submit/tizen/20181108.070422
Wootak Jung [Mon, 5 Nov 2018 08:03:19 +0000 (17:03 +0900)]
Migrate insmod logic into bt-stack-up.service

insmod logic should be executed before bt-stack-up.sh logic. But,
insmod logic has been executed after bt-stack-up.sh logic on ARTIK530.
This patch migrates insmod logic into bt-stack-up.sh and creates bt-stack-up.service
This patch should be merged with bluetooth-tools.

Change-Id: I15e3ab996379600173e441effb9d52577ae3203b

6 years agoMerge "Revert "Fix incorrect interface name and improve dbus policy"" into tizen accepted/tizen/unified/20181107.081858 submit/tizen/20181026.055809 submit/tizen/20181105.232950
Pyun DoHyun [Fri, 26 Oct 2018 05:57:33 +0000 (05:57 +0000)]
Merge "Revert "Fix incorrect interface name and improve dbus policy"" into tizen

6 years agoRevert "Fix incorrect interface name and improve dbus policy" 63/191963/1
Wootak Jung [Fri, 26 Oct 2018 05:46:56 +0000 (05:46 +0000)]
Revert "Fix incorrect interface name and improve dbus policy"

This reverts commit fb6c7048cb2a150aebcef0e2821c369e46c5a9ad.

Change-Id: Ia78dd8b41f341441d4c3cbb15bd1450e24dbaf22

6 years agoFix profile check logic to distinguish ivi and iot 99/191899/2
Wootak Jung [Thu, 25 Oct 2018 06:10:58 +0000 (15:10 +0900)]
Fix profile check logic to distinguish ivi and iot

Change-Id: Iaa8e0786787bfba81987d6fdb29d2a95dd867ab9

6 years agoInvoke callback function after all internal work is done 26/191626/1
Deokhyun Kim [Fri, 19 Oct 2018 05:59:42 +0000 (14:59 +0900)]
Invoke callback function after all internal work is done

 - Prevent to access freed service after GATT is destroyed in callback function

Change-Id: I8aa33c48cdcf246578552a58aaa2cad7a94a589c
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
6 years agoRevert "Remove and modify for some dbus policies" 68/191368/1 accepted/tizen_5.0_unified accepted/tizen/5.0/unified/20181102.014759 accepted/tizen/unified/20181018.000410 submit/tizen/20181016.090705 submit/tizen_5.0/20181101.000003
DoHyun Pyun [Tue, 16 Oct 2018 09:05:26 +0000 (18:05 +0900)]
Revert "Remove and modify for some dbus policies"

This reverts commit b493a680894d58efc1879d90be656c6fcdda9c50.

Change-Id: I98e87554fde528a824189a5f3051eb0417b985f4
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoRemove and modify for some dbus policies 45/190745/1 accepted/tizen/unified/20181011.095202 submit/tizen/20181009.235550
Wootak Jung [Fri, 5 Oct 2018 05:06:04 +0000 (14:06 +0900)]
Remove and modify for some dbus policies

- org.projectx.bt_event
 no need policy for using signal
- org.projectx.bluetooth.share
 bluetooth-share owns this service
- org.tizen.csd.Call.Instance
 user owns this service and called by network_fw

Change-Id: I3727e144ffcae9ad9ff12748c7ac5b51c08e0486

6 years agoMerge "Fix incorrect interface name and improve dbus policy" into tizen
Pyun DoHyun [Thu, 4 Oct 2018 02:49:18 +0000 (02:49 +0000)]
Merge "Fix incorrect interface name and improve dbus policy" into tizen

6 years agoDisable GATT Client fd based function 58/190558/1 accepted/tizen/unified/20181005.012503 submit/tizen/20181004.010949
DoHyun Pyun [Thu, 4 Oct 2018 00:58:07 +0000 (09:58 +0900)]
Disable GATT Client fd based function

After applying the security patchset, we will enable this feature.
To pass the web manaul TC, we disable this feature in now.

Change-Id: I35cb8e79bf0aba5a4b27171db1c0f22346e32f44
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoFix incorrect interface name and improve dbus policy 03/190303/1
Wootak Jung [Mon, 1 Oct 2018 01:52:37 +0000 (10:52 +0900)]
Fix incorrect interface name and improve dbus policy

Dbus -> DBus
Objectmanager -> ObjectManager

Change-Id: I97a05856ff7b8357aeb92d595d5d4aacfc786bee

6 years agoFixed the return status for indicate property 27/190227/1 submit/tizen/20180930.234221
Amit Purwar [Fri, 28 Sep 2018 09:18:53 +0000 (14:48 +0530)]
Fixed the return status for indicate property

Return status for indicate property of characteristic
is fixed in set characteristic changed value cb for
TFIVE-14433 TFIVE-14439 issue

Change-Id: Ia3ef28961ef71fb81e7d74bce457e54a99ba3cb5
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
6 years agoModify to path activation for hciconfig command 33/189833/2 accepted/tizen/unified/20180928.080457 submit/tizen/20180927.020120
Wootak Jung [Fri, 21 Sep 2018 04:52:20 +0000 (13:52 +0900)]
Modify to path activation for hciconfig command

Change-Id: Ia091b30464fc2cf1fef96d65c95ff3b0ea296312

6 years agoFix memory double free(crash) issue 35/189735/1 accepted/tizen/unified/20180921.042519 submit/tizen/20180920.060650
Wootak Jung [Thu, 20 Sep 2018 05:41:47 +0000 (14:41 +0900)]
Fix memory double free(crash) issue

g_variant_get_string returns the constant string whereas
g_variant_get_dup_string returns a newly allocated string.
It should not be freed.

    at /usr/src/debug/bluetooth-frwk-0.3.0/bt-oal/bluez_hal/src/bt-hal-adapter-dbus-handler.c:525

Change-Id: I3d8f6bc0eec3d7736a263edbb47c3f3deaee4cef

6 years agoAdded the GATT server disconnect 05/185005/7 accepted/tizen/unified/20180919.141920 submit/tizen/20180919.001852
Amit Purwar [Wed, 25 Jul 2018 06:06:49 +0000 (11:36 +0530)]
Added the GATT server disconnect

Change-Id: I2c38505d92d8610801670cd063d31fbf7f8df4b4
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
6 years agoMerge "Prevent Issue fixes" into tizen
Pyun DoHyun [Wed, 19 Sep 2018 00:18:05 +0000 (00:18 +0000)]
Merge "Prevent Issue fixes" into tizen

6 years agoPrevent Issue fixes 27/189527/2
Abhishek Chandra [Tue, 18 Sep 2018 09:43:57 +0000 (15:13 +0530)]
Prevent Issue fixes

Prevent Issue fixes :
- 1026071
- 1026065
- 1026059
- 1026057
- 1026047
- 1026042
- 1026038

Change-Id: I4517e99e89e5ad5a1fefe07fc2263c27587e61ab
Signed-off-by: Abhishek Chandra <abhishek.ch@samsung.com>
6 years agoremoved gatt service info from list during gatt cleanup 85/189385/1
Amit Purwar [Mon, 17 Sep 2018 09:35:50 +0000 (15:05 +0530)]
removed gatt service info from list during gatt cleanup

Change-Id: I1dbe49424fcf20047c2d86ec6e234929e05f6de2
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
6 years agoAdd "Not Supported" check logic for haltests 08/189308/1 accepted/tizen/unified/20180918.062755 accepted/tizen/unified/20180918.062946 submit/tizen/20180917.041805 submit/tizen/20180917.223052
DoHyun Pyun [Mon, 17 Sep 2018 04:08:51 +0000 (13:08 +0900)]
Add "Not Supported" check logic for haltests

Change-Id: I45b5d88291dbf7b895229b79f7db6479edf72e3d
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoModify bt-oal initialize code readably 89/189089/1
Wootak Jung [Thu, 13 Sep 2018 08:54:44 +0000 (17:54 +0900)]
Modify bt-oal initialize code readably

Change-Id: Ic35ea6d65139f41f63caccd185474ad598f0d2d4

6 years agoRemove duplicated check logic and incorrect return type 32/189032/1
Wootak Jung [Thu, 13 Sep 2018 02:15:14 +0000 (11:15 +0900)]
Remove duplicated check logic and incorrect return type

Change-Id: I5be38b4424e2f8418d06af82c63b4de90b062651

6 years agoMerge "Fix the coding style errors" into tizen accepted/tizen/unified/20180913.064014 accepted/tizen/unified/20180914.073138 submit/tizen/20180912.234844 submit/tizen/20180913.053639
DoHyun Pyun [Wed, 12 Sep 2018 23:48:03 +0000 (23:48 +0000)]
Merge "Fix the coding style errors" into tizen

6 years agoMerge "Fix the build error in aarch64" into tizen
DoHyun Pyun [Wed, 12 Sep 2018 23:47:55 +0000 (23:47 +0000)]
Merge "Fix the build error in aarch64" into tizen

6 years agoMerge "TFIVE-12959: fixed scan response and adv data length" into tizen
Pyun DoHyun [Wed, 12 Sep 2018 23:38:48 +0000 (23:38 +0000)]
Merge "TFIVE-12959: fixed scan response and adv data length" into tizen

6 years agoMerge "TFIVE-12640: fixed the size of handle string" into tizen
Anupam Roy [Wed, 12 Sep 2018 11:10:57 +0000 (11:10 +0000)]
Merge "TFIVE-12640: fixed the size of handle string" into tizen

6 years agoTFIVE-12959: fixed scan response and adv data length 07/189007/1
Amit Purwar [Wed, 12 Sep 2018 10:56:36 +0000 (16:26 +0530)]
TFIVE-12959: fixed scan response and adv data length

Change-Id: Ib1290516f289f1cd4a6bc23cb1b8579a3f4d1b5d
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
6 years agoFix the coding style errors 95/188995/1
DoHyun Pyun [Wed, 12 Sep 2018 09:20:24 +0000 (18:20 +0900)]
Fix the coding style errors

Change-Id: If26907f850ab41859ba48b294af470c35ee9f14f
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoFix the build error in aarch64 87/188987/2
DoHyun Pyun [Wed, 12 Sep 2018 08:51:52 +0000 (17:51 +0900)]
Fix the build error in aarch64

Change-Id: Ieea61a740d960535fa0d67f4f2a52299ca86cd0b
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoAdd Werror option in CFLAG 71/188971/1
DoHyun Pyun [Wed, 12 Sep 2018 06:22:22 +0000 (15:22 +0900)]
Add Werror option in CFLAG

Change-Id: If8d0621fb55f1cd522b3d6787f37a251b762dec5
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoFix the build warnings and typo error 67/188967/1
DoHyun Pyun [Wed, 12 Sep 2018 06:21:55 +0000 (15:21 +0900)]
Fix the build warnings and typo error

Change-Id: I45c386258f39a5dbf71555b4a058caebe16f71df
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoRemove unused local variable and codes - wait_for_async( ) 28/188928/2
Taesoo Jun [Wed, 12 Sep 2018 02:45:44 +0000 (11:45 +0900)]
Remove unused local variable and codes -  wait_for_async( )

Change-Id: Ib9c2e29d3ee4f6e4ca3240e3f8633fff15655021
Signed-off-by: Taesoo Jun <steve.jun@samsung.com>
6 years agoTFIVE-12640: fixed the size of handle string 98/188898/1
Amit Purwar [Tue, 11 Sep 2018 12:05:12 +0000 (17:35 +0530)]
TFIVE-12640: fixed the size of handle string

Change-Id: I944c5d7d6e45d96b88be179d0c57113afd87cc05
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
6 years agoRemove duplicated logic 77/188877/1
Wootak Jung [Tue, 11 Sep 2018 08:35:22 +0000 (17:35 +0900)]
Remove duplicated logic

Remove incorrect comment

Change-Id: I40ad8a799e2c90b6af5d580489dfb5f26ed179f1

6 years agoFix return-type mismatch issue 76/188876/1
Wootak Jung [Tue, 11 Sep 2018 08:28:32 +0000 (17:28 +0900)]
Fix return-type mismatch issue

Change-Id: I07ed4db7b8f6395ba9b532ceaa744d9148de8e47

6 years agoRemoved duplicate g_variant_get call 60/188760/1 accepted/tizen/unified/20180911.055340 submit/tizen/20180910.080716
Abhishek Chandra [Mon, 10 Sep 2018 06:09:55 +0000 (11:39 +0530)]
Removed duplicate g_variant_get call

g_variant_get is called to extract
address , offset for read value request
in __bt_gatt_char_method_call twice .
Removed the redundant call.

Change-Id: Id5694e6437cef8ac016e701964b9c2a288161db6
Signed-off-by: Abhishek Chandra <abhishek.ch@samsung.com>
6 years agoAdd HFP HF API : bt_hf_request_call_status_info_list() 26/188726/1
Wootak Jung [Mon, 10 Sep 2018 01:48:30 +0000 (10:48 +0900)]
Add HFP HF API : bt_hf_request_call_status_info_list()

Change-Id: I4ddd7cfadb91a8ef39231cd927e5fdb0a23e152e

6 years agoStop sending notification data on fd from BT_GATT_SERVER_UPDATE_VALUE 05/188705/2 accepted/tizen/unified/20180910.172010 submit/tizen/20180910.002032
Avichal Agarwal [Fri, 7 Sep 2018 11:47:46 +0000 (17:17 +0530)]
Stop sending notification data on fd from BT_GATT_SERVER_UPDATE_VALUE

Change-Id: Ifad181ac984b8209495df0f59ec00dc6e9cf9117
Signed-off-by: Avichal Agarwal <avichal.a@samsung.com>
6 years agoFixing BLUETOOTH_EVENT_GATT_CHAR_VAL_CHANGED for notify 04/188704/3
Avichal Agarwal [Fri, 7 Sep 2018 11:37:55 +0000 (17:07 +0530)]
Fixing BLUETOOTH_EVENT_GATT_CHAR_VAL_CHANGED for notify

using correct  stucture parameter value.

Change-Id: I6a59d53cbe9e1f003ced8823cfa953cd253f44f4
Signed-off-by: Avichal Agarwal <avichal.a@samsung.com>
6 years agoHandling characteristics properties Indicate and Notify functionality 29/188129/3
Avichal Agarwal [Fri, 31 Aug 2018 12:37:33 +0000 (18:07 +0530)]
Handling characteristics properties Indicate and Notify functionality

in case of property Indicate StartNotify will be called
in case of property Notify AcquireNotify will be called

Change-Id: Ice299d23be8e68c44f6b0a6746bafa8169529102
Signed-off-by: Avichal Agarwal <avichal.a@samsung.com>
6 years agoGatt server ReadValue parsing fix 96/188296/3
Abhishek Chandra [Mon, 3 Sep 2018 12:19:00 +0000 (17:49 +0530)]
Gatt server ReadValue parsing fix

Gatt server ReadValue parsing was always returning
NULL as addr was always NULL when passed to
__bt_find_remote_gatt_client_info  ,To fix this
address and request id is extracted from the variant
parameter.

Change-Id: If4b19109e893662b66663013c0051111461cc9bd
Signed-off-by: Abhishek Chandra <abhishek.ch@samsung.com>
6 years agoAdd AVRCP control volume up / down method 80/188580/3
Wootak Jung [Thu, 6 Sep 2018 08:03:21 +0000 (17:03 +0900)]
Add AVRCP control volume up / down method

Change-Id: I3c25106ef79181ed699123a703a0b50300c7853a

6 years agoFix oal_bt_deinit crash issue 34/188634/2
Wootak Jung [Fri, 7 Sep 2018 02:18:50 +0000 (11:18 +0900)]
Fix oal_bt_deinit crash issue

Change-Id: I67bd8b537358e1f22f33490320d0b4e1e691bb23

6 years agoMerge "Add dbus policy for GATT service" into tizen
Pyun DoHyun [Fri, 7 Sep 2018 05:11:10 +0000 (05:11 +0000)]
Merge "Add dbus policy for GATT service" into tizen

6 years agoAdd dbus policy for GATT service 54/188454/1
Wootak Jung [Wed, 5 Sep 2018 02:06:21 +0000 (11:06 +0900)]
Add dbus policy for GATT service

No send_destination because private connection does not have well-known service name

Change-Id: I599f17e562207387e9c61815f31e19e39f3000dd

6 years agoresolving merge conflict with StartNotify 43/188243/1
Avichal Agarwal [Mon, 3 Sep 2018 09:03:18 +0000 (14:33 +0530)]
resolving  merge conflict with StartNotify

Using same structure as defined for
signal BLUETOOTH_EVENT_GATT_CHAR_VAL_CHANGED

Change-Id: Iac3a18c7b76105e765892ba0e8d6d33115cd1e68

6 years agoAdded feature : notification of GATT char Changed Value 80/187980/4
Amit Purwar [Fri, 31 Aug 2018 11:30:37 +0000 (17:00 +0530)]
Added feature : notification of GATT char Changed Value

Change-Id: I387bb74f169da38481ee4a03a65817f0ec0e89f9
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
6 years agoBLE Gatt Client Socket write and notify implementation 10/186410/10
Avichal Agarwal [Thu, 9 Aug 2018 10:04:13 +0000 (15:34 +0530)]
BLE Gatt Client Socket write and notify implementation

Client can write data using file descriptor on Characteristic
with property “write-without-response” . AcquireWrite
Method handler of bluez called to get write file descriptor.

Client can read notifications from File descriptors
on characteristics with property “Notify” .AcquireNotify
method handler of bluez called to get the notify file descriptor.

Change-Id: Idb06a14ae5368540f796d78e666d6896739c5579
Signed-off-by: Avichal Agarwal <avichal.a@samsung.com>
6 years agoBLE Gatt Server Socket notify implementation. 70/186570/6
Avichal Agarwal [Fri, 10 Aug 2018 11:07:50 +0000 (16:37 +0530)]
BLE Gatt Server Socket notify implementation.

Server will notify data using file descriptor on Characteristic
 with property “NOYIFY”. AcquireNotify Method handler of is
implemented in HAL,which provide file descriptor to bluez.

Change-Id: I7b567bd3ede9c1dfdb022d1af286758d93a59c72
Signed-off-by: Avichal Agarwal <avichal.a@samsung.com>
6 years agoRemove duplicated dbus policy 48/187948/1
Wootak Jung [Thu, 30 Aug 2018 00:11:37 +0000 (09:11 +0900)]
Remove duplicated dbus policy

- Some policies are existing in bluez already

Change-Id: I7d71d53f885a8ceb793bbe6a2af484da5fd7cd70

6 years agoBLE Gatt Server Socket write implemetation 65/186165/8
Avichal Agarwal [Tue, 7 Aug 2018 16:51:26 +0000 (22:21 +0530)]
BLE Gatt Server Socket write implemetation

Server with characterstics property 'write-without-response' will receive the data
on socket file descriptor.AcquireWrite method handler is implemented in OAL

Change-Id: I4b8134b8eda87f775ebf72b5e98ce6753e6a9b84
Signed-off-by: Avichal Agarwal <avichal.a@samsung.com>
6 years agoModify dbus policies based on default deny 15/187615/2
Wootak Jung [Mon, 27 Aug 2018 01:54:42 +0000 (10:54 +0900)]
Modify dbus policies based on default deny

Change-Id: I6df07a1032f1d3cd58ea68ae87323f9095143619

6 years agoPBAP: seperate a PBAP connect error cause in detail 52/187252/1
Deokhyun Kim [Tue, 21 Aug 2018 08:23:45 +0000 (17:23 +0900)]
PBAP: seperate a PBAP connect error cause in detail

Change-Id: I45c97b3c5a79103c0ab8af8abf2ccc65016714fa
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
6 years agoModify the package name for bluetooth-haltests 00/187200/1 accepted/tizen/unified/20180823.072123 submit/tizen/20180821.044826 submit/tizen/20180822.041942
DoHyun Pyun [Tue, 21 Aug 2018 02:21:42 +0000 (11:21 +0900)]
Modify the package name for bluetooth-haltests

Change-Id: I60f9b05a8020945964b1e93146f227b29544459e
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoModify OAL hal test binary name 97/187097/1 accepted/tizen/unified/20180821.090920 submit/tizen/20180820.023013
DoHyun Pyun [Mon, 20 Aug 2018 02:27:54 +0000 (11:27 +0900)]
Modify OAL hal test binary name

Change-Id: I60e870bd23f1eb4d4d36551d78d26767732f254d
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoNotification was faling as Gatt serv info was NULL 71/186671/1
Abhishek Chandra [Mon, 13 Aug 2018 09:06:49 +0000 (14:36 +0530)]
Notification was faling as Gatt serv info was NULL

String pointer were compaired for the path in
__bt_gatt_get_service_state , which was causing the
API to return NULL.

Fix : string compairition for service path is used.

Change-Id: I5ec7d768f9a63780cbc18ef1f8b00c31542c3adc
Signed-off-by: Abhishek Chandra <abhishek.ch@samsung.com>
6 years agoRemove the coverage check option for OAL library 73/186473/3 accepted/tizen/unified/20180816.134643 submit/tizen/20180814.011534
DoHyun Pyun [Fri, 10 Aug 2018 00:56:01 +0000 (09:56 +0900)]
Remove the coverage check option for OAL library

Change-Id: I0bc439758904b1c311ff4dcf7ef763c5d0ec5ffb
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoFix memory leak: cb_device_properties in oal-device-mgr.c 04/186304/1
Taesoo Jun [Thu, 9 Aug 2018 00:53:37 +0000 (09:53 +0900)]
Fix memory leak: cb_device_properties in oal-device-mgr.c

Change-Id: Ie5cec6a51ea2e5b20d24df202d727eae31680a79
Signed-off-by: Taesoo Jun <steve.jun@samsung.com>
6 years agoBT 5.0: Implement Is feature support API's 27/186027/5
Anupam Roy [Mon, 6 Aug 2018 21:04:10 +0000 (02:34 +0530)]
BT 5.0: Implement Is feature support API's

This patch implements FRWK API's which check
whether adapter supports LE 2M PHY and
LE CODED PHY features or not

Change-Id: I31284348e3c18f2b2122883c7b83b5d7486dfb62
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
6 years agoMerge "Implement local LE features adapter property" into tizen
Pyun DoHyun [Wed, 8 Aug 2018 06:14:41 +0000 (06:14 +0000)]
Merge "Implement local LE features adapter property" into tizen

6 years agoImplement local LE features adapter property 15/186215/1
Anupam Roy [Wed, 8 Aug 2018 06:13:29 +0000 (11:43 +0530)]
Implement local LE features adapter property

This patch handles Adapter's local LE features property
which will indicate whether adapter supports LE 2M PHY
and LE CODED PHY. This property is emitted by bluetoothd
as adapter's property changed event and handled in
bluetooth HAL layer. LE features are further propagated to
bt-service via new OAL event OAL_EVENT_BLE_LOCAL_FEATURES.
LE features will be finally saved in bt-service daemon.
Application can read these values directly from bt-service.

Change-Id: I9e1b617851693b7bab038a9f10861c6bf3ba8835
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
6 years agodevice : Handle "Does Not Exist" error in get_ida 08/186008/1
Seungyoun Ju [Mon, 6 Aug 2018 11:31:35 +0000 (20:31 +0900)]
device : Handle "Does Not Exist" error in get_ida

[Problem] Even though LE RPA device is not paired, operation failed
 error code (BLUETOOTH_ERROR_INTERNAL) is reported.
[Cause & Measure] Check error->message and report BLUETOOTH_ERROR_NOT_PAIRED
 when LE RPA device is not bonded
[Checking Method] N/A

Change-Id: I726c389c8f2cc0d9458a803ac4bb3463a9e25b60

6 years agoEnhance BT On scenario in power off 06/186006/1
Seungyoun Ju [Fri, 27 Jul 2018 09:30:20 +0000 (18:30 +0900)]
Enhance BT On scenario in power off

[Problem] BT is not turned on when flight mode is unset during power
 off. This is not usual case but it happens sometimes in wearable model.
 Specific case is described in "Checking Method".
[Cause & Measure] If BT on is requested during power off, just update
 vconf of bt state. So that in next boot, BT is turned on.
[Checking Method] BT On -> Cool down (LimitAction) / Flight mode on ->
 BT Off -> Cool down (ShutDown) -> Flight mode off -> BT On, but it's not done
 -> Power off -> Power On -> BT should be turned on

Change-Id: I63775e38b09b77d7eb7c4cf9ae8e8445902b793a

6 years agoMerge "Add new error codes." into tizen
Pyun DoHyun [Fri, 3 Aug 2018 01:22:30 +0000 (01:22 +0000)]
Merge "Add new error codes." into tizen

6 years agoAdded Event Handling in HAL 85/185785/2
Abhishek Chandra [Thu, 2 Aug 2018 08:33:11 +0000 (14:03 +0530)]
Added Event Handling in HAL

[Problem] Start/Stop notify ,Gatt Connected and
disconnected event was not received till bt-service .

[Solution] Added Event handling for Notification change,
Gatt Connected and Disconnected was missing in the
HAL layer .

Change-Id: I72112ace1ed56d711e5a95e799cf2d27989f38ae
Signed-off-by: Abhishek Chandra <abhishek.ch@samsung.com>
6 years agoAdd new error codes. 77/185777/1
Deokhyun Kim [Thu, 2 Aug 2018 08:02:24 +0000 (17:02 +0900)]
Add new error codes.

 - BLUETOOTH_ERROR_NO_DATA
 - BLUETOOTH_ERROR_AUTHORIZATION_REJECTED

Change-Id: I8637ca558bcc0856008d357de96edd80f4665b7c
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
6 years agoVerify 16 testcases for BT HAL (OAL layer) 81/185581/2 accepted/tizen/unified/20180802.090247 submit/tizen/20180801.080227 submit/tizen/20180801.235030
DoHyun Pyun [Wed, 1 Aug 2018 01:30:44 +0000 (10:30 +0900)]
Verify 16 testcases for BT HAL (OAL layer)

Change-Id: I622e388c7ea930e19e979960dd0cdd29d9c9b77c
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoAdd HAL testcases for oal adapater 16/185516/1 accepted/tizen/unified/20180801.080104 submit/tizen/20180731.041022
DoHyun Pyun [Tue, 31 Jul 2018 08:23:43 +0000 (17:23 +0900)]
Add HAL testcases for oal adapater

Change-Id: Iffacb93377869fca5fb66e80e605f8bbbc1b367b
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoMerge "Modified dbus permission for obex" into tizen
Pyun DoHyun [Mon, 30 Jul 2018 07:44:19 +0000 (07:44 +0000)]
Merge "Modified dbus permission for obex" into tizen

6 years agoFix Coverity issues in bluetooth-frwk 66/185266/1
Wootak Jung [Fri, 27 Jul 2018 06:31:05 +0000 (15:31 +0900)]
Fix Coverity issues in bluetooth-frwk

859540, 859527

Change-Id: Ic453cb1dd6094daca0aabc022660a304e766cd0e

6 years agoModified dbus permission for obex 25/184525/2
Amit Purwar [Thu, 19 Jul 2018 10:49:53 +0000 (16:19 +0530)]
Modified dbus permission for obex

Change-Id: Ibb789a70fc7cf0f7cd265bc6e4d440fcbda4bbd6
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
6 years agoMerge "Add HAL testcases for oal manager" into tizen
DoHyun Pyun [Thu, 19 Jul 2018 06:47:47 +0000 (06:47 +0000)]
Merge "Add HAL testcases for oal manager" into tizen

6 years agoFix : Bluetooth log is not removed on user binary 93/184593/1
Seungyoun Ju [Tue, 26 Sep 2017 07:52:06 +0000 (16:52 +0900)]
Fix : Bluetooth log is not removed on user binary

[Problem] Bluetooth log is not deleted on user binary.

[Cause & Measure] Directory owner / group is modified manually. It
 causes inconsistency with system setting. The base directory which is
 passed from dump daemon has setuid bit. So the files and directories
 created by bluetooth script have the same group id to the base
 directory. So bluetooth script doesn't need to change ownership of
 files and directories. This patch removes chown part from script and
 adds write permission to group.

[Checking Method] *#9900# on User binary

Change-Id: Ibfde6fd7a37483dcdd3b0c4f8872dbb436095870

6 years agoFix : Bluetooth disabled event is sent twice 92/184592/1
Seungyoun Ju [Tue, 19 Sep 2017 13:40:24 +0000 (22:40 +0900)]
Fix : Bluetooth disabled event is sent twice

[Problem] Bluetooth disabled event is sent twice when it is turned off
 by entering flight mode. It causes applications malfunction.
 For example, normally disabled event is received by weconnd after all GATT
 services have been removed. But in problem situation, the first
 disabled event happens too early so bluetooth resources (GATT services)
 remain at that time. It makes weconnd enter to strange condition (BT off but
 there are some GATT services). And after bluetooth resources are
 cleared, the second disabled event happens again. But this event is not
 processed by weconnd because it is same state to previous one.

[Cause & Measure] The first event was sent in wrong context (at Powered
 property change). This patch makes the event happen only when
 bluetoothd is terminated. So that, only one disabled event is sent
 after all bluetooth resources are cleared.

[Checking Method] Check disabled event when entering to flight mode.
 This patch is tested under below situation also.
 1. BT on / off
 2. Flight mode on -> Flight mode off
 3. Flight mode on -> BT on -> Flight mode off
 4. Recovery (TxTimeout or Hardware error by sending dbus signal)

Change-Id: Ief9dff1b4074143e1cab41b688cc960f0c73760e

6 years agoAdd HAL testcases for oal manager 69/184569/1
DoHyun Pyun [Thu, 19 Jul 2018 02:00:44 +0000 (11:00 +0900)]
Add HAL testcases for oal manager

Change-Id: Icdc8ea3b9e27b3c7bd5dfee393dc0f6e7017a0d5
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoAdd the base code for Bluetooth HAL testcases 18/184118/1
DoHyun Pyun [Mon, 16 Jul 2018 00:46:20 +0000 (09:46 +0900)]
Add the base code for Bluetooth HAL testcases

Change-Id: I936551aad88dada2f4da3d2dd2cee24466f0c16e
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoFix Coverity issues in Bluetooth-frwk 85/184085/3 accepted/tizen/unified/20180717.063047 submit/tizen/20180715.232650
Atul Rai [Fri, 13 Jul 2018 10:49:11 +0000 (16:19 +0530)]
Fix Coverity issues in Bluetooth-frwk

This patch fixes coverity issues in BT-API, bt-service, BT-OAL and BT-HAL.
Fixed coverity Ids are as below:
859518, 859522, 859523, 859524, 859527, 859533, 859535, 859540,
859542, 859547, 859557, 859562, 859564, 859569, 859575

Change-Id: Ie920767a4581a3a6b206f2842d2a9a6fffc052c9
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoCoverity Fixes in BTAPI and BTHAL 66/183966/2
Anupam Roy [Thu, 12 Jul 2018 15:34:03 +0000 (21:04 +0530)]
Coverity Fixes in BTAPI and BTHAL

This patch fixes below Coverity issues:-

859630, 859619, 859613, 859641, 859629
859628, 859625, 859623, 859615, 859608
859603, 859588, 859643, 859632, 859626
859597, 859639, 859591, 859606

Change-Id: Ic81ffc7e6b98144af30f6e72f0a65e4f1eeff920
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
6 years agoUpdate dbus conf for Agent1 96/183896/1
Seungyoun Ju [Thu, 12 Jul 2018 05:50:37 +0000 (14:50 +0900)]
Update dbus conf for Agent1

[Problem] Below calls are not blocked in sdb default user shell
 $ dbus-send --system --type=method_call --print-reply --dest=org.projectx.bt /org/tizen/adapter_agent org.bluez.Agent1.RequestPinCode objpath:/org/bluez/hci0/dev_78_F7_BE_91_30_26
 $ dbus-send --system --type=method_call --print-reply --dest=org.projectx.bt /org/tizen/adapter_agent org.bluez.Agent1.ReplyAuthorize uint32:0
[Cause & Measure] Some rules are already specified by other bus conf.
 And same destination and different rules exist in multiple files.
 So this patch adds more specific target to rules and removes duplicated
 ones.
[Checking Method] Call dbus method

Change-Id: I71e4ea31cb5539456632aa9a7ec17ea9019fdec6

6 years agoMerge changes Ic0213db6,If8b2ae56 into tizen
Pyun DoHyun [Wed, 11 Jul 2018 00:14:02 +0000 (00:14 +0000)]
Merge changes Ic0213db6,If8b2ae56 into tizen

* changes:
  [BT-Service] Fix Coverity issues
  [HAL]Fix Resource leak (CoverityID:859600, 859593)

6 years ago[BT-Service] Fix Coverity issues 41/183741/1
Atul Rai [Tue, 10 Jul 2018 11:34:55 +0000 (17:04 +0530)]
[BT-Service] Fix Coverity issues

This patch fixes following Coverity issues:
Id: 859618, 859586, 859605, 859624

Change-Id: Ic0213db613df41e663f351cd5d0c667404e6f23d
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[HAL]Fix Resource leak (CoverityID:859600, 859593) 40/183740/1
Atul Rai [Tue, 10 Jul 2018 06:38:16 +0000 (12:08 +0530)]
[HAL]Fix Resource leak (CoverityID:859600, 859593)

Change-Id: If8b2ae56bc402e7e5bcf2eb4f656c7ee9681d744
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoadded dbus policy to allow method_call from bluez to bluetooth-frwk 84/183684/1 submit/tizen/20180710.070923
Amit Purwar [Mon, 9 Jul 2018 09:27:10 +0000 (14:57 +0530)]
added dbus policy to allow method_call from bluez to bluetooth-frwk

Change-Id: I71e2c32fa280cd8d1045923832082594cf3d9e1e
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
6 years agoFix : Some properties of adapter couldn't be handled 29/183529/1
Seungyoun Ju [Fri, 6 Jul 2018 09:06:40 +0000 (18:06 +0900)]
Fix : Some properties of adapter couldn't be handled

[Problem] Some property changed events for adapter object couldn't be handled
[Cause & Measure] It returns in the iterate loop

Change-Id: I23043706ef888d5594e70a64792b91bbd7b36747

6 years agoDeinitialize adv slot and scanner 27/183527/1
injun.yang [Fri, 6 Jul 2018 08:42:50 +0000 (17:42 +0900)]
Deinitialize adv slot and scanner

[Problem] When application request BLE scanning, IN_PROGRESS error returned
[Cause & Measure] After recover bluetooth, adv slot and scanner is not initialized.
[Checking Method] Recover BT durning LE scanning

Change-Id: I117a602ac99bc98c9e063c10734d86e32f95de59
Signed-off-by: injun.yang <injun.yang@samsung.com>
6 years agoSet a default LE(LL) TX packet length to maximum 24/183524/2
Sangki Park [Fri, 6 Jul 2018 08:30:13 +0000 (17:30 +0900)]
Set a default LE(LL) TX packet length to maximum

[Problem] N/A
[Cause & Measure] To support LE packet length extension
[Checking Method] Make a LE connection and check TX/RX size

(AS IS)
    > LL_LENGTH_REQ (DEV -> Gear)
            RX Max : Octets: 251 , Time: 2120  ms
                    TX Max : Octets: 251 , Time: 2120  ms
                    < LL_LENGTH_RSP (Gear -> DEV)
            RX Max : Octets: 251 , Time: 2120  ms
                    TX Max : Octets: 27   , Time: 328  ms

                    (TO BE)
    > LL_LENGTH_REQ (DEV -> Gear)
            RX Max : Octets: 251 , Time: 2120  ms
                    TX Max : Octets: 251 , Time: 2120  ms
                    < LL_LENGTH_RSP (Gear -> DEV)
            RX Max : Octets: 251 , Time: 2120  ms
                    TX Max : Octets: 251 , Time: 2120  ms

Change-Id: Ic193a6f07b75596c1279803cecb63711e53b0c47

6 years agoCode cleanup 23/183523/2
injun.yang [Fri, 6 Jul 2018 08:03:21 +0000 (17:03 +0900)]
Code cleanup

Change-Id: Id446db2902cdefbae4a8aa3401053744f493495e
Signed-off-by: injun.yang <injun.yang@samsung.com>
6 years agoFix improper use of "GetAll" D-Bus method 16/183516/1
Nagaraj D R [Fri, 6 Jul 2018 06:22:37 +0000 (15:22 +0900)]
Fix improper use of "GetAll" D-Bus method

[Problem]Unnecessary use of "GetAll" dbus method on bluetoothd
interface where "Get" dbus method could have been used
[Cause & Measure]Base code issue.
Measure : Replace "GetAll" dbus method with "Get" in places
where only a particular property of a D-Bus object is required

Change-Id: If68b5a9215e9816baf9209303f13aebb3763867e

6 years agoDon't unregister hold advertising information 10/183510/1
Seungyoun Ju [Fri, 6 Jul 2018 06:05:09 +0000 (15:05 +0900)]
Don't unregister hold advertising information

[Problem] Restarted advertising triggered by LE connection request
 doesn't have the information about sender and handle. It causes some
 malfunctions (e.g. Connect LE to out-of-range LE device twice. The
 second one is requested as Directed Advertising (Slave role request))
[Cause & Measure] Advertising information is flushed once it is stopped
 by LE connection request. So even though it is restarted by hold
 advertising logic, there is no sender / advertising handle information.
 It causes the next time hold advertising failed.
 This patch doesn't unregister hold state advertising slot. Because it
 will be used again after timer is expired. Or, once timer is cancelled,
 it will be unregistered properly.
[Checking Method] Connect LE to out-of-range LE device twice

Change-Id: Ia79dd8ab5ba06778d946856883879c1f5a93d898

6 years agoCheck whether dbus name is acquired normally. 06/183506/1
Deokhyun Kim [Fri, 6 Jul 2018 05:52:43 +0000 (14:52 +0900)]
Check whether dbus name is acquired normally.

[Problem] bt-service is terminated before dbus method is called.
[Cause & Measure] dbus own_name is too delayed when system is busy.
  Call g_bus_own_name with callback functions. And then terminate bt-service
  after checking bus_name acquired.
[Checking Method] Repeat to on/off BT

Change-Id: I63b2d8d0714217f21d72d77b7d6f2afb8a75ea1d

6 years agoCheck priviledge 03/183503/1
injun.yang [Fri, 6 Jul 2018 05:16:43 +0000 (14:16 +0900)]
Check priviledge

Change-Id: Ic9ef23563166f7ef0041368423a3e14187397a51
Signed-off-by: injun.yang <injun.yang@samsung.com>
6 years agoFix : Request MTU 99/183499/1
injun.yang [Fri, 6 Jul 2018 05:02:24 +0000 (14:02 +0900)]
Fix : Request MTU

Change-Id: Ia38191d2313bbb3ec5d3148985c72a29b1c6b785
Signed-off-by: injun.yang <injun.yang@samsung.com>
6 years agoHandling le connection interval 98/183498/1
injun.yang [Fri, 6 Jul 2018 04:56:23 +0000 (13:56 +0900)]
Handling le connection interval

[Problem] Whenever several application set the le connection interval,
 it overwirted and affect LE throughput
[Cause & Measure] Manage all demand and keep the minimum interval
 [Checking Method] Set le connection interval

Change-Id: I32b75169c30e7fae8e7419785e5aaa15c6ad8f62
Signed-off-by: injun.yang <injun.yang@samsung.com>
6 years agoFix : Multiple advertising feature was not working 06/183206/1
injun.yang [Tue, 3 Jul 2018 09:36:58 +0000 (18:36 +0900)]
Fix : Multiple advertising feature was not working

[Problem] Multiple advertising feature was not working
[Cause & Measure] Advertising slot was not initialized because BT
chipset supported slot count is over the defined maximum. Platform can
support the large number of slots if BT chipset can. So we don't need
to define maximum value of slots. This patch removes the maximum value
of slots.
[Checking Method] Turn on Bluetooth and check advertising slot's
initialization.

Change-Id: Ic0a3293b4f4e7f7b048b61074fb95b9898efba7e

6 years agoFix the crash 05/183205/1
injun.yang [Tue, 3 Jul 2018 09:35:38 +0000 (18:35 +0900)]
Fix the crash

- le_adv_slot is accessed in __bt_hold_current_advertising_timeout_cb()
      after it's freed.

Change-Id: Id9c394e07f33c8df09b6a8c0f07f0e0afe4b9294
Signed-off-by: injun.yang <injun.yang@samsung.com>
6 years agoFix the memory leak 04/183204/1
injun.yang [Tue, 3 Jul 2018 09:32:46 +0000 (18:32 +0900)]
Fix the memory leak

Change-Id: I59acfc652c1bcf742e919c456fcee15ac34e25d6
Signed-off-by: injun.yang <injun.yang@samsung.com>
6 years agoCode optimize 67/183167/1
injun.yang [Tue, 3 Jul 2018 05:55:06 +0000 (14:55 +0900)]
Code optimize

Change-Id: Id79d33f51003da6786e7bbd18b581836b7e75719
Signed-off-by: injun.yang <injun.yang@samsung.com>
6 years agoChange the name of dbus property of EIR manufacturer data 41/182941/1
injun.yang [Fri, 29 Jun 2018 04:40:49 +0000 (13:40 +0900)]
Change the name of dbus property of EIR manufacturer data

Same property for adv is introduced in upstream

Change-Id: Ib65befe8105d88ca0bdd788ce904e3bfa592e3e2
Signed-off-by: injun.yang <injun.yang@samsung.com>
6 years agoImprove inefficient logic converting UUID to string 21/182821/1
Deokhyun Kim [Thu, 28 Jun 2018 07:33:35 +0000 (16:33 +0900)]
Improve inefficient logic converting UUID to string

Change-Id: Id0ab908edd526cd4c9af977612ab159f24c02ff2
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
6 years agoHandled multiple gatt char with same uuid in a service 64/182564/1 accepted/tizen/unified/20180627.070039 submit/tizen/20180626.232422
Amit Purwar [Tue, 26 Jun 2018 07:05:28 +0000 (12:35 +0530)]
Handled multiple gatt char with same uuid in a service

Change-Id: Ib0eeeea41a002d5eccde82e75e09f9e1fc75b069
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>