platform/core/connectivity/bluetooth-frwk.git
6 years agoApply latest changes in tizen branch 43/162543/1 tizen_next
DoHyun Pyun [Mon, 4 Dec 2017 07:03:43 +0000 (16:03 +0900)]
Apply latest changes in tizen branch

-----------------------------------------------------------
commit 6b1b7c6441ff19fdf870866c431410387b552c38
Author: Seungyoun Ju <sy39.ju@samsung.com>
Date:   Wed Nov 29 18:02:07 2017 +0900

    Fix : Visibility timer is not cancelled when PSCAN off
-----------------------------------------------------------

Change-Id: I5714b1fd0a7cc12a6a44b67dfaf5698649514cdc
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years ago[bt-service]Added support to enable for Auth notifications 15/161915/1
Atul Rai [Tue, 28 Nov 2017 07:15:31 +0000 (12:45 +0530)]
[bt-service]Added support to enable for Auth notifications

This patch adds support for following APIs:
1/ BT_SET_PASSKEY_NOTIFICATION
2/ BT_SET_PIN_CODE
3/ BT_UNSET_PIN_CODE

Change-Id: I2b73600f8c8e3ed2efc2ac78683637de8318dee1
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[OAL/HAL]Add APIs to enable authentication notifications 14/161914/1
Atul Rai [Tue, 28 Nov 2017 07:13:19 +0000 (12:43 +0530)]
[OAL/HAL]Add APIs to enable authentication notifications

Change-Id: Id9cfc36d8fb74722c2ed626cf79538d40e5af28d
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[FRWK] Added RSSI monitoring API support 55/160255/1
Atul Rai [Wed, 15 Nov 2017 06:19:51 +0000 (11:49 +0530)]
[FRWK] Added RSSI monitoring API support

This patch adds support for following APIs and events.
1/ BT_ENABLE_RSSI API: Enable/Disable RSSi Monitoring
2/ BT_GET_RSSI API: Get RAW RSSI value for connected link type
2/ RssiEnabled Event: RSSI Monitoring Enabled/Disables event
3/ RssiAlert Event
4/ RawRssi Event

Change-Id: I1a1b28bf09dc3aae7c4ff8297e6a3e9a3f186716
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[FRWK]Handle Device trusted profiles changed event 54/160254/1
Atul Rai [Wed, 15 Nov 2017 06:08:00 +0000 (11:38 +0530)]
[FRWK]Handle Device trusted profiles changed event

Change-Id: I8bb740f629e9395c349c7477f9deae79069e5361
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[bluetooth-frwk]IPSP Support in TizenNext 89/159889/3
Abhishek Chandra [Mon, 13 Nov 2017 11:47:06 +0000 (17:17 +0530)]
[bluetooth-frwk]IPSP Support in TizenNext

Following IPSP functions support has been added through this patch
1) IPSP intailize
2) IPSP deinitailize
3) IPSP connect
4) IPSP disconnect
5) Callbacks and Event handling for IPSP

Change-Id: Ide7720986517d0f663a93ad898d928079294c590
Signed-off-by: Abhishek Chandra <abhishek.ch@samsung.com>
6 years ago[BT-frwk] Added Set/Get Trusted profile APIs 84/159884/2
Atul Rai [Mon, 13 Nov 2017 11:33:14 +0000 (17:03 +0530)]
[BT-frwk] Added Set/Get Trusted profile APIs

This patch adds support for Trusted profile Get/Set APIs
in bt-service, BT-OAL and BlueZHAL.

Change-Id: I72392598fa6f2bfb01b2443959267209c84339be
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[bt-service] Added support for device APIs 83/159883/2
Atul Rai [Mon, 13 Nov 2017 11:14:23 +0000 (16:44 +0530)]
[bt-service] Added support for device APIs

This patch adds support for following Device APIs
1/ BT_BOND_DEVICE_BY_TYPE
2/ BT_GET_CONNECTED_LINK_TYPE

Change-Id: I35f8e099149653eea5067122759ddad05cac51a6
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[BT-SERVICE] Add support for BT_GET_IS_ALIAS_SET 46/159646/3
Atul Rai [Mon, 13 Nov 2017 12:08:58 +0000 (17:38 +0530)]
[BT-SERVICE] Add support for BT_GET_IS_ALIAS_SET

Change-Id: Id6fd8644718ddcb138fc7760cd9decafec05047b
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[BluezHAL/OAL] Added IS_ALIAS_SET device property 45/159645/3
Atul Rai [Thu, 9 Nov 2017 10:35:23 +0000 (16:05 +0530)]
[BluezHAL/OAL] Added IS_ALIAS_SET device property

Change-Id: I5c7fa7ca6eda6755f58a2b6d2293ef7041a6bd69
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoFix memory leaks in bt-service 44/159644/3
Atul Rai [Mon, 13 Nov 2017 11:56:05 +0000 (17:26 +0530)]
Fix memory leaks in bt-service

Change-Id: Ic83fb631008c16280f4a33900d75184099ce3dce
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agocode rule fixes in bt-service-adaptation 10/159210/1
Amit Purwar [Tue, 7 Nov 2017 11:20:43 +0000 (16:50 +0530)]
code rule fixes in bt-service-adaptation

Change-Id: Id4bddd8a795a27f67c5c472185c083c393b8c9b0
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
6 years agocode rule fixes in OAL 47/155247/2
Amit Purwar [Thu, 12 Oct 2017 11:37:02 +0000 (17:07 +0530)]
code rule fixes in OAL

Change-Id: I17a19f8663023a4c849597bb49fcf2d42e36d889
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
6 years agoFix crash in _bt_free_info_from_invocation_list 54/157854/1
Atul Rai [Thu, 26 Oct 2017 11:54:53 +0000 (17:24 +0530)]
Fix crash in _bt_free_info_from_invocation_list

In this patch we duplicate "sender" using g_strdup in
_bt_save_invocation_context() and release it using g_free
in _bt_free_info_from_invocation_list() to fix bt-service
crash.

Reason: In __bt_bluez_request(), "sender" is obtained by invoking
g_dbus_method_invocation_get_sender(). This sender is owned by
invocation and its memory is released when invocation context is
released. In _bt_save_invocation_context(), pointer to "sender" is
copied in req_info. After dbus method return, memory allocated to
"sender" is release along with invocation context by gdbus. But the
dangling pointer to "sender" saved in req_info is passed to strcacecmp
in _bt_free_info_from_invocation_list() and this caused bt-service crash.

Change-Id: I6d6972fcc3d959d8d9ed170167b5a1119812160f
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoFix memory leak in __bt_get_device_info_in_message 36/157836/1
Atul Rai [Thu, 26 Oct 2017 11:10:44 +0000 (16:40 +0530)]
Fix memory leak in __bt_get_device_info_in_message

Change-Id: Ic4ed3615c7653f81d355e4263cc0cac85d06404e
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[BT-Service] Optimize Audio connect API 27/157627/4
Atul Rai [Wed, 25 Oct 2017 10:35:08 +0000 (16:05 +0530)]
[BT-Service] Optimize Audio connect API

This patch optimizes bt_audio_connect API by removing
bt-service internal calls to OAL/Stack for retriving
device properties. In new implementation locally cached
device info is used for processing audio connect.

Change-Id: Id5b0a23e750d745a767318d11963081f78241aee
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[BT-Service] Optimize bonded device info retrival 72/157472/3
Atul Rai [Tue, 24 Oct 2017 14:07:02 +0000 (19:37 +0530)]
[BT-Service] Optimize bonded device info retrival

This patch does following:
1/ Fetch bonded devices info from stack on BT Adapter "Power On"
and create a local cache for bonded devices in bt-service. This
cache is updated whenever device bonding added/removed or, device
property changed events occur.
2/ Send reply for get_bonded_devices and get_bonded_device_info
queries from locally cached device info.
3/ Use locally cached device info in bt-service and remove bt-service
internal calls to OAL/Stack for retriving device properties.
Note: Currently this is done for HID only. It will be applied in other
places in upcoming patches.

Change-Id: I88d6929fb435dee80f8dd0a771061b710a31c194
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[HAL/OAL] Add LE device conn state changed support 71/157471/1
Atul Rai [Tue, 24 Oct 2017 12:49:45 +0000 (18:19 +0530)]
[HAL/OAL] Add LE device conn state changed support

Change-Id: I5146f5dad0de4b8c41ad4794b31b6c2d5dca9bda
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoMerge "Fix memory corruption in bt-service" into tizen_next
Pyun DoHyun [Thu, 12 Oct 2017 04:52:06 +0000 (04:52 +0000)]
Merge "Fix memory corruption in bt-service" into tizen_next

6 years agoFix memory corruption in bt-service 38/154838/2
Atul Rai [Thu, 5 Oct 2017 07:06:32 +0000 (12:36 +0530)]
Fix memory corruption in bt-service

This patch fixes following issues:
1/ Fix memory corruption due to double free:
In _bt_audio_check_pending_connection(), if _bt_audio_connect() fails, req_info
memory is released by invoking _bt_cleanup_search_info_and_reply_pending_req().
But in this case, _bt_audio_check_pending_connection() returns FALSE and g_free()
is called for req_info again in __bt_hf_handle_audio_connection_state() causing
double free.
2/ Fix malloc/gmalloc and free/g_free mismatch issues.

Change-Id: I012b9179bea63442356f345a4d9496c3ac430273
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoFix for Adapter and LE state management : 70/154170/5
Abhishek Chandra [Tue, 10 Oct 2017 10:47:54 +0000 (16:17 +0530)]
Fix for Adapter and LE state management :
1) Decoupling LE and Adapter states .
2) Adapter/LE state handling when bluez is not up yet.
3) Adapter/LE Enabling and disabling combinations and
Handling of event in below cases and maintaing states:
- Adapter is set to ON , LE will be ON.
- Adapter is set to OFF , LE will be OFF.
- LE is set to ON , Adapter state will not change.
- LE is set to OFF, Adapter state will not change .
- Adapter is ON , and LE is set to OFF and then ON.
- Adapter is OFF-->LE is set to ON--> Adapter is Set
to ON .

Change-Id: I5a74e160f8b65756c3fef7b4fc3a4bcbca21048b
Signed-off-by: Abhishek Chandra <abhishek.ch@samsung.com>
6 years agoFixes & re-factoring in HFP & A2DP 85/154385/2
Anupam Roy [Tue, 10 Oct 2017 06:53:10 +0000 (12:23 +0530)]
Fixes & re-factoring in HFP & A2DP

This patch takes care of following

HFP:
 a. Handle HFP Connection state changed events
 b. Handle HFP Profile connected event
 c. Ignore HFP Profile connecting event
 d. Handle DBUS Context return from HFP Audio Connected event
    as SCO Audio is connected after SLC connection and it finalizes
    HFP overall connection status.

A2DP
 a. Ignore A2DP SRC Connecting & Disconnecting events as they
    are useless events
 b. Handle DBUS Context return from A2DP Src connected event

Change-Id: I9078a77dc729bca5ebd90f2213208cad26653c8d
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
6 years ago[FRWK] Add support for BT_CHECK_ADAPTER API. 11/154311/2
Anupam Roy [Tue, 10 Oct 2017 04:56:07 +0000 (10:26 +0530)]
[FRWK] Add support for BT_CHECK_ADAPTER API.

Change-Id: I07253c535b43df2ccbcc3fc92ff4b489c0daba12
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
6 years ago[OAL] Add 'Get Adapter Powered' status API 10/154310/2
Anupam Roy [Tue, 10 Oct 2017 04:55:17 +0000 (10:25 +0530)]
[OAL] Add 'Get Adapter Powered' status API

Change-Id: I6fcfe9b4d9ef3c085fef217923c6105486947dd4
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
6 years ago[HAL] Add Tizen specific 'Get Adapter Powered' status 09/154309/2
Anupam Roy [Tue, 10 Oct 2017 04:52:38 +0000 (10:22 +0530)]
[HAL] Add Tizen specific 'Get Adapter Powered' status

Checking adapter powered status involves following steps
a. First check valid adapter path. If it fails to get valid
   adapter path, then adapter is considered disabled.
b. Check 'Powered' property of adapter.

Change-Id: I486bb1b314d38ea9dc0798a3124ff6a1ba3d22a4
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
6 years ago[Frwk] Added handling for incoming bond event 99/154199/1
Atul Rai [Mon, 9 Oct 2017 10:06:04 +0000 (15:36 +0530)]
[Frwk] Added handling for incoming bond event

Change-Id: I203c9584eda2730f52a46dd4a9d7c3cb37c13597
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[BluezHAL] Handle incoming bond events 98/154198/1
Atul Rai [Mon, 9 Oct 2017 10:04:47 +0000 (15:34 +0530)]
[BluezHAL] Handle incoming bond events

Change-Id: I192cdd9abe2f73af4add3bff3631ec8690e89ba8
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[CORE] Fix logic to terminate bt-core in ResetAdapter API 97/154197/1
Anupam Roy [Mon, 9 Oct 2017 11:49:39 +0000 (17:19 +0530)]
[CORE] Fix logic to terminate bt-core in ResetAdapter API

bt-core module should be terminated after adding
some delay, so that DBUS reply is successfully
sent to calling process, which is bt-service
in 'ResetAdapter' API  case. If bt-core terminates
before sending reply, following error would be
received by bt-service.
Error Failed to ResetAdapter (Error: Timeout was reached)

Change-Id: Ia6867bf5cc72c1a8566e80a729469b97707ddc59
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
6 years ago[FRWK] Implement 'Reset Adapter' API 94/154194/1
Anupam Roy [Mon, 9 Oct 2017 10:53:12 +0000 (16:23 +0530)]
[FRWK] Implement 'Reset Adapter' API

This patch adds support for BT_RESET_ADAPTER API.
Also it adds the calling part of BT_RECOVER_ADAPTER.

Note: bt-service is currently not terminated in Tizen Next.
It should be handled in future.

Change-Id: Ie57ad96e70e5815f003210a184d16cd2dbf9e44e
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
6 years ago[OAL] Add support for 'Reset Adapter' 89/154189/1
Anupam Roy [Mon, 9 Oct 2017 05:40:06 +0000 (11:10 +0530)]
[OAL] Add support for 'Reset Adapter'

Change-Id: I8f382e0ea22be537ef7dfbeaddb8b072b7fa1b24
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
6 years ago[HAL] Add support for Tizen Specific 'Reset Adapter' 88/154188/1
Anupam Roy [Mon, 9 Oct 2017 06:11:27 +0000 (11:41 +0530)]
[HAL] Add support for Tizen Specific 'Reset Adapter'

Change-Id: Id433c785c22e8eabac9d2f26ee97b448e63b5616
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
6 years agoFix BT Adapter state machine 65/154165/1
Atul Rai [Thu, 5 Oct 2017 13:11:02 +0000 (18:41 +0530)]
Fix BT Adapter state machine

Change-Id: I5d6ad526192d46ae942529f8b18bf9a96e5597a4
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[BluezHAL] Modify HAl utility function names 64/154164/1
Atul Rai [Mon, 9 Oct 2017 04:42:22 +0000 (10:12 +0530)]
[BluezHAL] Modify HAl utility function names

This patch modifies HAL DBUS utility function names to differentiate
from bt-service functions.

Change-Id: I19611410fc3b926d37d301f1ed4661cf78b699ae
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoSend valid address in track changed event 63/154163/1
Atul Rai [Wed, 20 Sep 2017 04:03:51 +0000 (09:33 +0530)]
Send valid address in track changed event

Change-Id: I4442921d4ee11787b32287a594f4ae6cde97f92b
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoFix compilation issues while disabling HAL compilation 34/154034/2
Anupam Roy [Thu, 5 Oct 2017 10:40:33 +0000 (16:10 +0530)]
Fix compilation issues while disabling HAL compilation

This patch takes care of following:-

1. Removes bt_hal compilation flag as after code 4.0
   synchronization, "bt-service" is removed from compilation
   by default, which means now bluetooth-frwk will build
   with BT OAL by default. BT OAL will either use
   BlueZ HAL or other HAL implementation (possibly in future)

2. Move hardware out of bluez_hal and place it inside BT OAL
   directly. BT OAL compilation should only depend upon
   hardware's BT header files. hardware should not be tied with
   HAL implementation. This is in same line with In AOSP upstream,
   where hardware is provided separately inside libhardware project.
   As a result of this change, BT OAL will now build independently,
   however, it needs either Bluez HAL or other HAL implementation
   library for prividing all BT stack functionalities.

3. Fix few compilation issues in OAL's AVRCP TG and CT files
   if bt_bluez_hal is disabled.

Note: bt_bluez_hal compilation flag is by default ON. If this is disabled
      BT OAL will be built but with no underlying HAL implementation.

Change-Id: I3b9f8f27651b06826702bab10ce734098ef7f660
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
6 years ago[FRWK] Add "Custom Discovery" & "Profile Connected devices" 22/154022/3
Anupam Roy [Thu, 5 Oct 2017 04:31:45 +0000 (10:01 +0530)]
[FRWK] Add "Custom Discovery" & "Profile Connected devices"

This patch adds support for following API's:-
1. Tizen Specific Custom Discovery based on discovery roles
2. Find Connected devices based on a given BT profile.

Change-Id: I8a55a952e72b13a52d46d071c634f196ad941496
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
6 years ago[OAL] Add support for Tizen Specific Custom Discovery 21/154021/3
Anupam Roy [Thu, 5 Oct 2017 04:07:21 +0000 (09:37 +0530)]
[OAL] Add support for Tizen Specific Custom Discovery

Change-Id: Ib93aee2e624e8d23e0bcbae25b5bda4d1d355581
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
6 years ago[HAL] Add support for Custom Discovery. 20/154020/4
Anupam Roy [Thu, 5 Oct 2017 03:57:14 +0000 (09:27 +0530)]
[HAL] Add support for Custom Discovery.

This patch adds Tizen specific Custom discovery
support which depends on following roles.
1. BR/EDR
2. LE
3. DUAL

Change-Id: I42691d42c2ca30e89f585dcc4a635da87fdabd94
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
6 years agoCode synchronization with latest tizen 4.0 codes 20/151120/4
DoHyun Pyun [Wed, 20 Sep 2017 02:39:26 +0000 (11:39 +0900)]
Code synchronization with latest tizen 4.0 codes

Complete bt-api, include, and dpm codes in bt-service.
We should synchronize latest bt-service's profile related codes

Change-Id: Ic49ac3b81bbcdb90cf8c3fbf5d046a210ee1845d
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoObex Agent Fix 06/150706/1
Abhishek Chandra [Mon, 18 Sep 2017 08:42:14 +0000 (14:12 +0530)]
Obex Agent Fix

After GAP Agent removal and removal of Device added/deleted
events in the OBEX event handler .

Change-Id: Ib0607dc825278effc666d11ca0edf4c1ab7b3746
Signed-off-by: Abhishek Chandra <abhishek.ch@samsung.com>
6 years ago[FRWK] Fix Audio Connection/Disconnection logic 03/150403/1
Atul Rai [Fri, 15 Sep 2017 10:15:50 +0000 (15:45 +0530)]
[FRWK] Fix Audio Connection/Disconnection logic

Change-Id: I78dd7a4e2850f8a8c8b064dc1f858c0a304e0187
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[FRWK]Added run time audio role select Feature 59/150159/1
Atul Rai [Thu, 14 Sep 2017 11:57:34 +0000 (17:27 +0530)]
[FRWK]Added run time audio role select Feature

Change-Id: I78fe4fb916017f7e19aa610ca90a32cc20bf1134
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[HAL] Added select_audio_role API in profile init 58/150158/1
Atul Rai [Thu, 14 Sep 2017 11:51:36 +0000 (17:21 +0530)]
[HAL] Added select_audio_role API in profile init

This patch does following:
1/ Add select_audio_role() API and invoke it from withing
corresponding profile init function.
2/ Invoke register_media_player API from AVRCP Target init.
3/ Remove excess logs from BlueZ HAL.

Change-Id: I27cab78c2657d72107b18ad375f5a9ecb72bbe7a
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[Core] Sync bt-core from tizen branch 57/150157/1
Atul Rai [Thu, 14 Sep 2017 11:47:24 +0000 (17:17 +0530)]
[Core] Sync bt-core from tizen branch

Change-Id: I9613c114aaaf06086b9981cc8f8159f9756a0316
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoAVRCP CT: Fix invalid object_path/proxy issue 56/150156/1
Atul Rai [Mon, 11 Sep 2017 11:55:40 +0000 (17:25 +0530)]
AVRCP CT: Fix invalid object_path/proxy issue

Change-Id: I45094ae1069ac190820b4cb77615da9393cf73ae
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoRestructure AVRCP CT role functionalities 55/150155/1
Atul Rai [Mon, 11 Sep 2017 07:15:01 +0000 (12:45 +0530)]
Restructure AVRCP CT role functionalities

This patch restructures AVRCP CT role functions and events in OAL and
bt-service to align AVRCP CT code with new Bluetooth architecture, thus
removing unnecessary code logic etc.

Change-Id: I237feae74456ae9bbe615fd06bc9fbd30c254a1a
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoFix static analysis issues in bt-api 54/150154/1
Atul Rai [Mon, 11 Sep 2017 08:20:29 +0000 (13:50 +0530)]
Fix static analysis issues in bt-api

Change-Id: I36f4f9ca80d649165cac2661a459fb2fd601672a
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoFix Bluetooth connection authorization 23/148823/2
Atul Rai [Mon, 11 Sep 2017 03:42:18 +0000 (09:12 +0530)]
Fix Bluetooth connection authorization

This patch does following:
1/ Remove _bt_send_event() call (send event to bt-api) from BT HAL
2/ Send Audio/Iotivity/SAP/HID etc profile connection authorization
event to bt-service. Accept/Reject logic will be decided in bt-service.

Change-Id: Id56156cdbe456322720ed623b26723f58b4e198a
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[FRWK] Fix bt-service GAP agent conflict with HAL 22/148822/2
Atul Rai [Fri, 8 Sep 2017 11:40:52 +0000 (17:10 +0530)]
[FRWK] Fix bt-service GAP agent conflict with HAL

This patch does following:
1/ Remove GAP agent code from bt-service
2/ Remove Obex and bluez proxy dependencies from adapter-core
3/ Integrate bt-service OBEX with OAL APIs (set osp server, reply
obex connection authorization etc)

Change-Id: I9764715a6b9d71b48cb99e9f535dd50c3c948beb
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[OAL]Added API to enable/disable OSP server in GAP 21/148821/2
Atul Rai [Fri, 8 Sep 2017 08:20:18 +0000 (13:50 +0530)]
[OAL]Added API to enable/disable OSP server in GAP

Change-Id: I9dcd79ce0c4dfaa211de331d89dba405ece2d266
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years ago[HAL]Add API to set/unset OSP server in GAP agent 20/148820/1
Atul Rai [Fri, 8 Sep 2017 08:15:26 +0000 (13:45 +0530)]
[HAL]Add API to set/unset OSP server in GAP agent

Change-Id: I9c5e241214495420b9914d20d023c309232faa3c
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoLE adapter Enable/Disable implementation in New HAL architecture ,OAL 77/146677/1
Abhishek Chandra [Wed, 30 Aug 2017 04:30:26 +0000 (10:00 +0530)]
LE adapter Enable/Disable implementation in New HAL architecture ,OAL
and Bt-service in Tizen_Next.

Change-Id: Iad836a5da661ef4f9cf1182e6874bf3d3dc24d17
Signed-off-by: Abhishek Chandra <abhishek.ch@samsung.com>
6 years agoRe-base the codes as tizen 4.0 configurable architecture 88/144288/2
DoHyun Pyun [Wed, 16 Aug 2017 07:00:55 +0000 (16:00 +0900)]
Re-base the codes as tizen 4.0 configurable architecture

Change-Id: Id134308f5403c197d3f794868a912173876ed324
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoFix unused build error 87/144287/1
DoHyun Pyun [Wed, 16 Aug 2017 01:05:53 +0000 (10:05 +0900)]
Fix unused build error

Change-Id: I30a235cb45de7a052409c3e6fe4a7aa29d0772eb
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoCode changes to Fix OBEX/OPP related issues , due to change in 21/143921/2
Abhishek Chandra [Mon, 14 Aug 2017 03:30:03 +0000 (09:00 +0530)]
Code changes to Fix OBEX/OPP related issues , due to change in
the usage API's , _bt_get_system_gconn  is used instead of  _bt_get_session_gconn. File transfer was not working due to this.

Change-Id: I3e379aff25182460f00d31cb9f5ec23616078db3
Signed-off-by: Abhishek Chandra <abhishek.ch@samsung.com>
6 years agoPANU/NAP Profiles to New Architecture. 37/140437/1
Abhishek Chandra [Tue, 25 Jul 2017 04:04:24 +0000 (09:34 +0530)]
PANU/NAP Profiles to New Architecture.

This patch enables PANU/NAP related profiles in the new architecture,
by porting it from older architecture.
Flag to enable and disable PANU/NAP: "TIZEN_FEATURE_BT_PAN_NAP"

Change-Id: Ib4e7f9de66d6311f8e42687d79bc6e84490a7771
Signed-off-by: Abhishek Chandra <abhishek.ch@samsung.com>
6 years agoObex Profiles to New Architecture. 08/136508/2
Abhishek Chandra [Fri, 30 Jun 2017 04:59:03 +0000 (10:29 +0530)]
Obex Profiles to New Architecture.

This patch enables obex related profiles in the new architecture,
by porting it from older architecture.
Updated Review Comment : changed the Flag name from
"TIZEN_BLUETOOTH_OBEX_ENABLE" to "TIZEN_FEATURE_BT_OBEX"

Change-Id: Icef2a9efaec97717672efa8790a99f99b6f65dda
Signed-off-by: Abhishek Chandra <abhishek.ch@samsung.com>
6 years agoAdd rfcomm socket disconnected event sending 60/134060/2
Atul Rai [Wed, 14 Jun 2017 09:59:27 +0000 (15:29 +0530)]
Add rfcomm socket disconnected event sending

This patch adds implementation to send RFCOMM client disconnection event
if an incomming client (Local device: RFCOMM Server) is disconnected.

Change-Id: I7e5f680329608a9d90cd54e02b3feaeddb7af018
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoAdded implementation for __bt_service_release() 59/134059/2
Atul Rai [Tue, 13 Jun 2017 12:03:00 +0000 (17:33 +0530)]
Added implementation for __bt_service_release()

Change-Id: I5f25495cca319172bf330596530d5474a8e9250d
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agosend BT_GATT_SERVER_NOTIFICATION_COMPLETED to app 58/134058/2
Atul Rai [Tue, 13 Jun 2017 12:01:53 +0000 (17:31 +0530)]
send BT_GATT_SERVER_NOTIFICATION_COMPLETED to app

Change-Id: I32af49ca755c26912cc3465695d1b8b203dbcb10
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoRemove unnecessary logic for request Ids 57/134057/2
Atul Rai [Tue, 13 Jun 2017 10:41:36 +0000 (16:11 +0530)]
Remove unnecessary logic for request Ids

This patch removes request Id logic for SYNC/ASYNC requests from
BT-API to bt-service, as request Ids are no longer used in new BT
architecture. Instead _bt_save_invocation_context() is used for
saving context for ASYNC requests from BT-API.

Change-Id: I9edc0c6df864ca32e3b368a0c62f5ba97ac5c1fd
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoAdded logs in LE scan results 56/134056/2
Atul Rai [Tue, 13 Jun 2017 11:27:42 +0000 (16:57 +0530)]
Added logs in LE scan results

Change-Id: I1cdcec537a62768bda0fb0403448c5a4e5a8e634
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoFix data type sent in reply to BT-API from bt-service 55/134055/2
Atul Rai [Tue, 13 Jun 2017 11:02:33 +0000 (16:32 +0530)]
Fix data type sent in reply to BT-API from bt-service

This patch fixes the mismatched output parameter data type sent
to bt-api over dbus in reply to various requests.

Change-Id: Iae3ceb83014f28f8c4fd7d51aaebe958a3fc630a
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoReste GATT data on GATT profile cleanup 54/134054/1
Atul Rai [Tue, 13 Jun 2017 10:33:21 +0000 (16:03 +0530)]
Reste GATT data on GATT profile cleanup

Change-Id: I837851a7f2dfdc81107ae807663cd925c3994448
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoFix RFCOMM server cleanup 53/134053/1
Atul Rai [Tue, 13 Jun 2017 10:28:48 +0000 (15:58 +0530)]
Fix RFCOMM server cleanup

Change-Id: I2c5708fd3d08c66d5c7b05a0ce7cd0d03c563271
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoFix build error & warnings 52/129152/1
Atul Rai [Mon, 15 May 2017 07:25:26 +0000 (12:55 +0530)]
Fix build error & warnings

Change-Id: I8e1dbb5a94a4997fcbee5685c9ea6e62975e9340
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoRemove compiler warnings 72/127772/1
Atul Rai [Mon, 1 May 2017 10:10:47 +0000 (15:40 +0530)]
Remove compiler warnings

Change-Id: Ib870e64894a89450274a66ca7aff7cd4f54c01d6
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoFix NameOwnerChanged signal subscribe logic 71/127771/1
Atul Rai [Mon, 1 May 2017 08:37:10 +0000 (14:07 +0530)]
Fix NameOwnerChanged signal subscribe logic

Change-Id: Ie9f6c668ed5701a14900a9f484bc580bc38004ab
Signed-off-by: Atul Rai <a.rai@samsung.com>
6 years agoAdd discovery_duration in adapter_start_discovery() 70/127770/1
Atul Rai [Mon, 1 May 2017 08:24:38 +0000 (13:54 +0530)]
Add discovery_duration in adapter_start_discovery()

Change-Id: I0a7acfb9834d365e1428411a6bb678d3d49de34a
Signed-off-by: Atul Rai <a.rai@samsung.com>
7 years ago[BTMW:FRWK] Add GATT Server Exported API's 17/124917/1
Anupam Roy [Wed, 12 Apr 2017 09:43:15 +0000 (15:13 +0530)]
[BTMW:FRWK] Add GATT Server Exported API's

Change-Id: Ica08044915989ade10cdc089fa5a8ffa048e388d
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
7 years ago[BTMW: Service] Add Support for GATT Server 16/124916/1
Anupam Roy [Wed, 12 Apr 2017 09:26:00 +0000 (14:56 +0530)]
[BTMW: Service] Add Support for GATT Server

This patch temporarily disables HTTP proxy
and BT Frwk Test

Change-Id: Ic69d0ecd43a118a51cb707979bac84e0e6bf75d0
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
7 years ago[OAL] Add support for GATT Server API's & callbacks 15/124915/1
Anupam Roy [Wed, 12 Apr 2017 06:37:20 +0000 (12:07 +0530)]
[OAL] Add support for GATT Server API's & callbacks

Change-Id: Iee3e11a3307fce42349fc4cf0c8d762ba975422d
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
7 years ago[Bluez HAL] Adapt GATT Server 14/124914/1
Anupam Roy [Tue, 11 Apr 2017 14:07:53 +0000 (19:37 +0530)]
[Bluez HAL] Adapt GATT Server

This patch adds support of GATT server
operations in Bluez HAL

Change-Id: I358867fc83f35c9a37a60191fa8e649a8ed7e966
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
7 years ago[Adapt: Frwk] Added BLE scan support 42/123242/1
Atul Rai [Thu, 30 Mar 2017 11:56:28 +0000 (17:26 +0530)]
[Adapt: Frwk] Added BLE scan support

This patch implements BLE scan APIs and events to enable below
functionalities:
1/ Set Scan parameters
2/ Get LE scan status
3/ Start LE Scan
4/ Stop LE scan

Change-Id: Ib4c18ad36ab4906da725afb5a8fc15713d992d3c
Signed-off-by: Atul Rai <a.rai@samsung.com>
7 years ago[Adapt: OAL] Added GATT client APIs for LE Scan 41/123241/1
Atul Rai [Thu, 30 Mar 2017 11:54:46 +0000 (17:24 +0530)]
[Adapt: OAL] Added GATT client APIs for LE Scan

This patch implements GATT client APIs and events in OAL to enable
Bluetooth LE scan.

Change-Id: I4bba54eac30ebdc6eac2f93c85f2975b251f647b
Signed-off-by: Atul Rai <a.rai@samsung.com>
7 years ago[BluezHAL] Added LE Scan API support 40/123240/1
Atul Rai [Thu, 30 Mar 2017 11:48:22 +0000 (17:18 +0530)]
[BluezHAL] Added LE Scan API support

This patch implements following HAL APIs and corresponding
event handling to enable LE scan functionality:
1/ GATT Client register
2/ GATT Client LE scan
3/ GATT Client set scan parameters

Change-Id: I5919f81a3ad230b481b04adfb237f26636730e20
Signed-off-by: Atul Rai <a.rai@samsung.com>
7 years ago[BluezHAL]Added generic API for event_handler_cb 39/123239/1
Atul Rai [Wed, 29 Mar 2017 06:53:31 +0000 (12:23 +0530)]
[BluezHAL]Added generic API for event_handler_cb

This patch removes individual APIs for registering event handler
callbacks for different profiles/modules and adds 1 generic event
receiver API to register event_handler_cb for different modules.

Change-Id: I91ae496f7f5e50709c5c19932c1369445bb08ba8
Signed-off-by: Atul Rai <a.rai@samsung.com>
7 years ago[Adapt] Fix warnings 21/120621/2
Anupam Roy [Thu, 23 Mar 2017 10:12:14 +0000 (15:42 +0530)]
[Adapt] Fix warnings

Change-Id: I5935fae8f29032df8c08444cf837c235dc7bd83c
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
7 years ago[Adapt] Handle Advertising App abnormal termination scenario 12/119912/2
Anupam Roy [Mon, 20 Mar 2017 12:38:57 +0000 (18:08 +0530)]
[Adapt] Handle Advertising App abnormal termination scenario

If Advertising application is abnormally terminated
(caught by "NameOwnerChanged" signal), then disable
advertising on all adv instances that were used by the app.
Also, unregister the server instance that was allocated with stack
for advertising

Change-Id: I36298850e2e99c13b472c50d32a7ece2b565c5d7
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
7 years ago[Adapt] Include proper data size in events from OAL to service 67/119867/2
Anupam Roy [Mon, 20 Mar 2017 10:09:19 +0000 (15:39 +0530)]
[Adapt] Include proper data size in events from OAL to service

Apart from fixing data size in OAL events, this patch
also takes care of following

- Include some DEBUG prints
- Remove redundant codes in A2DP src role

Change-Id: Ib6dd1086195be415c8cb026eff8ebc34bec72de6
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
7 years ago[Adapt: FRWK] Adapt LE Advertising API's for Android HAL 37/119837/1
Anupam Roy [Mon, 20 Mar 2017 08:39:51 +0000 (14:09 +0530)]
[Adapt: FRWK] Adapt LE Advertising API's for Android HAL

Change-Id: I640716aa462e0c14c5592fedf41d1c2ac1131980
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
7 years ago[Adapt: OAL] Add LE Advertising API's in OAL 35/119835/1
Anupam Roy [Mon, 20 Mar 2017 08:37:25 +0000 (14:07 +0530)]
[Adapt: OAL] Add LE Advertising API's in OAL

Change-Id: Ie017765df7dc506056880c8e542eb6eb66b0a335
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
7 years ago[Adapt: HAL] Add support for LE Advertising 34/119834/1
Anupam Roy [Mon, 20 Mar 2017 08:32:28 +0000 (14:02 +0530)]
[Adapt: HAL] Add support for LE Advertising

Change-Id: I8bc283e632a0bce274508712c5f24de1eed975be
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
7 years ago[Adapt: FRWK] Removed VID/PID info from dev_info 54/117754/1
Atul Rai [Tue, 7 Mar 2017 06:08:26 +0000 (11:38 +0530)]
[Adapt: FRWK] Removed VID/PID info from dev_info

This patch removes VID/PID info from bluetooth_device_info_t in Tizen
platform.

Change-Id: I1cd4a8ff864e2cbab64cbcca11d6a080c035f870
Signed-off-by: Atul Rai <a.rai@samsung.com>
7 years ago[Adapt:FRWK] Add API to register custom event handler 08/117408/1
Atul Rai [Fri, 3 Mar 2017 06:06:59 +0000 (11:36 +0530)]
[Adapt:FRWK] Add API to register custom event handler

Change-Id: I7b55755807e0716ccab26116f0a20911d8214a3e
Signed-off-by: Atul Rai <a.rai@samsung.com>
7 years ago[Adapt: FRWK] Fix various issues 07/117407/1
Atul Rai [Fri, 3 Mar 2017 04:56:58 +0000 (10:26 +0530)]
[Adapt: FRWK] Fix various issues

This patch fixes following issues:
1/ Add VID, PID and device_type property in device info in bt-service
2/ Set/Reset logic for BT_VCONF_STATUS in bt-service adapter
3/ Handle bonding complete pending indefenetly in some cases for BLE devices
4/ Switch context to main thread before handling any event from OAL in
bt-service.

Change-Id: I7fe886bde4e1338edf5891097adaa017bbe1ef2b
Signed-off-by: Atul Rai <a.rai@samsung.com>
7 years ago[Adapt:Frwk] Implement AVRCP TARGET role BT-FRWK 79/117179/1
Atul Rai [Fri, 3 Mar 2017 03:53:47 +0000 (09:23 +0530)]
[Adapt:Frwk] Implement AVRCP TARGET role BT-FRWK

This patch adds bt-service and bt-api implementation for
AVRCP TARGET role.

Change-Id: I75362b6240d461107c4a4b2f6ae4715c8cab47e5
Signed-off-by: Atul Rai <a.rai@samsung.com>
7 years ago[Adapt : OAL]Implement AVRCP TARGET role in OAL 78/117178/1
Atul Rai [Fri, 10 Feb 2017 13:19:40 +0000 (18:49 +0530)]
[Adapt : OAL]Implement AVRCP TARGET role in OAL

This patch adds OAL implementation for AVRCP Target role.

Change-Id: I423511cc08d236189257ed78769cf5c69c1d8115
Signed-off-by: Atul Rai <a.rai@samsung.com>
7 years ago[BluezHAL] Implement BlueZ HAL for AVRCP TARGET 77/117177/1
Atul Rai [Fri, 10 Feb 2017 13:16:17 +0000 (18:46 +0530)]
[BluezHAL] Implement BlueZ HAL for AVRCP TARGET

This patch adds BlueZ HAL interface implementation for
AVRCP target role.

Change-Id: I695265e98b8702c04aeba7ab2291b9595c50510e
Signed-off-by: Atul Rai <a.rai@samsung.com>
7 years ago[Adapt: Frwk] Implement AVRCP Controller role in bt-service 32/116932/2
Nilesh Trimbake [Wed, 8 Feb 2017 12:49:16 +0000 (18:19 +0530)]
[Adapt: Frwk] Implement AVRCP Controller role in bt-service

    This patch handles following:-
        a/ AVRCP Target Connect
        b/ AVRCP Target Disconnect
        c/ AVRCP Target Connection handler states
        d/ Send command, get track info, set property

Change-Id: Ib8d3a138b1d1a2458597ccd4a0034b0462b9ea57
Signed-off-by: Nilesh Trimbake <t.shripati@samsung.com>
7 years ago[Adapt : OAL] Add AVRCP Controller role codes in OAL 31/116931/2
Nilesh Trimbake [Wed, 8 Feb 2017 11:49:06 +0000 (17:19 +0530)]
[Adapt : OAL] Add AVRCP Controller role codes in OAL

Change-Id: I48c412a71ad380d5b28e0ba4c984cb99700d06a2
Signed-off-by: Nilesh Trimbake <t.shripati@samsung.com>
7 years ago[Adapt : Bluez HAL] Added AVRCP Controller Role 30/116930/1
Nilesh Trimbake [Fri, 10 Feb 2017 13:35:59 +0000 (19:05 +0530)]
[Adapt : Bluez HAL] Added AVRCP Controller Role

This patch primarily adds following:-
        a/ AVRCP(Controller) Android HAL interface
        b/ Implement Bluez based AVRCP Controller, Connect, Disconnect,
                send command, get track info methods
        c/ Implemnt AVRCP Controller event handler

Change-Id: I031e5d9b775f4c1f486b2a84522126e1c0bbd326
Signed-off-by: Nilesh Trimbake <t.shripati@samsung.com>
7 years ago[Adapt : FRWK] Implement A2DP Sink role in bt-service 29/116929/1
Nilesh Trimbake [Wed, 8 Feb 2017 05:38:52 +0000 (11:08 +0530)]
[Adapt : FRWK] Implement A2DP Sink role in bt-service

    This patch handles following:-
        a/ AV Source Connect
        b/ AV Source Disconnect
        c/ AV Source Connection handler states

Change-Id: Id31ad79fa6b20198f8d6ad9267a9dc360b6806ad
Signed-off-by: Nilesh Trimbake <t.shripati@samsung.com>
7 years ago[Adapt : OAL] Add A2DP Sink role codes in OAL 28/116928/1
Nilesh Trimbake [Fri, 25 Nov 2016 11:01:54 +0000 (16:31 +0530)]
[Adapt : OAL] Add A2DP Sink role codes in OAL

Change-Id: Ic1a7f065f4dccc50974ec4a9cc87c9f8116b0203
Signed-off-by: Nilesh Trimbake <t.shripati@samsung.com>
7 years ago[Adapt : Bluez HAL] Added A2DP Sink role 27/116927/1
Nilesh Trimbake [Fri, 25 Nov 2016 10:00:03 +0000 (15:30 +0530)]
[Adapt : Bluez HAL] Added A2DP Sink role

This patch primarily adds following:-
        a/ AV(Sink) Android HAL interface
        b/ Implement Bluez based A2DP Sink Init, Connect, Disconnect methods
        c/ Implemnt A2DP Sink Connection event handlers

Change-Id: I6ec89a5288d05475f881ef872236fce7001fb59d
Signed-off-by: Nilesh Trimbake <t.shripati@samsung.com>
7 years agoFix build error for aarch64 22/113822/1
Atul Rai [Thu, 9 Feb 2017 04:06:30 +0000 (09:36 +0530)]
Fix build error for aarch64

Change-Id: Ida9926060eb96761db377d77fe9d2ad4bffd2102
Signed-off-by: Atul Rai <a.rai@samsung.com>
7 years ago[Adapt] Adapt changes related to Tizen Wearable profile 72/112972/2
Anupam Roy [Fri, 3 Feb 2017 12:38:11 +0000 (18:08 +0530)]
[Adapt] Adapt changes related to Tizen Wearable profile

a/ Change macro name from TIZEN_WEARABLE to TIZEN_PROFILE_WEARABLE
b/ Adapt changes from tizen_3.0 branch related to wearable profile

Change-Id: I911169818e0a7d8c1cb3edd21c536b3868262df3
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
7 years ago[Adapt] Code sync from tizen branch 49/98049/1
Atul Rai [Fri, 11 Nov 2016 09:47:24 +0000 (15:17 +0530)]
[Adapt] Code sync from tizen branch

This patch imports bluetooth-frwk tizen branch changes to tizen_next
branch till following commit:

commit 14054febb93ce9b5a2259745e29d9d069cc96158
Author: DoHyun Pyun <dh79.pyun@samsung.com>
Date:   Fri Nov 11 14:25:39 2016 +0900

   Add the bluetooth_opp_get_transfer_progress function

Change-Id: I294c3515c2ecab7fd61c11366f61cd06cc837b57
Signed-off-by: Atul Rai <a.rai@samsung.com>
7 years ago[Adapt:BlueZHAL] Fix bt-service unexpected termination 48/98048/1
Atul Rai [Fri, 11 Nov 2016 09:25:46 +0000 (14:55 +0530)]
[Adapt:BlueZHAL] Fix bt-service unexpected termination

Change-Id: Ia2dc06d4c07c2b69ff20cca1235f65f56f55f58b
Signed-off-by: Atul Rai <a.rai@samsung.com>
7 years ago[Adapt:HDP]Fix HDP app unexpected termination 47/98047/1
Atul Rai [Fri, 11 Nov 2016 08:46:21 +0000 (14:16 +0530)]
[Adapt:HDP]Fix HDP app unexpected termination

This patch fixes unexpected crash of HDP application in bt-api
when HDP connection is terminated from remote device.

Change-Id: I282260b9ac0fb2bd10b5374e8f1c8791f8172076
Signed-off-by: Atul Rai <a.rai@samsung.com>