platform/core/connectivity/bluetooth-frwk.git
5 years agoModify dbus policy conf file 10/205610/1 tizen_4.0
Wootak Jung [Wed, 8 May 2019 04:53:56 +0000 (13:53 +0900)]
Modify dbus policy conf file

Add deny policy to resolve policychecker warning

Change-Id: I3c2e1e7c61fcb953536f8fdf2bc52c928b262ce0

5 years agoAdd the type check logic to avoid crash 15/200415/1 accepted/tizen_4.0_unified accepted/tizen/4.0/unified/20190226.044243 submit/tizen_4.0/20190225.020515
DoHyun Pyun [Mon, 25 Feb 2019 00:50:54 +0000 (09:50 +0900)]
Add the type check logic to avoid crash

Change-Id: I6a29c351bb52ab39df60ebe8812166e808c08745
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoFix the crash dump in FHUB efl TCT 12/199212/1 accepted/tizen/4.0/unified/20190212.083135 submit/tizen_4.0/20190207.075845
DoHyun Pyun [Thu, 7 Feb 2019 07:57:28 +0000 (16:57 +0900)]
Fix the crash dump in FHUB efl TCT

Change-Id: I8455d474bad37f8e1eaff604b10d97d3ac52f95f
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
5 years agoFix the prevent issue 17/196617/2
DoHyun Pyun [Thu, 3 Jan 2019 04:14:20 +0000 (13:14 +0900)]
Fix the prevent issue

Change-Id: Ibee8b47bfacd61f6704915a881da0fc459b99a1b
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoFix unref issue 08/180408/1
injun.yang [Tue, 29 May 2018 07:37:01 +0000 (16:37 +0900)]
Fix unref issue

Change-Id: I473458f3435f781b1828758a4c799de7b69eca25

6 years agoEnhance debug message 04/180404/1
injun.yang [Tue, 29 May 2018 07:30:32 +0000 (16:30 +0900)]
Enhance debug message

Change-Id: I1511a363c56ee1ce3f2f184dc82c2b4c2e0aa998

6 years agoFix double unref issue. 36/178636/1
Deokhyun Kim [Fri, 11 May 2018 04:36:51 +0000 (13:36 +0900)]
Fix double unref issue.

 - result is freed twice by g_variant_unref()

Change-Id: I9f3c344e4ff9f80c46dbef6415c41d855f784f70
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
6 years agoFix : Invalid GVariant format 82/176182/1
injun.yang [Tue, 17 Apr 2018 08:48:47 +0000 (17:48 +0900)]
Fix : Invalid GVariant format

Change-Id: I679669dcaef3b3c4695a99f3e813015324c3eb62

6 years agoFix: Invalid GVariant format 79/175979/1
injun.yang [Mon, 16 Apr 2018 05:07:11 +0000 (14:07 +0900)]
Fix: Invalid GVariant format

Change-Id: I5c1b23f371c6dabeb97f618c1377fbccf358108e

6 years agoFix crash on avrcp controller API (SIGSEGV) 44/173644/2
Sangki Park [Thu, 22 Mar 2018 08:28:00 +0000 (17:28 +0900)]
Fix crash on avrcp controller API (SIGSEGV)

0  0xf722c048 in g_value_unset () from /lib/libgobject-2.0.so.0
1  0xaaeca726 in _bt_avrcp_control_set_property ()
2  0xaaece41c in __bt_bluez_request ()
3  0xaaed4d9c in ?? ()
4  0xf7432a60 in ?? () from /lib/libgio-2.0.so.0
5  0xf71338e8 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
6  0xf7133c78 in ?? () from /lib/libglib-2.0.so.0
7  0xf7133fd8 in g_main_loop_run () from /lib/libglib-2.0.so.0
8  0xaae5726a in main ()

Change-Id: I8b5d77241c1b8788ba91531a4c80cd6f2f280970

6 years agoEnhance logging for secure address 69/173069/1
injun.yang [Mon, 19 Mar 2018 10:25:54 +0000 (19:25 +0900)]
Enhance logging for secure address

Change-Id: I99a8654e154143d2df2ae02d7c190f4e6afb17a0

6 years agoRFCOMM socket : free connection info before sending callback 04/167304/1
Seungyoun Ju [Tue, 16 Jan 2018 08:41:37 +0000 (17:41 +0900)]
RFCOMM socket : free connection info before sending callback

[Problem] Application crash happens when
 bluetooth_rfcomm_remove_socket() is called in socket disconnect callback.
[Cause & Measure] Connection information structure is freed by
 bluetooth_rfcomm_remove_socket(). But after returning back from
 callback, already freed structure is accessed. It causes crash.
 Before sending disconnection event, free related structure first. So
 that, application can use bluetooth_rfcomm_remove_socket() in
 disconnection callback without crash.
[Checking Method] Call bluetooth_rfcomm_remove_socket() in server
 socket's disconnection callback.

(gdb) f 0
128 conn = l->data;
(gdb) p *info
$1 = {object_id = 2874763544,
  path = 0xf6ecb840, id = 1802724708,
  uuid = 0x2e706f74 <error: Cannot access memory at address 0x2e706f74>, rfcomm_conns = 0x73754244, disconnect_idle_id = 1701013760}

Change-Id: I1a3436979bb1fbb3ebfa4890157f2b4868de23fd

6 years agoEnhance debug message 52/165552/1 accepted/tizen/4.0/unified/20180111.051110 submit/tizen_4.0/20180108.000053 submit/tizen_4.0/20180108.235143 tizen_4.0.IoT.p2_release
injun.yang [Tue, 2 Jan 2018 06:14:07 +0000 (15:14 +0900)]
Enhance debug message

When ATT error occured, display gatt handler

Change-Id: I7bd5e3bf7ba675bb58e8b65b2b24b649eead0e76

6 years agoAdd HFP HF API : bt_hf_request_call_status_info_list() 94/164994/1
Sangki Park [Fri, 22 Dec 2017 06:45:27 +0000 (15:45 +0900)]
Add HFP HF API : bt_hf_request_call_status_info_list()

Change-Id: I02ab078be712d61ae99794422b1e339c51a826eb
Signed-off-by: Sangki Park <sangki79.park@samsung.com>
6 years agoAdd AVRCP control volume up / down method 82/164182/1
DoHyun Pyun [Mon, 18 Dec 2017 01:34:37 +0000 (10:34 +0900)]
Add AVRCP control volume up / down method

Change-Id: Ia318c8f8329152399e44061751fb802d9ee48095
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoRemove bluetooth-tools requires 74/163874/1 accepted/tizen/4.0/unified/20171214.050401 submit/tizen_4.0/20171214.004613
DoHyun Pyun [Thu, 14 Dec 2017 00:23:18 +0000 (09:23 +0900)]
Remove bluetooth-tools requires

Change-Id: I8e21b92e430ac7c922705813a4e4826d3549e86c
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
6 years agoAdd missed function names to check privilege. 71/163371/1
Deokhyun Kim [Mon, 11 Dec 2017 00:44:01 +0000 (09:44 +0900)]
Add missed function names to check privilege.

Change-Id: Ie2678b6b91e2535f48f7b93af4bc2501629b0eff
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
6 years agoFix _bt_dpm_get_bluetooth_limited_discoverable_state condition 39/163239/1
Seungyoun Ju [Fri, 8 Dec 2017 05:45:08 +0000 (14:45 +0900)]
Fix _bt_dpm_get_bluetooth_limited_discoverable_state condition

[Problem] Setting limited discoverable mode is failed
[Cause & Measure] Wrong condition check
[Checking Method] Set limited discoverable mode on DPM feature enabled
 device

Change-Id: Ic180e22270ab3821147cbfbfbe2026953d3bc1d5

6 years agoFix : Visibility timer is not cancelled when PSCAN off 36/162436/1
Seungyoun Ju [Wed, 29 Nov 2017 09:02:07 +0000 (18:02 +0900)]
Fix : Visibility timer is not cancelled when PSCAN off

[Problem] Visibility timer is not stopped when connectable mode is
 turned off.
[Cause & Measure] There is no logic to cancel timer. So this patch adds
 the cancel logic.
[Checking Method] Turn on limited discoverable mode -> Turn off
 connectable mode -> Check discoverable timeout event

Change-Id: Ic83084bf23876d3f44ecf0eec1661bfd5691e6cb

6 years agoAdd the interface to start / stop visibility timer 35/162435/1
Seungyoun Ju [Wed, 29 Nov 2017 09:00:10 +0000 (18:00 +0900)]
Add the interface to start / stop visibility timer

[Problem] Visibility timer is not stopped when connectable mode is
 turned off.
[Cause & Measure] This patch adds the interface to control visibility
 timer in event handler module.
[Checking Method] Turn on limited discoverable mode -> Turn off
 connectable mode -> Check discoverable timeout event

Change-Id: I512d695799999573df739292f80544a179f2beef

6 years agoFix : logic error in MDM visibility policy 34/162434/1
Seungyoun Ju [Wed, 29 Nov 2017 08:47:15 +0000 (17:47 +0900)]
Fix : logic error in MDM visibility policy

[Problem] There are some logic error regarding Discoverable property
 changed event.
1. When limited discoverable mode is not allowed and general
discoverable is set, general discoverable is requested again.
2. When limited discoverable mode and discoverable mode are both not
allowed, it tries to set general discoverable mode.
3. DiscoverableTimeout property is not updated.
[Cause & Measure] 1. Check current discoverable mode and only if it is
in limited discoverable mode and limited discoverable mode is not
allowed, set to general discoverable mode.
2. After handling discoverable mode policy, don't check limited
discoverable mode policy.
3. Use proper type to set DiscoverableTimeout property.
[Checking Method] Code review

Change-Id: I3246ab7019c5415e799e448ce4115103211f4e6c

6 years agoFix mem leak. 85/159185/1
Deokhyun Kim [Tue, 7 Nov 2017 09:52:16 +0000 (18:52 +0900)]
Fix mem leak.

Change-Id: Ie8ce366a2fb6679e9a0bda902f41b06ca193b2ab
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
6 years agoProceed HID connection procedure when it's already connected. 84/159184/1
Deokhyun Kim [Tue, 7 Nov 2017 09:49:21 +0000 (18:49 +0900)]
Proceed HID connection procedure when it's already connected.

  - Application can use fd of HID channel even though it's already connected.

Change-Id: Ic44f9730df35984b1c07eff244510fe9749782b0
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
7 years agoMerge "Cleanup HID device codes." into tizen_4.0
Pyun DoHyun [Fri, 27 Oct 2017 03:37:08 +0000 (03:37 +0000)]
Merge "Cleanup HID device codes." into tizen_4.0

7 years agoMerge "Revert "Use FindDevice to get device object path" partially" into tizen_4.0
Pyun DoHyun [Fri, 27 Oct 2017 02:04:04 +0000 (02:04 +0000)]
Merge "Revert "Use FindDevice to get device object path" partially" into tizen_4.0

7 years agoCleanup HID device codes. 16/157516/1
Deokhyun Kim [Wed, 25 Oct 2017 01:38:27 +0000 (10:38 +0900)]
Cleanup HID device codes.

Change-Id: I129ba628d562ea7c394b52da65027da55c248287
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
7 years agoFix memory leak 96/156796/2
Sangki Park [Wed, 18 Oct 2017 10:46:22 +0000 (19:46 +0900)]
Fix memory leak

[Problem] Fix memory leak
[Checking Method] Turn BT on -> off

Change-Id: I0fae995235f649d66e73cd248559999de9232ebf

7 years agoRevert "Use FindDevice to get device object path" partially 09/157009/2
Seungyoun Ju [Fri, 20 Oct 2017 11:49:36 +0000 (20:49 +0900)]
Revert "Use FindDevice to get device object path" partially

This partially reverts commit 30314c18fea269785f2c25d6f7dcd765008ad7a7

[Problem] Application couldn't make BREDR connection when remote device
 supports BREDR and LE both.
[Cause & Measure] Wrong device object path is used for BREDR connection.
 When a remote device supports BREDR/LE, bluez has two
 device object which has same bdaddr but different bdaddr_type. In this
 case, FindDevice call returns the first searched device's object path.
 To solve this issue, instead of FindDevice call,
 object path should be constructed from address.

Change-Id: Idf6190b749249de28ed5cc50ef9e44438c214339
Signed-off-by: Seungyoun Ju <sy39.ju@samsung.com>
7 years agoFix TBT socket client fail issue 74/157074/1 accepted/tizen/4.0/unified/20171023.120736 submit/tizen_4.0/20171023.083843 tizen_4.0.m2_release
DoHyun Pyun [Mon, 23 Oct 2017 08:35:13 +0000 (17:35 +0900)]
Fix TBT socket client fail issue

Adjust the location to free the variable. We should free the value
after using it.

Change-Id: I96461efce94ce9e4bc85146239fa4781c0858f60
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years agoFix bt-service crash issue. 44/156644/1
Deokhyun Kim [Thu, 19 Oct 2017 08:25:18 +0000 (17:25 +0900)]
Fix bt-service crash issue.

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

Change-Id: I2fa6770334d942979f953ce39cfba2f051913e37
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
7 years agoEnhance debug message 89/156389/1
injun.yang [Tue, 17 Oct 2017 06:34:36 +0000 (15:34 +0900)]
Enhance debug message

When service added from remote device,
get uuid information and display it

Change-Id: Id8188ae2d0695ef023fc45d33c1f22382f384bf7

7 years agofix unable to pair with headset having pin '1234' 11/154811/2
Biman Paul [Wed, 11 Oct 2017 09:12:13 +0000 (18:12 +0900)]
fix unable to pair with headset having pin '1234'

[Problem] unable to pair with headset having pin '1234'
[Cause & Measure] For headset, usually default pin is
'0000' and request is Pairing pin is send as '0000'. But
when pin is not '0000' first attempt fails and remote
device BD address is blacklisted(saved in a file) and for
all future requests blacklisted devices are checked and
pin popup is shown.
But here bt-service is unable to write to blacklist file.
Measure:
1. Allow write mode for blacklist file.
2. Give appropriate smack label.

[Checking Method] Use Mecapp:
1. Set COD such as Mecapp is recognised as Headset.
2. Initiate a pairing request to Mecapp.
3. Give pin 1234 or anything other than '0000' in mecapp.

Change-Id: I8629e782e98cbce88822094d1765fe4bad38994b

7 years agoAdd uuid information 97/154697/1
injun.yang [Wed, 11 Oct 2017 06:15:47 +0000 (15:15 +0900)]
Add uuid information

Change-Id: I9c64912bb408d5087011ded142f18fa332e8f0c1

7 years agoFix memory leak 36/153436/1 accepted/tizen/4.0/unified/20170929.080706 submit/tizen_4.0/20170929.021712 tizen_4.0.IoT.p1_release
Seungyoun Ju [Fri, 22 Sep 2017 02:07:31 +0000 (11:07 +0900)]
Fix memory leak

[Problem] There are some memory leak in code
[Cause & Measure] Fix memory leak

324 bytes in 18 blocks are definitely lost in loss record 1,471 of 1,512
at 0x48458E8: malloc (vg_replace_malloc.c:299)
by 0x4B9E271: g_variant_get (gvariant.c:5368)
by 0x12DAC5: _bt_get_remote_device_info_by_object_path (bt-service-device.c:516)
by 0x11A295: __bt_device_property_changed_event (bt-service-event-receiver.c:1076)
by 0x11A295: _bt_handle_property_changed_event (bt-service-event-receiver.c:1403)
by 0x11D235: __bt_manager_event_filter (bt-service-event-receiver.c:2885)

504 bytes in 72 blocks are definitely lost in loss record 1,479 of 1,512
at 0x48458E8: malloc (vg_replace_malloc.c:299)
by 0x4B9E271: g_variant_get (gvariant.c:5368)
by 0x12579D: __bt_get_bonded_device_info (bt-service-adapter.c:374)
by 0x12579D: _bt_get_bonded_device_info (bt-service-adapter.c:3153)
by 0x143815: __bt_bluez_request (bt-request-handler.c:880)
by 0x147439: __bt_service_method (bt-request-handler.c:275)

648 bytes in 36 blocks are definitely lost in loss record 1,486 of 1,512
at 0x48458E8: malloc (vg_replace_malloc.c:299)
by 0x4B9E271: g_variant_get (gvariant.c:5368)
by 0x13402F: _bt_get_device_ida (bt-service-device.c:3563)
by 0x1449ED: __bt_bluez_request (bt-request-handler.c:1792)
by 0x147439: __bt_service_method (bt-request-handler.c:275)

1,008 bytes in 36 blocks are definitely lost in loss record 1,490 of 1,512
at 0x48458E8: malloc (vg_replace_malloc.c:299)
by 0x4B79E89: g_malloc (gmem.c:97)
by 0x4B89755: g_slice_alloc (gslice.c:1007)
by 0x4B5664B: g_array_sized_new (garray.c:193)
by 0x147191: __bt_service_method (bt-request-handler.c:220)

21,852 bytes in 1,214 blocks are definitely lost in loss record 1,509 of 1,512
at 0x48458E8: malloc (vg_replace_malloc.c:299)
by 0x4B9E271: g_variant_get (gvariant.c:5368)
by 0x11B96D: _bt_handle_device_event (bt-service-event-receiver.c:2200)
by 0x11D8B1: __bt_manager_event_filter (bt-service-event-receiver.c:2897)

22,662 (432 direct, 22,230 indirect) bytes in 18 blocks are definitely lost in loss record 1,511 of 1,512
at 0x48458E8: malloc (vg_replace_malloc.c:299)
by 0x4B9E271: g_variant_get (gvariant.c:5368)
by 0x11D17D: __bt_manager_event_filter (bt-service-event-receiver.c:2679)

Change-Id: Ib00c46ac04eff5d62b94bbf31876bd06dac6aa2a
Signed-off-by: Seungyoun Ju <sy39.ju@samsung.com>
7 years agoFix : Some properties of adapter couldn't be handled 35/153435/1
Seungyoun Ju [Wed, 20 Sep 2017 05:01:52 +0000 (14:01 +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: I17395d7cea094cac324fec110add10ae8c13cc8b
Signed-off-by: Seungyoun Ju <sy39.ju@samsung.com>
7 years agoFix : Multiple advertising feature was not working 34/153434/1
Seungyoun Ju [Wed, 20 Sep 2017 03:58:03 +0000 (12:58 +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.

bt-service-event-receiver.c: __bt_adapter_property_changed_event(847) > name = adv_inst_max
bt-service-event-receiver.c: __bt_adapter_property_changed_event(849) > Value = 17
bt-service-adapter-le.c: _bt_update_le_feature_support(134) > (slot_num > BT_ADV_MULTI_MAX) return
bt-service-event-receiver.c: __bt_adapter_property_changed_event(851) > Fail to update LE feature info

Change-Id: I93e020908636627c9cf0b6ac1377e71126717dd0
Signed-off-by: Seungyoun Ju <sy39.ju@samsung.com>
7 years agoAdded NULL pointer guard check before g_ascii_strcasecmp. 79/151479/1 accepted/tizen/4.0/unified/20170922.195444 submit/tizen_4.0/20170922.014023
Abhishek Chandra [Wed, 20 Sep 2017 12:29:23 +0000 (17:59 +0530)]
Added NULL pointer guard check before g_ascii_strcasecmp.

Change-Id: I04c475c9316ac04437d3ea0bc096e3da346ba421
Signed-off-by: Abhishek Chandra <abhishek.ch@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years agoFix the svace issue - memory leak 90/151190/1 accepted/tizen/4.0/unified/20170921.073538 submit/tizen_4.0/20170920.095002
DoHyun Pyun [Wed, 20 Sep 2017 07:32:27 +0000 (16:32 +0900)]
Fix the svace issue - memory leak

Change-Id: I3be63f35fe983d4ba882eec929402c31384124be
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years agoUse FindDevice to get device object path 49/150549/2 accepted/tizen/4.0/unified/20170920.081520 submit/tizen_4.0/20170918.085143
Biman Paul [Thu, 7 Sep 2017 11:18:39 +0000 (16:48 +0530)]
Use FindDevice to get device object path

[Problem] Reduce dbus overhead to get device object path.
[Cause & Measure] GetManagedObjects returns exhaustive
list of iterfaces and their properties recursively which
is redundant.
Measure: Use FindDevice method to get device object path.
[Checking Method] NA

Change-Id: I5125f5baa8ea283ba374541eef57a858301a1476
Signed-off-by: injun.yang <injun.yang@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years agoSVACE Fixes 94/149694/1 accepted/tizen/4.0/unified/20170915.201253 submit/tizen_4.0/20170914.075053
Anupam Roy [Tue, 12 Sep 2017 11:22:02 +0000 (16:52 +0530)]
SVACE Fixes

ID's: 228340, 252922, 252923
      252928, 258235, 258245
      260752, 271421, 271423

Change-Id: I5a8cd13fc704fd73fa4019143dbfdef1ee63fb50
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years agoFix SVace issue. 00/149500/1
Deokhyun Kim [Tue, 12 Sep 2017 06:53:46 +0000 (15:53 +0900)]
Fix SVace issue.

Change-Id: If75496f124fd0c2f54412f7a94de002caa367f61
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years agoFix tizen coding style errors and warnings 35/149335/1
DoHyun Pyun [Tue, 12 Sep 2017 05:48:25 +0000 (14:48 +0900)]
Fix tizen coding style errors and warnings

Change-Id: I04805324de92c440fd0d5cab82b039ce733cff02
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years agoApply tizen 3.0 based product patchsets 23/147923/1
DoHyun Pyun [Wed, 6 Sep 2017 05:20:48 +0000 (14:20 +0900)]
Apply tizen 3.0 based product patchsets

--------------------------------------------------
commit 0aa1d3f208f07e30fda9f16ee0b7325faf772939
Author: Deokhyun Kim <dukan.kim@samsung.com>
Date:   Fri Sep 1 10:16:27 2017 +0900

    Fix mem leak.
--------------------------------------------------

Change-Id: I28105e3f701c81f044b45f9348c9560d18a640df
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years ago[TDS] Modify ReadValue and WriteValue API's 93/146393/3 accepted/tizen/4.0/unified/20170905.175107 accepted/tizen/unified/20170830.160938 submit/tizen/20170829.085542 submit/tizen_4.0/20170905.000523
Anupam Roy [Mon, 28 Aug 2017 09:17:42 +0000 (14:47 +0530)]
[TDS] Modify ReadValue and WriteValue API's

GATT ReadValue and WriteValue API's are
modified by Bluez upstream while moving the
GATT DBUS API's from EXPERIMENTAL to STABLE.

Accordingly, TDS Seeker API's are modified in
this patch to match latest ReadValue and
WriteValue API's.

Change-Id: I94316fe1212f38bcafad0345669182b248f8a44a
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
7 years agoFix the crash in the fail case 54/144854/4
DoHyun Pyun [Fri, 18 Aug 2017 07:01:34 +0000 (16:01 +0900)]
Fix the crash in the fail case

Change-Id: Ie2119a33789874a63f71a9178ab1e2344a2205de
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years agoChange the dbus call method for 'unregister application' 86/144786/2 accepted/tizen/4.0/unified/20170828.223235 accepted/tizen/unified/20170822.113001 submit/tizen/20170818.052446 submit/tizen_4.0/20170828.100003
DoHyun Pyun [Fri, 18 Aug 2017 02:36:29 +0000 (11:36 +0900)]
Change the dbus call method for 'unregister application'

The previous async calling method occurs the crash when TC calls
'gatt deinit' function frequently. Even if bluez provides
the dbus method as async, we can call it using dbus sync call.
It will reduce some timing issue.

Change-Id: Iaa9cb17016180b09291ec7620f1cacb2609a29d3
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years agoModify the privilege check of passkey confirmation 03/144503/1 submit/tizen/20170817.054358
Hyuk Lee [Thu, 17 Aug 2017 05:03:15 +0000 (14:03 +0900)]
Modify the privilege check of passkey confirmation

Change-Id: Ic4f4749d3f4a9c7896f89ce4e38c489788b5ee95
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
7 years agoAdd missed patchset 75/144275/1
injun.yang [Wed, 16 Aug 2017 06:20:49 +0000 (15:20 +0900)]
Add missed patchset

Some code missed from below commit

commit 6ef7f5f7ca21435c3c0b0b50c6dedfe6a807f655
Author: Seungyoun Ju <sy39.ju@samsung.com>
Date:   Thu Jun 22 15:21:01 2017 +0900

Refactoring GATT client service changed logic

Change-Id: Ib63bfd076514de95df3d6a72fee2da76a57663a1
Signed-off-by: injun.yang <injun.yang@samsung.com>
7 years agoDebug message cleanup 49/144249/1
injun.yang [Wed, 16 Aug 2017 05:16:51 +0000 (14:16 +0900)]
Debug message cleanup

Change-Id: Iec220a08090d40b40cd58a1e7bea7d242940e8da
Signed-off-by: injun.yang <injun.yang@samsung.com>
7 years agoAdd SmackProcessLabel option in systemd service files 73/143673/1 accepted/tizen/unified/20170814.060137 submit/tizen/20170811.080019
DoHyun Pyun [Fri, 11 Aug 2017 02:36:43 +0000 (11:36 +0900)]
Add SmackProcessLabel option in systemd service files

Change-Id: Ia16b28474228a6135b299e65797c19a09aed3a25
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years agoAdd the PIE option for the excutable binary 93/143193/1 accepted/tizen/unified/20170811.021137 submit/tizen/20170809.230017
DoHyun Pyun [Wed, 9 Aug 2017 04:16:41 +0000 (13:16 +0900)]
Add the PIE option for the excutable binary

Change-Id: Ia2a6bb65e6da5b2b7a083bd29acbe4eb671b071c
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years agoMerge "Handle the privilege permission error for agent methods" into tizen
DoHyun Pyun [Tue, 8 Aug 2017 23:35:39 +0000 (23:35 +0000)]
Merge "Handle the privilege permission error for agent methods" into tizen

7 years agoApply Tizen3.0 Gatt client product patch 86/142986/1 accepted/tizen/unified/20170809.135141 submit/tizen/20170808.231821
h.sandeep [Tue, 8 Aug 2017 06:27:22 +0000 (11:57 +0530)]
Apply Tizen3.0 Gatt client product patch

=================================================
 commit 19bdcca142a1369080998e61c552d422c5dca302
 Author: Seungyoun Ju <sy39.ju@samsung.com>
 Date:   Thu Apr 20 21:36:37 2017 +0900
     Fix : Simultaneous GATT client requests are failed
=================================================

Change-Id: Iefb332ae6adc881e4c20fd7bd93ae26e3ee7bda9
Signed-off-by: h.sandeep <h.sandeep@samsung.com>
7 years agoHandle the privilege permission error for agent methods 55/142955/3
DoHyun Pyun [Tue, 8 Aug 2017 04:44:22 +0000 (13:44 +0900)]
Handle the privilege permission error for agent methods

Change-Id: I267ed55df361f145bf0d7e4e6d2bf9dcbcf7defa
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years agoApply tizen 3.0 based product patchsets 13/142513/3 accepted/tizen/unified/20170808.171414 submit/tizen/20170808.020532
DoHyun Pyun [Fri, 4 Aug 2017 06:38:13 +0000 (15:38 +0900)]
Apply tizen 3.0 based product patchsets

--------------------------------------------------
commit a049ded240d77ce4c14bda87796c4d3b06764270
Author: Sreeraj Mohan Kottapuzhackal <sreeraj.mk@samsung.com>
Date:   Mon Jul 24 13:16:05 2017 +0530

    Fix for crash while pairing device
--------------------------------------------------

Change-Id: I2206a657cddc27f8bca3d9ce7fffff4bf81be953
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years ago[OTP] Handle GattConnected event 01/142101/3
Gowtham Anandha Babu [Wed, 2 Aug 2017 12:06:21 +0000 (17:36 +0530)]
[OTP] Handle GattConnected event

Change-Id: I3002836c52408c0e8c9697adcb6cc247e209ded9
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years ago[OTP] Fix OACP Create procedure 32/141632/1
Gowtham Anandha Babu [Tue, 1 Aug 2017 07:23:45 +0000 (12:53 +0530)]
[OTP] Fix OACP Create procedure

Change-Id: Ifa72fc6e7cf23b8533587ed1cce38e5cefcf9f4e
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years ago[GATT] Fix ATT application ecode 22/140722/2
Gowtham Anandha Babu [Wed, 26 Jul 2017 06:58:56 +0000 (12:28 +0530)]
[GATT] Fix ATT application ecode

1) Add error codes defined in Common Profile and
Service Error Code descriptions (see Supplement to the
Bluetooth Core Specification, sections 1.2 and 2).

2) Seperate out OTP specific application ecode.

Change-Id: I666707b76f5252a7662ff8ffc295660678d964e3
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years ago[GATT Server] Delivery the specific error code to central device 15/140615/2 accepted/tizen/4.0/unified/20170816.011228 accepted/tizen/4.0/unified/20170816.014632 accepted/tizen/unified/20170727.190506 submit/tizen/20170725.234514 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170814.115522 submit/tizen_4.0_unified/20170814.115522
injun.yang [Tue, 25 Jul 2017 14:54:13 +0000 (20:24 +0530)]
[GATT Server] Delivery the specific error code to central device

[Problem] Unalbe to pass application error code to central device
[Cause & Measure] Pass the specific error code to central device
[Checking Method] Reponse with the specific error to central device

Change-Id: I72fdfdef011f7f357e95eb4932e703e0cae08480
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years agoFix static analysis tool warnings 16/140016/2 submit/tizen/20170724.081454 submit/tizen/20170725.090318
Atul Rai [Fri, 21 Jul 2017 10:31:18 +0000 (16:01 +0530)]
Fix static analysis tool warnings

Change-Id: I1b1dcc4a27366352fadd7370bb8a14f173e37938
Signed-off-by: Atul Rai <a.rai@samsung.com>
7 years agoadded the failure condition for realloc 20/140020/2
Amit Purwar [Fri, 21 Jul 2017 10:49:15 +0000 (16:19 +0530)]
added the failure condition for realloc
removed the print after return

Change-Id: I1dfb2bf75f36c9c1b71651c480c5eaa1a7a01d04
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
7 years agofixed the GDbusProxy in GATT: register, unregister and service callabck 24/139924/1
Amit Purwar [Fri, 21 Jul 2017 05:04:24 +0000 (10:34 +0530)]
fixed the GDbusProxy in GATT: register, unregister and service callabck

Change-Id: I807f9a4a25e544a6f7630ca23b9737f017c3bb73
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
7 years agoMerge "[GATT Client] Delivery ATT error code to higher layer" into tizen accepted/tizen/unified/20170721.201846 submit/tizen/20170721.013619
Pyun DoHyun [Fri, 21 Jul 2017 01:35:19 +0000 (01:35 +0000)]
Merge "[GATT Client] Delivery ATT error code to higher layer" into tizen

7 years ago[GATT Client] Delivery ATT error code to higher layer 77/139377/4
Gowtham Anandha Babu [Tue, 18 Jul 2017 13:34:07 +0000 (19:04 +0530)]
[GATT Client] Delivery ATT error code to higher layer

[Problem] ATT error code is not passed to application.

[Cause & Measure] GATT application need to know ATT
error code to handling error case. Specially application
error code defined by a higher layer specification.

[Checking Method] GATT error handling

Change-Id: I37747073962baa2b1098eb801ce033fb0b0c4c85
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years agoAdd missed code for the discovery state logic 11/139311/1 accepted/tizen/unified/20170721.024454 submit/tizen/20170719.005005
DoHyun Pyun [Tue, 18 Jul 2017 09:56:03 +0000 (18:56 +0900)]
Add missed code for the discovery state logic

Change-Id: I23773d65601d4e7ee013ff2233c0e839f993bfa1
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years agoMerge "Modify the device discovery status" into tizen accepted/tizen/unified/20170718.174144 submit/tizen/20170717.090652
Pyun DoHyun [Tue, 18 Jul 2017 05:35:34 +0000 (05:35 +0000)]
Merge "Modify the device discovery status" into tizen

7 years agoModify the device discovery status 20/139120/2
Hyuk Lee [Mon, 17 Jul 2017 10:28:30 +0000 (19:28 +0900)]
Modify the device discovery status

Change-Id: Ic877d145691f2cc16e4a35818e3cd7c5628ea359
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years ago[OTP] Fix OACP Create request 85/138785/2
Gowtham Anandha Babu [Thu, 13 Jul 2017 15:22:50 +0000 (20:52 +0530)]
[OTP] Fix OACP Create request

1) Changed Object type UUID implementation
   to support all types(16/32/128 bits) of UUIDs.
2) Fixed Object Metadata Write logic,
   so that changes reflect in object list.
3) Modified OACP Create logic to align with PTS.

Change-Id: If652a0a32be6334c30d4302ad4caa9fb5a7cf92f
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years ago[OTP] Fix PTS fail cases 81/138781/1
Gowtham Anandha Babu [Thu, 13 Jul 2017 15:16:06 +0000 (20:46 +0530)]
[OTP] Fix PTS fail cases

Change-Id: Ib26a7e7465c49da3d9570f602c05799020171e8f
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years agoMerge "[OTP] Fix object type uuid format" into tizen accepted/tizen/unified/20170711.180534 submit/tizen/20170710.052629
Pyun DoHyun [Mon, 10 Jul 2017 00:50:38 +0000 (00:50 +0000)]
Merge "[OTP] Fix object type uuid format" into tizen

7 years agoAdd a BT developer 80/137580/1
Taesoo Jun [Thu, 6 Jul 2017 11:34:10 +0000 (20:34 +0900)]
Add a BT developer

Change-Id: I0b44dc47917a5b4ce702af6b7650d3e07ef57385

7 years ago[OTP] Fix object type uuid format 06/137406/2
Gowtham Anandha Babu [Wed, 5 Jul 2017 13:54:13 +0000 (19:24 +0530)]
[OTP] Fix object type uuid format

According to spec, object type UUID should be
16/32/128 bits.

Change-Id: Ice83951e6963374e0bd4966f7b3dc5428dcf12a8
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years agoMerge "[OTP] Fix PTS fail cases" into tizen
Pyun DoHyun [Thu, 29 Jun 2017 23:07:40 +0000 (23:07 +0000)]
Merge "[OTP] Fix PTS fail cases" into tizen

7 years ago[OTP] Fix PTS fail cases 09/136409/2
Gowtham Anandha Babu [Thu, 29 Jun 2017 09:42:36 +0000 (15:12 +0530)]
[OTP] Fix PTS fail cases

The patch fixes below TCs:
1) OTS/SR/CR/BV-01-C
2) All OACP & OLCP cases (Modify indication length)

Change-Id: I920f49b6126b8da855770aa0833878db01691667
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years agoAdd the SetAbsoluteVolume API for AVRCP controller 45/135845/1
Hyuk Lee [Tue, 27 Jun 2017 04:34:33 +0000 (13:34 +0900)]
Add the SetAbsoluteVolume API for AVRCP controller

Change-Id: I14dffc525cf62a2059e30b21dec7bf9e16c56a69
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
7 years ago[OTP] Handle Object Delete request 02/135602/1
Gowtham Anandha Babu [Fri, 23 Jun 2017 09:25:10 +0000 (14:55 +0530)]
[OTP] Handle Object Delete request

Change-Id: Ie4dcc536892d78ed9672fa40748363d9a2454879
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years ago[OTP] Handle Object Execute request 36/134936/2
Gowtham Anandha Babu [Tue, 20 Jun 2017 10:03:22 +0000 (15:33 +0530)]
[OTP] Handle Object Execute request

Change-Id: I670c9ccd884b71236cfeea38ed3ac1cf21c02f02
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years ago[OTP] Handle Object Write request 26/134626/3
Gowtham Anandha Babu [Mon, 19 Jun 2017 13:23:02 +0000 (18:53 +0530)]
[OTP] Handle Object Write request

Change-Id: I82634c3334a24b98cf85239de820ca2026f0661f
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years agoMerge "[OTP] Handle Object Create request" into tizen
Pyun DoHyun [Wed, 14 Jun 2017 04:16:58 +0000 (04:16 +0000)]
Merge "[OTP] Handle Object Create request" into tizen

7 years agoRemove some package dependencies for the headless image 74/133874/1 accepted/tizen/unified/20170615.020639 submit/tizen/20170614.010332
DoHyun Pyun [Wed, 14 Jun 2017 00:03:39 +0000 (09:03 +0900)]
Remove some package dependencies for the headless image

capi-network-tethering and capi-content-mime-type package is not used
in the headless image. So we devide this function's usage to the headed
plugin.

Change-Id: If3810136c9bca995fe2933559e7ea8755009e57a
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years ago[OTP] Handle Object Create request 85/133785/2
Gowtham Anandha Babu [Tue, 13 Jun 2017 10:23:54 +0000 (15:53 +0530)]
[OTP] Handle Object Create request

Change-Id: Ie4a4a9ab144d506c8f3c9b972e54538cc91178b5
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years agoRemove the psmics package dependency 81/133681/1 accepted/tizen/unified/20170613.194514 submit/tizen/20170613.061617
DoHyun Pyun [Tue, 13 Jun 2017 06:14:55 +0000 (15:14 +0900)]
Remove the psmics package dependency

Change-Id: I03b39a7459a574cef4b50811364f0170a3e5d5ba
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years ago[OTP] Handle Object Select request 03/132803/2
Gowtham Anandha Babu [Wed, 7 Jun 2017 15:05:53 +0000 (20:35 +0530)]
[OTP] Handle Object Select request

Change-Id: I3e275fa02e4a5873a5c633a4736c870eb6e8aeef
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years agoFix the memset size errors 65/132865/1
DoHyun Pyun [Thu, 8 Jun 2017 04:55:09 +0000 (13:55 +0900)]
Fix the memset size errors

Change-Id: I022f15c8f8a0c9c7fa3afe835c78010b9cece3d2
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years agoModify the pid and gid of bt-service to network_fw 74/131574/1
DoHyun Pyun [Tue, 30 May 2017 05:25:57 +0000 (14:25 +0900)]
Modify the pid and gid of bt-service to network_fw

Change-Id: I2f134debfbae79c20f47d66fb790ad06f1f3027a
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years ago[OTP] Fix Object Read logic 22/131522/1
Gowtham Anandha Babu [Mon, 29 May 2017 13:38:11 +0000 (19:08 +0530)]
[OTP] Fix Object Read logic

Change-Id: I4eec15c25d44da3163f7624d4d2f63ea1421c047
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years agoMerge "[OTP] Add support for OACP Read" into tizen
Pyun DoHyun [Mon, 29 May 2017 03:46:20 +0000 (03:46 +0000)]
Merge "[OTP] Add support for OACP Read" into tizen

7 years ago[OTP] Add support for OACP Read 79/130879/2
Gowtham Anandha Babu [Wed, 24 May 2017 08:11:42 +0000 (13:41 +0530)]
[OTP] Add support for OACP Read

Change-Id: Ic98585d0158b5d3a1cca756f50bfb0faba0f0fe3
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years agoGATT-Clinet: Fix the Write and read dbus reply parameter mismatch. 21/130721/2
h.sandeep [Wed, 24 May 2017 00:00:17 +0000 (05:30 +0530)]
GATT-Clinet: Fix the Write and read dbus reply parameter mismatch.

Change-Id: Id2deb6feca75ba54e39cd5cad8b09a8488562f63
Signed-off-by: h.sandeep <h.sandeep@samsung.com>
7 years agoMerge "[Bluetooth][OTP] Add object browsing support" into tizen submit/tizen/20170523.010304
Pyun DoHyun [Mon, 22 May 2017 02:17:39 +0000 (02:17 +0000)]
Merge "[Bluetooth][OTP] Add object browsing support" into tizen

7 years ago[Bluetooth][OTP] Add object browsing support 34/128834/3
Gowtham Anandha Babu [Thu, 11 May 2017 13:43:39 +0000 (19:13 +0530)]
[Bluetooth][OTP] Add object browsing support

Client side changes:
1) Exposed characterstics_write_value BT-API
2) Send "GattValueChanged" indication to otp-application

Server side changes:
1) Change implementation to support both single and
   multiple object(s).

Change-Id: I9fd250505b739b858f26ee7618737e058bc95a8d
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years agoHandle GATT operations for OTP 70/128970/1
Gowtham Anandha Babu [Tue, 2 May 2017 15:52:55 +0000 (21:22 +0530)]
Handle GATT operations for OTP

Expose GATT Read & StartNotify methods to CAPI for
OTP client operations.

Change-Id: I2070a27beeb352946329be1f1094a2ab770f57a1
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years agoRevert "[Bluetooth][OTP-Client] Handle GATT operations for OTP" 67/128967/1 accepted/tizen/unified/20170512.165728 submit/tizen/20170512.071153 tizen_4.0.m1_release
DoHyun Pyun [Fri, 12 May 2017 07:08:58 +0000 (16:08 +0900)]
Revert "[Bluetooth][OTP-Client] Handle GATT operations for OTP"

This reverts commit d9f33483f2498b7476080df530c8558dc5ddf8da.

Change-Id: I73d1ad9afc95ae02dfcb3861596cd30121ddbfc9
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years agoFix the svace issue (WGID : 212857) 56/128956/1
Hyuk Lee [Fri, 12 May 2017 06:50:12 +0000 (15:50 +0900)]
Fix the svace issue (WGID : 212857)

Change-Id: Iaa3c17a61273f5a816de42d449e650159810391e
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
7 years ago[Bluetooth][OTP-Client] Handle GATT operations for OTP 65/127965/5
Gowtham Anandha Babu [Tue, 2 May 2017 15:52:55 +0000 (21:22 +0530)]
[Bluetooth][OTP-Client] Handle GATT operations for OTP

Expose GATT Read & StartNotify methods to CAPI for
OTP client operations.

Change-Id: I0dee5572ee155f4440aa260730783811e5785348
Signed-off-by: Gowtham Anandha Babu <gowtham.ab@samsung.com>
7 years agoFix build error (add the initializing) 12/128212/1 accepted/tizen/unified/20170508.153107 submit/tizen/20170508.015850
Hyuk Lee [Mon, 8 May 2017 04:51:55 +0000 (13:51 +0900)]
Fix build error (add the initializing)

Change-Id: Ie38d09f39d1c3eacc7fb5b37fa221262d7c76858
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
7 years agoFix the build error 07/128207/1
Hyuk Lee [Mon, 8 May 2017 04:34:28 +0000 (13:34 +0900)]
Fix the build error

Change-Id: Ib2c8b4517d30d652cd9f65c6cc45049c5122b4ee
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
7 years agoFix the svace issue (WGID:212294, 212308..) 32/128132/1
Hyuk Lee [Mon, 8 May 2017 01:03:38 +0000 (10:03 +0900)]
Fix the svace issue (WGID:212294, 212308..)

Change-Id: I90b913816369751373bd8996a40deb1a661331de
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
7 years agoChange sscanf to strtol function for the secure coding 54/127554/1 accepted/tizen/unified/20170428.033209 submit/tizen/20170428.004210
DoHyun Pyun [Mon, 17 Apr 2017 08:37:21 +0000 (17:37 +0900)]
Change sscanf to strtol function for the secure coding

Change-Id: Iace5f687b2f4aae5cbb93b265273f85572e823c8
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
7 years agoMerge "[Bluetooth][OTP-Server] Handle object browsing" into tizen
Pyun DoHyun [Mon, 24 Apr 2017 04:47:39 +0000 (04:47 +0000)]
Merge "[Bluetooth][OTP-Server] Handle object browsing" into tizen