Wootak Jung [Thu, 25 Oct 2018 06:15:33 +0000 (15:15 +0900)]
Fix profile check logic to distinguish ivi and iot
Change-Id: I801bb263df0a43386671df7f9775ccb5530b5fee
Abhishek Chandra [Mon, 10 Sep 2018 09:01:51 +0000 (14:31 +0530)]
connect_le is failing for autoconnect
[Problem] connect_le api is failing when user set
autoconnect as true .
[Cause] when auto connect is true ,
device_set_auto_connect is called
to set device autoconnect parametes and
it is return back . device_connect_le call is
not called in this case .
[Fix] Removed the dbus_message_new_method_return .
[Verification] verified by code review in upstream
bluez code and also tested by using unit test
in platform.
Change-Id: I09e3d8e1e9169cb734419f9516ba39800ee309ee
Signed-off-by: Abhishek Chandra <abhishek.ch@samsung.com>
Wootak Jung [Mon, 27 Aug 2018 02:06:12 +0000 (11:06 +0900)]
Modify dbus policies based on default deny
- Remove receive_sender policies
- Combine deny policies
Change-Id: Ic3d691111443589b2896d5bbfde4eae328e996aa
Deokhyun Kim [Thu, 16 Aug 2018 05:10:09 +0000 (14:10 +0900)]
Set HID security level to medium.
- HID should be connected after bonding completes
Change-Id: I48ac572ee7873796bae50194512a86a32262e794
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
Seungyoun Ju [Mon, 13 Aug 2018 08:34:18 +0000 (17:34 +0900)]
Fix : device_get_ida is failed
[Problem] device_get_ida returns unsupported error code for paired RPA device
[Cause & Measure] Paired RPA device's bdaddr type can be public because
device.bdaddr has identity address. But old condition assumes that bdaddr
type should be random. So unsupported error code is returned. This fix
checks each case and returns proper error codd or result.
Change-Id: I435a354d956a6208129e83cbad32a0b594aec39a
Anupam Roy [Mon, 6 Aug 2018 17:16:01 +0000 (22:46 +0530)]
Implement 'Get Phy Configuration' MGMT command
This patch implements MGMT_OP_GET_PHY_CONFIGURATION
operation if MGMT interface supports PHY Configuration
setting. It introduces two new adapter properties
(l2 2m phy and le coded phy). These properties are filled
upon getting response from kernel about supported phys's.
which are then exported to user by 'SupportedLEFeatures'
adapter property.
This mgmt command supports reading above parameters in bit fields,
based on LE PHY (1M, 2M & CODED) and also
BREDR packet types as following-
- BR 1M (1 SLOT, 3 SLOT, 5 SLOT)
- EDR 2M (1 SLOT, 3 SLOT, 5 SLOT)
- EDR 3M (1 SLOT, 3 SLOT, 5 SLOT)
- 1M TX, 1M RX
- 2M TX, 2M RX
- CODED TX, CODED RX
Verification logs based on BT 5.0 controller -
bluetoothd[637]: src/adapter.c:get_phy_configuration_resp() Supported phys: [0x7e00]
bluetoothd[637]: src/adapter.c:get_phy_configuration_resp() Configurable phys: [0x7800]
bluetoothd[637]: src/adapter.c:get_phy_configuration_resp() Selected phys: [0x600]
bluetoothd[637]: src/adapter.c:get_phy_configuration_resp() Adapter supports LE 2M PHY
bluetoothd[637]: src/adapter.c:get_phy_configuration_resp() Adapter supports LE CODED PHY
Change-Id: I9ec3565b5d1b9a0de3daea666d34754958bb1550
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
Anupam Roy [Mon, 6 Aug 2018 17:03:39 +0000 (22:33 +0530)]
Add defines for BREDR packet types
This patch defines BREDR packet types
in management interface as following
- MGMT_PHY_BR_1M_1SLOT 0x00000001
- MGMT_PHY_BR_1M_3SLOT 0x00000002
- MGMT_PHY_BR_1M_5SLOT 0x00000004
- MGMT_PHY_EDR_2M_1SLOT 0x00000008
- MGMT_PHY_EDR_2M_3SLOT 0x00000010
- MGMT_PHY_EDR_2M_5SLOT 0x00000020
- MGMT_PHY_EDR_3M_1SLOT 0x00000040
- MGMT_PHY_EDR_3M_3SLOT 0x00000080
- MGMT_PHY_EDR_3M_5SLOT 0x00000100
Also, it fixes parameters for response of
MGMT_OP_GET_PHY_CONFIGURATION operation.
mgmt_rp_get_phy_confguration structure will now
contain three parameters as following
- Supported_phys;
- Configurable_phys;
- Selected_phys;
Change-Id: Ia3d0c83473807d91d48eb7594c44595eca9c2a0d
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
Seungyoun Ju [Mon, 6 Aug 2018 11:25:58 +0000 (20:25 +0900)]
device : Return proper error code for get_ida
[Problem] There is no way to know if remote device is not bonded or it
doesn't support IDA (i.e. BR/EDR device, LE Static random address or
non-RPA used device).
[Cause & Measure] We consider only LE RPA device. So return not
supported error code for others.
[Checking Method] N/A
Change-Id: I734a468a64cc85fa6aac08a9f0621dd95c44217c
injun.yang [Mon, 21 May 2018 08:36:44 +0000 (17:36 +0900)]
Update rpa on VSC advertising
[Model] All
[BinType] AP
[Customer] OPEN
[Issue#] N/A
[Request] Internal
[Occurrence Version] N/A
[Problem] The updated rpa is not applied on VSC advertising
[Cause & Measure] When rpa changed, report it to bluetoothd.
If device doing multiple adv, bluetoothd will update rpa.
[Checking Method] When rpa updated, check the address of advertiser
[Team] Basic Connection
[Developer] Injun Yang
[Solution company] Samsung
[Change Type] Specification change
Change-Id: I967e8eca52d9de1a0e140ee70abcd18392a1ea1b
Signed-off-by: injun.yang <injun.yang@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Anupam Roy [Mon, 6 Aug 2018 06:16:02 +0000 (11:46 +0530)]
monitor: Add PHY management support
This patch adds support of PHY management
and consolidation of code printing bitfield
Taken from following upstream commits-
commit
dad3ca2f417d9330f6f3bc33cfee5d0b24985a5d
commit
426693e8457326ee686e46a2c9f535b9367a55d7
commit
e566be15ce03283978c35b2ab8462504da3fee63
commit
e862f704eeff14818fcc00a57271bd6907285ad7
Change-Id: I3582308f50423b916cec7d900fcf41dc9b4c4dc6
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
Anupam Roy [Wed, 1 Aug 2018 14:54:58 +0000 (20:24 +0530)]
btmgmt: Add PHY configuration get/set commands
Taken from following upstream commit-
commit
dca915f54c1f969d977e9433d336bf3f6264632b
Change-Id: Ic8842ad0687c607b4606648f0813221d0c18c4c7
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
Atul Rai [Tue, 10 Jul 2018 11:37:38 +0000 (17:07 +0530)]
Fix Coverity issue (Id:860268)
Change-Id: I9e784c6eca9a94fb9b5b5ad340aee09b7bc2b65d
Signed-off-by: Atul Rai <a.rai@samsung.com>
injun.yang [Fri, 29 Jun 2018 04:38:42 +0000 (13:38 +0900)]
Change the name of dbus property of EIR manufacturer data
Same property for adv is introduced in upstream
Change-Id: I841c525a334ad337b41b3153c7958731358ea260
Signed-off-by: injun.yang <injun.yang@samsung.com>
Seungyoun Ju [Mon, 18 Jun 2018 10:10:53 +0000 (19:10 +0900)]
CFLAGS is accumulated each profile is built
[Problem] CFLAGS is accumulated each profile is built
[Cause & Measure] Store default CFLAGS and before compiling a profile
reset CFLAGS using saved one.
Change-Id: I5d2e37852a2829978ef5bf6a7a75942494b9fdba
Anupam Roy [Thu, 14 Jun 2018 06:49:59 +0000 (12:19 +0530)]
emulator: sync with upstream
This patch comes from below commits of upstream
=====================================================================
commit
98a77944e6d3d5706647bfa7235c175b32173436
Author: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
Date: Mon Apr 23 18:00:37 2018 +0900
emulator/b1ee: Enable to specify host and port
Removes the DEFAULT_SERVER macro because the default host seems to be
unofficial since 2017.
commit
b54111d2a432cdbd4926cce8be5b119b298e8477
Author: Ćukasz Rymanowski <lukasz.rymanowski@codecoup.pl>
Date: Fri Feb 9 18:26:25 2018 +0100
emulator: Add initial LE states to btdev and API to set new one
=====================================================================
Change-Id: I9f94927c0b6f6dcf712ca137548691dfda53783a
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
Anupam Roy [Mon, 11 Jun 2018 04:19:20 +0000 (09:49 +0530)]
build: Add testing config option
This patch comes from below commit of upstream
========================================================
commit
df43b3dad829e8b7f79fd15c20d997f50e745ae7
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: Wed Jan 4 15:24:45 2017 +0200
build: Add testing config option
This adds --enable-testing that can be used to enable emulator and tester
which are no longer experimental but also are not meant for production.
========================================================
Change-Id: I41edb9f1b726340dde4a22bc705a68b5bceea4c9
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
Wootak Jung [Mon, 4 Jun 2018 09:30:00 +0000 (18:30 +0900)]
Add headless device handling logic
Change-Id: Iee83a7af02901787e3697d95f86ecf79103b9b67
Wootak Jung [Mon, 4 Jun 2018 00:58:33 +0000 (09:58 +0900)]
Disable SSP mode in headless device
Change-Id: I873f64b49887825f5a079306b41a03961b22bbee
Pyun DoHyun [Fri, 1 Jun 2018 00:29:53 +0000 (00:29 +0000)]
Merge "Fix LE device found event" into tizen
Wootak Jung [Fri, 1 Jun 2018 00:02:41 +0000 (09:02 +0900)]
Add a debug log for debugging
Change-Id: Ibf98b251668fd5f73f518431da4330bc1e56d54b
Atul Rai [Thu, 31 May 2018 10:09:29 +0000 (15:39 +0530)]
Fix LE device found event
Issue: Paired devices are not detected during LE scan while
paired device is advertising
This patch fixes this issue.
Change-Id: I1b9f06c3d057204cb01fe88faedaa5ace399c26b
Signed-off-by: Abhishek Chandra <abhishek.ch@samsung.com>
Signed-off-by: Atul Rai <a.rai@samsung.com>
Wootak Jung [Thu, 31 May 2018 08:12:42 +0000 (17:12 +0900)]
Add headless device handling logic
Change-Id: I0b7fa8f982e4b455b245e5c66b1fdc7ecb6289ca
Wootak Jung [Thu, 31 May 2018 01:16:38 +0000 (10:16 +0900)]
Fix access deny issue on dbus policy
Deny policy in context="default" has been applied
because of incorrect policy in other context.
Change-Id: I6185a0d784c0f082276bb4a1e002e3b86ddd9bff
injun.yang [Tue, 29 May 2018 07:46:13 +0000 (16:46 +0900)]
Fix the crash
gdb) bt
0 0x00520b98 in ext_prop_read_cb (success=false, att_ecode=0 '\000', value=0x0, length=0, user_data=0xad5310) at src/shared/gatt-client.c:746
1 0x0051e62a in read_cb (opcode=<optimized out>, pdu=<optimized out>, length=<optimized out>, user_data=<optimized out>) at src/shared/gatt-client.c:2418
2 0x0051d5a6 in disc_att_send_op (data=0xad5cd0) at src/shared/att.c:569
3 0x0051dffc in disconnect_cb (io=<optimized out>, user_data=0xadb400) at src/shared/att.c:602
4 0x00524298 in watch_callback (channel=<optimized out>, cond=<optimized out>, user_data=<optimized out>) at src/shared/io-glib.c:170
5 0xf75318e8 in g_main_dispatch (context=0xac5f80) at gmain.c:3234
6 g_main_context_dispatch (context=context@entry=0xac5f80) at gmain.c:3887
7 0xf7531c78 in g_main_context_iterate (context=0xac5f80, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3960
8 0xf7531fd8 in g_main_loop_run (loop=0xac5ee0) at gmain.c:4156
9 0x004b032c in main (argc=<optimized out>, argv=<optimized out>) at src/main.c:723
gdb) bt full 3
0 0x00520b98 in ext_prop_read_cb (success=false, att_ecode=0 '\000', value=0x0, length=0, user_data=0xad5310) at src/shared/gatt-client.c:746
op = 0xad5310
client = <optimized out>
discovering = 247
desc_attr = <optimized out>
1 0x0051e62a in read_cb (opcode=<optimized out>, pdu=<optimized out>, length=<optimized out>, user_data=<optimized out>) at src/shared/gatt-client.c:2418
req = <optimized out>
op = <optimized out>
success = <optimized out>
att_ecode = <optimized out>
value = 0x0
value_len = <optimized out>
2 0x0051d5a6 in disc_att_send_op (data=0xad5cd0) at src/shared/att.c:569
op = 0xad5cd0
Change-Id: I6f817e21a4a75c3c36f62d1d102e189be5088968
DoHyun Pyun [Wed, 23 May 2018 04:49:17 +0000 (13:49 +0900)]
Modify the deny policy
Change-Id: I56e778e62aca7c9fba729e740b11e84e96872fa9
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Pyun DoHyun [Tue, 22 May 2018 23:31:48 +0000 (23:31 +0000)]
Merge "Fix : Address is wrong in GATT Callback" into tizen
Atul Rai [Fri, 18 May 2018 06:44:46 +0000 (12:14 +0530)]
Removed unnecessary compilation flags
Change-Id: I2af88a3f6bd6645857826c58eefee97d5dbb46b5
Signed-off-by: Atul Rai <a.rai@samsung.com>
Atul Rai [Fri, 18 May 2018 03:00:26 +0000 (08:30 +0530)]
[Mesh] Adapt meshctl for Tizen platform
Change-Id: I094dd7ecd8f41f9db79cead816b870de18e0330b
Signed-off-by: Atul Rai <a.rai@samsung.com>
injun.yang [Thu, 17 May 2018 09:33:56 +0000 (18:33 +0900)]
Fix : Address is wrong in GATT Callback
[Problem] Address is wrong in GATT read/write callback
[Cause & Measure] Bluez pass IDA instead of first RPA.
If rpa existed then pass it into GATT read/write callback.
[Checking Method] GATT read/write in server
Change-Id: Id26144ca307572ae9ff6839a033f986f21285cb9
Pyun DoHyun [Fri, 18 May 2018 03:01:11 +0000 (03:01 +0000)]
Merge "Import meshctl & bt-shell related apis and fixes" into tizen
Pyun DoHyun [Thu, 17 May 2018 23:54:50 +0000 (23:54 +0000)]
Merge "Fix Memory leak" into tizen
Pyun DoHyun [Thu, 17 May 2018 23:54:41 +0000 (23:54 +0000)]
Merge "Fix possible invalid memory access" into tizen
Nagaraj D R [Thu, 17 May 2018 15:03:36 +0000 (20:33 +0530)]
Fix possible invalid memory access
Uninitialized data is read from local variable 'addr'
Change-Id: Id8288428e93a8dda08d67a507fd97caf5fae080e
Nagaraj D R [Thu, 17 May 2018 14:28:03 +0000 (19:58 +0530)]
Fix Memory leak
Memory associated with 'adv_data' will be leaked in case of
'generate_scan_rsp' failure
Change-Id: I57fdaa060ecfbf59f03ca16e074ddce7a8e14c9d
Nagaraj D R [Thu, 17 May 2018 12:42:59 +0000 (18:12 +0530)]
Fix improper usage of g_free
g_free should be used for only those memory allocations
done through glib APIs
Change-Id: I5d5275574b0d273594f86786956d86355794db94
Nagaraj D R [Thu, 17 May 2018 10:50:05 +0000 (16:20 +0530)]
src/device.c : Fix BREDR-ATT MTU issue
For BREDR-ATT, according to spec, ATT MTU is same has
L2CAP configured MTU on which ATT is running and there won't be
ATT MTU exchange procedure. So, set the MTU to L2CAP MTU for
BREDR-ATT and for LE-ATT adjust the ATT MTU based on
EXCHANGE_MTU request and response.
Change-Id: Icd402edbfa7ddb82e808ebf695096b7a872ebc14
Nagaraj D R [Thu, 17 May 2018 12:13:23 +0000 (17:43 +0530)]
Fix bluetoothd crash issue
Bluetoothd crashes when any application invokes "Introspect"
dbus method call on device-interface hosted by any device object path.
Declaration of device_signals is corrected
call stack
0 0xb6bfc3ee in strlen () from /lib/libc.so.6
1 0xb6bc69e4 in vfprintf () from /lib/libc.so.6
2 0xb6c65db0 in __vasprintf_chk () from /lib/libc.so.6
3 0xb6dbe404 in g_vasprintf () from /lib/libglib-2.0.so.0
4 0xb6da5dac in g_string_append_vprintf () from /lib/libglib-2.0.so.0
5 0xb6da5e7c in g_string_append_printf () from /lib/libglib-2.0.so.0
6 0xb6efbe94 in print_arguments (gstr=gstr@entry=0xb7f521a0,
args=0xb6f221fc, direction=direction@entry=0x0) at gdbus/object.c:123
7 0xb6efc624 in generate_interface_xml (iface=<optimized out>,
gstr=0xb7f521a0) at gdbus/object.c:187
8 generate_introspection_xml (data=0xb7f538a0, data=0xb7f538a0,
path=0xb7f462e0 "/org/bluez/hci0/dev_E4_FA_ED_DF_2C_2D", conn=0xb7f40590)
at gdbus/object.c:236
9 introspect (connection=0xb7f40590, message=0xb7f44908,
user_data=0xb7f538a0) at gdbus/object.c:263
10 0xb6efd13a in process_message (connection=connection@entry=0xb7f40590,
message=message@entry=0xb7f44908,
iface_user_data=iface_user_data@entry=0xb7f538a0,
method=0xb6f42324 <introspect_methods>,
method=0xb6f42324 <introspect_methods>) at gdbus/object.c:282
11 0xb6efd3b8 in generic_message (connection=0xb7f40590, message=0xb7f44908,
user_data=<optimized out>) at gdbus/object.c:1106
Change-Id: I8bd5c0e575f23f29945df49bbc3a807d55829989
Atul Rai [Thu, 17 May 2018 11:48:04 +0000 (17:18 +0530)]
Import meshctl & bt-shell related apis and fixes
This patch imports the new meshctl and bt-shell apis and fixes from
open source bluez (https://git.kernel.org/pub/scm/bluetooth/bluez.git).
Change-Id: Iffa5b474c3246938f2b907eabd58c43a7e36c34a
Signed-off-by: Atul Rai <a.rai@samsung.com>
injun.yang [Wed, 16 May 2018 07:28:36 +0000 (16:28 +0900)]
Revert "Fix : GATT Client invokes the callback of send_op when att_send_op is canceled"
This reverts commit
f822b480166cd56c3ca8ef2b507ce242453ed582.
Upstream patch (22737d...) has been applied
to fix an issue which was resolved by Tizen patch.
So this patch reverts the related Tizen patch.
Change-Id: I64987117adbec00cd8299b72434eb132f5a1d59e
Signed-off-by: injun.yang <injun.yang@samsung.com>
Pyun DoHyun [Mon, 14 May 2018 06:39:31 +0000 (06:39 +0000)]
Merge "SIGSEGV, Segmentation fault in gatt indication confirm" into tizen
DoHyun Pyun [Mon, 14 May 2018 05:17:24 +0000 (14:17 +0900)]
Fix TCT fail issue on ARTIK530
If LE discoverying is not completed successly, we should remove
le_discovery_list explictly. Because stop_le_discovery_complete
function will be not called in this exception case.
Change-Id: I1fd812d451121b795105ced5a1723e3187e1d86e
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
DoHyun Pyun [Mon, 14 May 2018 03:58:31 +0000 (12:58 +0900)]
Add 'Requires' in extension-bredr and extension-le package
Change-Id: Ic8b6deb2446ed4a0e4b5232841ecf52aebc0b2be
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Wootak Jung [Tue, 8 May 2018 06:23:57 +0000 (15:23 +0900)]
Change file mode to 750 from 755
File mode need to be fixed to 750(user/group/other),
'other' should not access for this file.
Change-Id: Iab0dcf46d11d6f426c2fd38c94157890bcfc22d5
Wootak Jung [Fri, 4 May 2018 04:20:41 +0000 (13:20 +0900)]
Fix privilege violations
Need to check privilege for direct method call
Change-Id: Ic3bc8f74207cf46d56e8dab66ceb13b0cc86e6f4
Avichal Agarwal [Thu, 3 May 2018 12:40:48 +0000 (18:10 +0530)]
SIGSEGV, Segmentation fault in gatt indication confirm
Program received signal SIGSEGV, Segmentation fault.
0xf71fbcee in strlen () from /lib/libc.so.6
(gdb) bt
destroy=destroy@entry=0x0) at gdbus/client.c:909
Change-Id: Ib3dc7579970e80ff3f4fb808d0b42a869e819731
Wootak Jung [Tue, 17 Apr 2018 08:23:06 +0000 (17:23 +0900)]
Add default deny policy in conf files
Change-Id: I2cc23b5e6dfa06c52699e89a513dc378a18eb2a6
Pyun DoHyun [Tue, 10 Apr 2018 23:06:54 +0000 (23:06 +0000)]
Merge "Fix the coverity issue" into tizen
Hyuk Lee [Tue, 10 Apr 2018 06:40:08 +0000 (15:40 +0900)]
Fix the coverity issue
Change-Id: Iddc012db1b40444c7f47fa53267547dd9277d6c0
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
Hyuk Lee [Mon, 9 Apr 2018 06:32:05 +0000 (15:32 +0900)]
Remove the bluez service file
We changed the bluez's UID/GID to network_fw.
Daemon will be launched by bluez-start.service in bluetooth-tools.
Change-Id: I48b83b5647ac4665e90d08539aa54cba8593f7f4
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
Hyuk Lee [Wed, 28 Mar 2018 02:38:21 +0000 (11:38 +0900)]
Add the delay report property
Change-Id: I3abe8e8b71bb39027c2f0c29e326fc8acc3b6cdb
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
Amit Purwar [Wed, 4 Apr 2018 12:07:48 +0000 (17:37 +0530)]
Fix A2DP Sink device disconnect after pause and play
Change-Id: I35ced6cb1ef63f430c2120e3edc680e767929ea0
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Pyun DoHyun [Thu, 29 Mar 2018 05:07:20 +0000 (05:07 +0000)]
Merge "Enable check-TESTS using %check section in bluez" into tizen
Atul Rai [Wed, 28 Mar 2018 10:58:55 +0000 (16:28 +0530)]
Enable check-TESTS using %check section in bluez
This patch enables check-TESTS (unit test case execution) for bluez at
build time using %check section in bluez.spec. This patch,
- Modifies unit/test-gobex.c, unit/test-gatt.c, unit/test-hog.c and
unit/test-gattrib.c to handle Tizen specific changes in BlueZ.
- Disables crypto test cases (unit/test-crypto) as QEMU (v2.7.0) in
Tizen does not support AF_ALG socket option for cypher algorithms.
Change-Id: I5a49ac00a26fe5c1baf92b02915cf1bcfa30f68b
Signed-off-by: Atul Rai <a.rai@samsung.com>
Abhishek Chandra [Tue, 27 Mar 2018 09:32:51 +0000 (15:02 +0530)]
[BlueZ] BlueZ Upgrade changes missed for OOB(out of band)
merged to fix TCT failures.
Change-Id: I6c8e71823a8d3f7254318d3f7759c334b6eb9a4d
Signed-off-by: Abhishek Chandra <abhishek.ch@samsung.com>
Hyuk Lee [Mon, 26 Mar 2018 01:40:57 +0000 (10:40 +0900)]
Add the bluetooth.service file to wearable profile
Change-Id: Ia04887e12d41ff49ef7dac3147df166f96e79efc
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
Avichal Agarwal [Thu, 22 Mar 2018 07:56:31 +0000 (13:26 +0530)]
Coverity Fix :CID 28838 :. leaked_storage: Variable uuid
going out of scope leaks the storage it points to
Change-Id: I948df8fae62bf440ac4d50a9a7cfa9cc95bdcec3
Pyun DoHyun [Tue, 20 Mar 2018 23:36:49 +0000 (23:36 +0000)]
Merge "Add lower bound check for manufacturer_data_len (Fix WGID: 311536)" into tizen
Atul Rai [Tue, 20 Mar 2018 10:17:05 +0000 (15:47 +0530)]
Add lower bound check for manufacturer_data_len (Fix WGID: 311536)
Change-Id: I2da413abe09c2ad1f3c98a9b69f561090ebcbfbc
Signed-off-by: Atul Rai <a.rai@samsung.com>
Hyuk Lee [Tue, 20 Mar 2018 04:58:21 +0000 (13:58 +0900)]
Fix the coverity issue
Change-Id: I984810e507f435e45108c0816d169e8447336716
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
Atul Rai [Wed, 14 Mar 2018 11:50:29 +0000 (17:20 +0530)]
Fixed removal of LE devices on stopping LE scan
Issue: LE connect fail with error "Device path not found".
Cause: Device flags are incorrectly updated to 0 on receiving
scan_response data. Later on stopping LE scan, the LE device
is considered non-connectable based on device flag which was
incorrectly updated to 0 during scan_response event and the
device is removed immediately. This causes LE connect to fail
with error "device path not found".
Solution: This patch fixes the issue by checking adv pkt type
before updating the device flag on device found event.
Change-Id: Id86b024dfc6c980780aef6cdda8e6dcc6b150b80
Signed-off-by: Atul Rai <a.rai@samsung.com>
Atul Rai [Wed, 14 Mar 2018 11:47:50 +0000 (17:17 +0530)]
Fixed "stop LE scan" fail issue
Change-Id: I86b977bbdc3b110eb21db025cf72ffe22f89aad9
Signed-off-by: Atul Rai <a.rai@samsung.com>
Atul Rai [Wed, 14 Mar 2018 11:45:09 +0000 (17:15 +0530)]
Fix bluetoothd crash on stopping device discovery
Change-Id: Ic95272adc88d83af0aa98e3f7290d9f3dd15dd86
Signed-off-by: Atul Rai <a.rai@samsung.com>
Anupam Roy [Mon, 19 Mar 2018 08:26:31 +0000 (13:56 +0530)]
[BlueZ upgrade 5.43 to 5.48] Patch 2/2
Change-Id: I26e0fde334c2eac84d3f19370cab6dfbed073d2f
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
Anupam Roy [Mon, 19 Mar 2018 08:24:55 +0000 (13:54 +0530)]
[BlueZ upgrade 5.43 to 5.48] Patch 1/2
Change-Id: I8aaefc910e3840ce89648032ac1911fd23e764bc
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
Atul Rai [Fri, 23 Feb 2018 07:22:15 +0000 (12:52 +0530)]
Fix A2DP reconnection issue
AVDTP session is not released even after session ref count reached 0 and
hence media audio (A2DP) reconnection failed. This patch fixes this issue
by releasing AVDTP sesson when session ref count reaches 0.
Issue reproduce Condition:
1/ Connection Call Audio & Media Audio
2/ Disconnect Media Audio
3/ Try to Reconnect media audio
Connection failed (Connection Timed Out).
Change-Id: I6210f2b9d01b91df10913a200d131d10aaad167d
Signed-off-by: Atul Rai <a.rai@samsung.com>
Hyuk Lee [Mon, 12 Feb 2018 01:10:01 +0000 (10:10 +0900)]
Modify the UID/GID to network_fw
Change-Id: Ie523965c1ef3fcc54c321dbccce3811ed6f2fa31
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
DoHyun Pyun [Wed, 24 Jan 2018 02:07:51 +0000 (11:07 +0900)]
Disable %check section
Change-Id: I95339a9d3d85e34f831f7e684d0f0c7972527beb
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
DoHyun Pyun [Tue, 19 Dec 2017 04:57:34 +0000 (13:57 +0900)]
Fix the crash connected as AVRCP target role
Change-Id: I03b64d72243fdfdf4e7adb45fe5e7dc56dca8fea
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
DoHyun Pyun [Tue, 19 Dec 2017 00:38:37 +0000 (09:38 +0900)]
Fix the crash issue in the a2dp select role function
Change-Id: I328a9e72358672ec1ade61e19ebd459568132785
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
DoHyun Pyun [Mon, 18 Dec 2017 01:33:17 +0000 (10:33 +0900)]
Add AVRCP control volume up / down method
Change-Id: I5ea7237aaed1e27bd9e0b8e555177b6ec84f0dd1
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Nagaraj D R [Thu, 7 Dec 2017 12:40:43 +0000 (18:10 +0530)]
Keep Tizen specific code under flag
bluez upgradation will be difficult if
tizen specific code is not under a flag
Change-Id: I6e6b16a5ad9a9829de5c8d54059d8168b343b289
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Seungyoun Ju [Thu, 7 Dec 2017 08:39:57 +0000 (17:39 +0900)]
Remove unnecessary logs
[Problem] There are unnecessary logs
[Cause & Measure] Remove the logs
[Checking Method] journalctrl -f | grep bluetooth
Change-Id: Ia0c392db29522c9fed0df505194fd10e73931b8b
Signed-off-by: Seungyoun Ju <sy39.ju@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Seungyoun Ju [Thu, 7 Dec 2017 08:18:38 +0000 (17:18 +0900)]
shared/gatt-client: Fix discovering included svcs using invalid range
[Problem] It discovers included services using invalid handle range 0 ~ 0.
It causes ATT error response and GATT connection is failed.
[Cause & Measure] When any service is removed over the previous connection,
pending_svcs queue is not empty because it is used to identify
disappeared services. So we need to check more if there are any services
to be discovered or not.
This patch checks the service range and if there is no service
to be discovered, stop the discovery.
[Checking Method] Connect to iOS -> Turn off and on iOS's Bluetooth
Change-Id: I312cba9a53c55ce266d98196e3ba81b236d885e9
Signed-off-by: Seungyoun Ju <sy39.ju@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Luiz Augusto von Dentz [Tue, 30 May 2017 11:40:56 +0000 (14:40 +0300)]
shared/gatt-client: Fix removing services with no attributes
This patch comes from below commit of upstream.
commit
d6c07ecf22ba60d6dd1b7302281eb32e1f278ca7
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: Tue May 30 14:40:56 2017 +0300
shared/gatt-client: Fix removing services with no attributes
If a service has no attributes, like IPSS, just mark it as active and
skip doing any attribute discover.
Change-Id: I08eac1787f95fd091470496764bf8cf9924c0520
Signed-off-by: Seungyoun Ju <sy39.ju@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Luiz Augusto von Dentz [Wed, 24 May 2017 10:22:01 +0000 (13:22 +0300)]
shared/gatt-client: Fix not removing services that had disappeared
[Problem] There are duplicated services in gatt client database.
[Cause & Measure] When GATT service discovery happens and there are no
services in the middle of discovery range, the services in that range
are not removed. This causes a local application recognize that the
services exist. But those are actually removed in remote side so
the local application malfunction happens.
[Checking Method] Connect device to iOS. It happens rarely but it makes
the issue happen with below procedures.
1. Connect two bluez devices via BLE
2. Make pair
3. Register any service in one side (A)
4. Disconnect BLE
5. Unregister the service and register it again on side A
6. Make a connection again
7. Check the side A's services on side B
This patch comes from below commit of upstream.
commit
6b34bdd967a639c2d219b5d83f0a20637c56e68e
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: Wed May 24 13:22:01 2017 +0300
If a service cannot be found in the middle of the database the current
logic don't clear its range leaving it still active which cause upper
layer to believe its attributes are still available.
In order to fix the code now loads existing services into the pending
list and remove the services left at the end of the discovery:
src/device.c:gatt_debug() Primary services found: 2
src/device.c:gatt_debug() start: 0x0001, end: 0x0005, uuid:
00001800-0000-1000-8000-
00805f9b34fb
src/device.c:gatt_debug() start: 0x0100, end: 0x0104, uuid:
0000180a-0000-1000-8000-
00805f9b34fb
src/device.c:gatt_debug() Secondary service discovery failed. ATT ECODE: 0x0a
src/device.c:gatt_debug() Characteristics found: 2
src/device.c:gatt_debug() start: 0x0101, end: 0x0102, value: 0x0102, props: 0x02, uuid:
00002a24-0000-1
src/device.c:gatt_debug() start: 0x0103, end: 0x0104, value: 0x0104, props: 0x02, uuid:
00002a29-0000-1
src/device.c:gatt_debug() service disappeared: start 0x0006 end 0x000a
src/device.c:gatt_service_removed() start: 0x0006, end: 0x000a
Change-Id: I8ef0b3c3feaadaa61d280f494532ab26ceecec2e
Signed-off-by: Seungyoun Ju <sy39.ju@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Andy Duan [Thu, 20 Jul 2017 13:14:59 +0000 (16:14 +0300)]
hciattach: fix the delay timer for bcm43xx firmware download
From the log in .bcm43xx_load_firmware():
/* Wait 50ms to let the firmware placed in download mode */
nanosleep(&tm_mode, NULL);
But timespec tm_mode is real is 50us. Correct the delayed timer count.
[lhs: Cherry-Picked from
git://git.kernel.org/pub/scm/bluetooth/bluez.git
commit
76255f732d68aef2b90d36d9c7be51a9e1739ce7]
Change-Id: I52dfa83c0f7e0cdf17fa24ade36fc88716f56b05
Signed-off-by: Hackseung Lee <lhs@dignsys.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
injun.yang [Mon, 20 Nov 2017 04:20:27 +0000 (13:20 +0900)]
Change the property of IAS characteristic
[Problem] Write property is not permitted on IAS
[Cause & Measure] Change the property as per IAS specification.
Write -> WriteWithoutResponse property
Change-Id: I22687ea06359035913de687a7f474be5f1a57125
Signed-off-by: Injun Yang <injun.yang@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Seungyoun Ju [Fri, 17 Nov 2017 02:24:46 +0000 (11:24 +0900)]
btmon : SDP continuation list is not reset after use
[Problem] After receiving attribute response which has continuation
part more than 7 times, btmon doesn't print the decoded result.
[Cause & Measure] After combining attributes response, cont_list[x].cont is not
reset.
Change-Id: If6087288d10e446e9491e62eb2dd3250822e4311
Signed-off-by: Seungyoun Ju <sy39.ju@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Seungyoun Ju [Tue, 14 Nov 2017 06:15:00 +0000 (15:15 +0900)]
Fix btmon crash
[Problem] btmon crash happens
[Cause & Measure] When SDP continuation is handled, other variable's
value is overwritten because invalid array index is used for memcpy's
src.
[Checking Method] Run btmon -> Connect Android phone to KITT ->
Terminate btmon. In this procedure, btmon crash happens randomly.
When issue happens, irk_list's value is corrupted by invalid memcpy.
This causes crash when it accesses to irk_list.
1: irk_list = (struct queue *) 0xb7cda0a0
(gdb)
499 memcpy(cont_list[i].cont, data + bytes, data[bytes] + 1);
1: irk_list = (struct queue *) 0xb7cda0a0
(gdb)
0xb6f5f1a8 in memcpy@plt ()
1: irk_list = (struct queue *) 0xb7cda0a0
(gdb)
Single stepping until exit from function memcpy@plt,
which has no line number information.
memcpy () at ../sysdeps/arm/memcpy.S:63
...
1: irk_list = (struct queue *) 0xb7000002
(gdb)
search_attr_rsp (frame=0xbeadd3f8, tid=0xb6fcd760 <tid_list>) at monitor/sdp.c:669
669 clear_tid(tid);
1: irk_list = (struct queue *) 0xb7000002
(gdb) p cont_list
$5 = {{channel = 0, cont = '\000' <repeats 16 times>, data = 0xb7cda3a0, size = 656}, {channel = 0, cont = '\000' <repeats 16 times>, data = 0x0, size = 0}, {channel = 0,
cont = '\000' <repeats 16 times>, data = 0x0, size = 0}, {channel = 0, cont = '\000' <repeats 16 times>, data = 0x0, size = 0}, {channel = 0, cont = '\000' <repeats 16 times>,
data = 0x0, size = 0}, {channel = 0, cont = '\000' <repeats 16 times>, data = 0x0, size = 0}, {channel = 0, cont = '\000' <repeats 16 times>, data = 0x0, size = 0}, {channel = 0,
cont = '\000' <repeats 16 times>, data = 0x0, size = 0}}
Change-Id: I3608d1b9cf14bbfc87d17fbad6a443bdcbdf87af
Signed-off-by: Seungyoun Ju <sy39.ju@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
injun.yang [Mon, 13 Nov 2017 07:03:30 +0000 (16:03 +0900)]
Fix : GATT connection event is not delivered to bt-frwk
[Model] All
[BinType] AP
[Customer] OPEN
[Issue#] N/A
[Request] Internal
[Occurrence Version] N/A
[Problem] After BLE connection established, GATT connection event
is not delivered to bt-frwk side.
[Cause & Measure] Before emit signal, AP move to sleep status.
Reduce timeout interval
[Checking Method] GATT connection
[Team] Basic Connection
[Developer] Injun Yang
[Solution company] Samsung
[Change Type] Specification change
Change-Id: Ic3478333845ec0994a9424d40b8cfb9fd5fe0c1d
Signed-off-by: Injun Yang <injun.yang@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Deokhyun Kim [Tue, 7 Nov 2017 09:45:54 +0000 (18:45 +0900)]
Return already_connected msg when service is already connected
Change-Id: I754540f397b47d6c4e4e27f985d43d85a51b9e12
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Deokhyun Kim [Fri, 13 Oct 2017 05:35:45 +0000 (14:35 +0900)]
Remove Keyboard consumer page of HID.
- Some Windows PCs disconnect HID channel right after connected.
It assuems that some PCs can NOT parse consumer descriptor.
Change-Id: I79dc006d9cd663414970aa5bf4e61ef65af07479
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
injun.yang [Fri, 13 Oct 2017 00:24:41 +0000 (09:24 +0900)]
Set env PATH for security
Change-Id: I7bd64c78648615a70ef7e69c63abd23de1ef18fb
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Signed-off-by: injun.yang <injun.yang@samsung.com>
Atul Rai [Mon, 25 Sep 2017 10:48:50 +0000 (16:18 +0530)]
Fix bluetoothd crash in discover_services_reply()
This patch fixes bluetoothd crash in discover_services_reply while
handling sdp browse results if results contains invalid utf8
charactors.
Crash call stack is given below for reference:
0 0xb6ab8094 in raise () from /lib/libc.so.6
1 0xb6ab93f0 in abort () from /lib/libc.so.6
2 0xb6d30250 in ?? () from /lib/libdbus-1.so.3
3 0xb6d29754 in _dbus_warn_check_failed () from /lib/libdbus-1.so.3
4 0xb6d1f8a4 in dbus_message_iter_append_basic () from /lib/libdbus-1.so.3
5 0xb6eccc60 in iter_append_record () at src/device.c:3285
6 discover_services_reply () at src/device.c:3338
7 0xb6ed303c in search_cb () at src/device.c:6657
8 browse_cb () at src/device.c:6695
9 0xb6eae54a in search_completed_cb () at src/sdp-client.c:205
10 0xb6edf77a in sdp_process () at lib/sdp.c:4354
...
Change-Id: Id11dff0f2304f7e3dc6cd645b3418382744b1759
Signed-off-by: Atul Rai <a.rai@samsung.com>
DoHyun Pyun [Fri, 22 Sep 2017 05:07:05 +0000 (14:07 +0900)]
Fix the arch64 build error
Change-Id: If6ef35e7811c2f6067f96439e517f3d18294a094
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
DoHyun Pyun [Thu, 21 Sep 2017 06:30:38 +0000 (15:30 +0900)]
Add the Werror build option
Change-Id: I0f0bfb0c30832828602a67767145a5913c15215b
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
DoHyun Pyun [Thu, 21 Sep 2017 05:25:57 +0000 (14:25 +0900)]
Fix the build warning error in tizen patch codes
Change-Id: Ie37a309958c86ad6cf7c1ec9366d866f59abdd5b
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Deokhyun Kim [Thu, 14 Sep 2017 07:42:26 +0000 (16:42 +0900)]
Fix Mouse descriptor for HID
Change-Id: I3bc251349c8a32625fae1069d4135418f68bb779
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Luiz Augusto von Dentz [Wed, 13 Sep 2017 07:01:40 +0000 (10:01 +0300)]
sdp: Fix Out-of-bounds heap read in service_search_attr_req function
Check if there is enough data to continue otherwise return an error.
(CVE-2017-1000250)
Change-Id: I45d44d1bad703fa22af0f1d13cf710686ad64aae
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Sunmin Lee [Wed, 6 Sep 2017 08:27:55 +0000 (17:27 +0900)]
Remove update script for unsupported version
RW update script for Tizen 2.4 (to 3.0) is not necessary in Tizen 4.0.
(Tizen 4.0 does not support upgrade from Tizen 2.4)
Remove this file in terms of clearing the redundancy.
Change-Id: Id6ec06f667dc82f538b2cfea2c99b4e11be250ea
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
DoHyun Pyun [Wed, 6 Sep 2017 02:20:40 +0000 (11:20 +0900)]
Apply tizen 3.0 based product patchsets
-------------------------------------------------------
commit
c396c5b362f3c376c1afb390c23476ae9f482697
Author: Biman Paul <biman.paul@samsung.com>
Date: Fri Aug 4 19:59:40 2017 +0530
Use Trusted Profiles instead of Restricted Profiles
-------------------------------------------------------
Change-Id: I5b38f1a17762d17391cda458fa9ae2204dd25b03
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
DoHyun Pyun [Tue, 29 Aug 2017 07:44:28 +0000 (16:44 +0900)]
Enable the tds plugin
Change-Id: I461bc84d5e4ef1608ba5e7d098e33b0f65d49d90
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Pyun DoHyun [Tue, 29 Aug 2017 00:02:14 +0000 (00:02 +0000)]
Merge "[TDS Plugin] Use .accept and .disconnect" into tizen
Hyuk Lee [Mon, 28 Aug 2017 12:01:42 +0000 (21:01 +0900)]
Remove .swp file
Change-Id: Iee53a86179d3815c11c930daa4f4cc03ccbe9291
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
Anupam Roy [Mon, 28 Aug 2017 09:15:44 +0000 (14:45 +0530)]
[TDS Plugin] Use .accept and .disconnect
Remove the dependency of btd_device_attio function
and use .accept and .disconnect instead
Change-Id: I2ba3abad89df4b68e13742ce76fa405dd376e106
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
h.sandeep [Wed, 23 Aug 2017 10:18:49 +0000 (15:48 +0530)]
use .accept and .disconnect
Remove the dependency of btd_device_attio function
and use .accept and .disconnect instead
Change-Id: I0ddfaed823e7061a0171dde28c0e87d785677f70
Signed-off-by: h.sandeep <h.sandeep@samsung.com>
DoHyun Pyun [Mon, 21 Aug 2017 03:49:31 +0000 (12:49 +0900)]
Enable the proximity plugin
Change-Id: Ie0c4daa06bdf0296a4bb09f13e365600df5b3bbc
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Hyuk Lee [Tue, 22 Aug 2017 05:55:48 +0000 (14:55 +0900)]
Update the RW upgrade script
Change-Id: I276ad53083661c4b00f837b9fc4ad8dc08588b27
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
DoHyun Pyun [Fri, 11 Aug 2017 03:02:16 +0000 (12:02 +0900)]
Don't install obex.service file in the target image
obexd process is launching as dbus auto-activation.
So don't need to install the systemd's service file.
Change-Id: I36059dad412eda7fb97635dee54cf827de59a8c5
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
DoHyun Pyun [Thu, 3 Aug 2017 05:07:53 +0000 (14:07 +0900)]
Apply tizen 3.0 based product patchsets
-------------------------------------------------
commit
8b87ae42ba818a0a469f51a45a5a9838e9894a4d
Author: Anurag Biradar <biradar.a@samsung.com>
Date: Mon Apr 10 19:51:01 2017 +0530
-------------------------------------------------
Change-Id: I067d5801f179cfdec856c90757b1a680f7d47150
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>