Grzegorz Kolodziejczyk [Tue, 20 Mar 2018 14:05:17 +0000 (15:05 +0100)]
gatt: Add org.bluez.Error.InvalidOffset for long read procedure
This patch adds handling of invalid offset error for gatt database in
case if offset in read blob would be invalid.
"The Read Blob Request is repeated until the Read Blob Response’s Part
Attribute Value parameter is zero or an Error Response is sent by the server
with the Error Code set to Invalid Offset." Bluetooth Core 5.0, 4.12.2
"If the prepare Value Offset is greater than the current length of the attribute
value then all pending prepare write values shall be discarded for this client,
the queue shall be cleared and then an Error Response shall be sent with the
«Invalid Offset»." Bluetooth Core 5.0, 3.4.6.3
Change-Id: I678ca6984bde4502a3b325fd1822d21d98e6a1a9
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Grzegorz Kolodziejczyk [Tue, 20 Mar 2018 14:05:16 +0000 (15:05 +0100)]
client: Fix reading long values
While value has more than single MTU can carry long read procedure will
be triggered. In such cases offset need to bo considered while getting
value from storage.
Change-Id: Ide2d67c7562a83f317e699627a7c22ba058c47f8
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Avichal Agarwal [Mon, 19 Mar 2018 12:02:26 +0000 (17:32 +0530)]
gatt-database: Add support for Included service
Parse Includes property and register any object path found as included
service.
Change-Id: Id0a311b31bebf6f307a621ce3d66858f209b25f5
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Avichal Agarwal [Tue, 20 Mar 2018 05:09:41 +0000 (10:39 +0530)]
doc/gatt-api.txt: Add support for Included Service
included service support implemented at server side
Change-Id: I1577d5a1a5cb3d469bff2bf65a918740135ddcb5
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Wed, 14 Mar 2018 12:51:29 +0000 (14:51 +0200)]
shared/gatt-client: Fix attempting to discovery with handle 0
If a service was removed an no other service was added it may happen
that pending_svc has not empty but first_svc and last_svc has not been
set causing the following request:
< ACL Data TX: Handle 76 flags 0x00 dlen 11
ATT: Read By Type Request (0x08) len 6
Handle range: 0x0000-0x0000
Attribute type: Include (0x2802)
Change-Id: Id628ff103fee0abfcb961aaa4e0032737b0c805c
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Wed, 14 Mar 2018 12:46:05 +0000 (14:46 +0200)]
shared/gatt-client: Fix secondary service discovery
If the error returned is either BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND or
BT_ATT_ERROR_UNSUPPORTED_GROUP_TYPE the discovery shall be marked as
successful and no error shall be printed.
Change-Id: I3caf7be943e0457137732ee4427a38b914c7115f
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Wed, 14 Mar 2018 12:56:30 +0000 (14:56 +0200)]
shared/gatt-client: Omit valid errors for primary discovery
BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND shall not cause anything to be printed
since it is a valid response and just mark the end of primary discovery.
Change-Id: Ideebfd3b7646f5082f07edb0ae03c74272f23ec5
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Szymon Janc [Tue, 13 Mar 2018 07:47:27 +0000 (08:47 +0100)]
shared/gatt-server: Fix crash on read multiple
When read multiple includes external characteristic, call to
gatt_db_attribute_read's complete callback is asynchronous.
Fix following crash:
Use of uninitialised value of size 8
at 0x49718A: read_multiple_complete_cb (gatt-server.c:994)
by 0x498999: pending_read_result (gatt-db.c:136)
by 0x49A84B: gatt_db_attribute_read_result (gatt-db.c:1787)
by 0x451F4C: read_reply_cb (gatt-database.c:1712)
by 0x48B221: method_call_reply (client.c:972)
by 0x53AB601: ??? (in /usr/lib64/libdbus-1.so.3.19.3)
by 0x53AEF7E: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.19.3)
by 0x486FEF: message_dispatch (mainloop.c:72)
by 0x50CB576: ??? (in /usr/lib64/libglib-2.0.so.0.5400.3)
by 0x50CEB76: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.5400.3)
by 0x50CEF1F: ??? (in /usr/lib64/libglib-2.0.so.0.5400.3)
by 0x50CF231: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.5400.3)
Invalid read of size 8
at 0x49718A: read_multiple_complete_cb (gatt-server.c:994)
by 0x498999: pending_read_result (gatt-db.c:136)
by 0x49A84B: gatt_db_attribute_read_result (gatt-db.c:1787)
by 0x451F4C: read_reply_cb (gatt-database.c:1712)
by 0x48B221: method_call_reply (client.c:972)
by 0x53AB601: ??? (in /usr/lib64/libdbus-1.so.3.19.3)
by 0x53AEF7E: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.19.3)
by 0x486FEF: message_dispatch (mainloop.c:72)
by 0x50CB576: ??? (in /usr/lib64/libglib-2.0.so.0.5400.3)
by 0x50CEB76: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.5400.3)
by 0x50CEF1F: ??? (in /usr/lib64/libglib-2.0.so.0.5400.3)
by 0x50CF231: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.5400.3)
Address 0x8 is not stack'd, malloc'd or (recently) free'd
Change-Id: Id0aca942b2c5229e798c2d4fb9d9d8c3ac86cdde
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Marcel Holtmann [Sat, 10 Mar 2018 15:35:21 +0000 (16:35 +0100)]
Release 5.49
Change-Id: Icf519908cc6e44b9e760ac7a904052d7a39bcffd
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Fri, 9 Mar 2018 09:26:04 +0000 (11:26 +0200)]
avctp: Fix crash when disconnecting
When disconnecting the channel queue shall not be destroyed before
freeeing all requests including those that already have been processed
otherwise the following crash may happen:
4 errors in context 2 of 103:
Invalid read of size 4
at 0x12A5C2: control_req_destroy (avctp.c:762)
by 0x12A539: pending_destroy (avctp.c:517)
by 0x48A0D48: g_slist_foreach (in /usr/lib/libglib-2.0.so.0.3600.0)
by 0x12A77B: avctp_channel_destroy (avctp.c:553)
by 0x12A801: avctp_disconnected (avctp.c:570)
by 0x12A0F1: control_disconnect (control.c:134)
by 0x1306B9: avrcp_disconnect (avrcp.c:4471)
by 0x17DAE9: btd_service_disconnect (service.c:307)
by 0x18437D: dev_disconn_service (device.c:1405)
by 0x48A0D48: g_slist_foreach (in /usr/lib/libglib-2.0.so.0.3600.0)
by 0x187D87: device_request_disconnect (device.c:1437)
by 0x187EC6: dev_disconnect (device.c:1522)
Address 0x4fde068 is 0 bytes inside a block of size 16 free'd
at 0x48252B3: free (vg_replace_malloc.c:446)
by 0x4888172: g_free (in /usr/lib/libglib-2.0.so.0.3600.0)
by 0x12AB64: avctp_queue_destroy (avctp.c:537)
by 0x48A0D48: g_slist_foreach (in /usr/lib/libglib-2.0.so.0.3600.0)
by 0x48A0D91: g_slist_free_full (in /usr/lib/libglib-2.0.so.0.3600.0)
by 0x12A75E: avctp_channel_destroy (avctp.c:552)
by 0x12A801: avctp_disconnected (avctp.c:570)
by 0x12A0F1: control_disconnect (control.c:134)
by 0x1306B9: avrcp_disconnect (avrcp.c:4471)
by 0x17DAE9: btd_service_disconnect (service.c:307)
by 0x18437D: dev_disconn_service (device.c:1405)
by 0x48A0D48: g_slist_foreach (in /usr/lib/libglib-2.0.so.0.3600.0)
Change-Id: Ida52cd46ad8d1754e8afa84ab52f7e84b68f1065
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Szymon Janc [Tue, 6 Mar 2018 14:15:14 +0000 (15:15 +0100)]
device: Fix missing Paired property change on non-bonded device
If device is paired but not bonded than Paired property should be
also updated when device is disconnected.
Change-Id: Ic4b49d25692dd09807196444f20be76212b96b30
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Amit Purwar [Wed, 10 Apr 2019 09:38:02 +0000 (15:08 +0530)]
Fixed the session list for obex
Change-Id: Ic86fba8e3089b0d29c80260f9335ecda7e64c62d
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Szymon Janc [Tue, 6 Mar 2018 13:28:07 +0000 (14:28 +0100)]
Fix storage for adapters without public address
Since those have adapter folder prefixed with "static-" this needs
to be taken into account when storing data.
Change-Id: I3a444ac00c36ee064538629284a466633a01e1e3
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Fri, 19 Jan 2018 13:37:07 +0000 (11:37 -0200)]
advertising: Fix crash when if client invalidate property
If a property is invalidated the iter is set to NULL which should be
checked and properly reset.
Change-Id: I4981b56b9d8b68bb589d0ced2f429c71441a7ce8
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Wed, 28 Feb 2018 12:09:08 +0000 (14:09 +0200)]
advertising: Fix creating another mgmt instance
adapter already instanciate a instance of mgmt so just reuse that
instead of creating a new one.
Change-Id: I0a1fd65ff2d6f6cbae5783a25f1adbd547992432
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
David Frey [Mon, 5 Mar 2018 20:01:16 +0000 (12:01 -0800)]
Remove obsolete Debian notes from HACKING
The HACKING document says that Debian's automake version doesn't satisfy
the automake >= 1.10 requirement, but this is no longer true. The
automake version in Debian 8 (oldstable) is 1.14 and the version in
Debian 9 (stable) is 1.15.
Change-Id: I2428584f070a52d6aac2b8b766f9a9793b018f91
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Szymon Janc [Mon, 5 Mar 2018 16:16:35 +0000 (17:16 +0100)]
device: Fix bearer selection with single mode controller
If remote device is dual mode and advertises without "BR/EDR flag
not supported" set than device is marked as supporting BR/EDR
even if controller is doing LE only. This results in bluetoothd
trying to connect over BR/EDR since this is prefered transport
if none is connected.
Fix this by checking if adapter supports specified technology
before doing heuristic transport selection.
Change-Id: Icb51c40a4327759817c637f90821c0bea866edc4
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Thu, 1 Mar 2018 09:11:17 +0000 (11:11 +0200)]
client: Fix lines going beyond 80 columns
Change-Id: I31dfc94aa5314362a7d5b18aeb8ecb4ebbe11a71
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
ERAMOTO Masaya [Thu, 1 Mar 2018 04:27:42 +0000 (13:27 +0900)]
dbus-common: Remove unused functions
Change-Id: I580a497600bbe7c2521f5303fdbd2069b60a558b
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
ERAMOTO Masaya [Thu, 1 Mar 2018 04:27:38 +0000 (13:27 +0900)]
unit/test-gdbus-client: Use g_dbus_dict_append_entry()
Change-Id: I63b356bd82ffee5f40ba4b53756d384874c7ee59
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
ERAMOTO Masaya [Thu, 1 Mar 2018 04:27:21 +0000 (13:27 +0900)]
client: Use g_dbus_dict_append_*()
Change-Id: Ifeeed4631fc3408ef3225c6356cabb7179c3d472
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
ERAMOTO Masaya [Thu, 1 Mar 2018 04:27:16 +0000 (13:27 +0900)]
obexd: Remove unused source/header files for dbus
Due to using g_dbus_emit_property_changed() and g_dbus_get_properties(),
obex_dbus_signal_property_changed() is unused since commit
96063756
("obex-client: Rename org.bluez.obex.Transfer to Transfer1"), and
OBC_PROPERTIES_ARRAY_SIGNATURE macro is unused since commit
3eadc034
("obex-client: Make use of g_dbus_get_properties to get transfer properties").
Change-Id: If237f40dea006c9b96e16dc3e446dff80e591aed
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
ERAMOTO Masaya [Thu, 1 Mar 2018 04:27:10 +0000 (13:27 +0900)]
obexd: Use g_dbus_dict_append_entry()
Change-Id: I7119b0a9dbf1d5491fe869e59efca3ab0e18d313
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Fri, 23 Feb 2018 14:34:58 +0000 (16:34 +0200)]
client: Quit when done with command
This ensures that the commands don't stay hanging since bt_shell no
longer quits immediatelly after executing a command.
Change-Id: I69dd2faa6c1c55039d7d19d2e4effcf2cd4919d7
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Szymon Janc [Fri, 23 Feb 2018 13:40:09 +0000 (14:40 +0100)]
shared/btp: Fix return type in btp_send
This function returns bool.
Change-Id: Ie7d30dcb11a2e400a43e7f29ae92006caee1366e
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Szymon Janc [Fri, 23 Feb 2018 13:40:10 +0000 (14:40 +0100)]
shared/btp: Allow to call btp_send without valid btp
This allows to unconditionally call btp_send from code that generates
events eg when mapping those from D-Bus events.
Change-Id: Id47fb80d7116d0fd8ac4f48567ee115ca43c3e89
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Wed, 21 Feb 2018 11:02:42 +0000 (13:02 +0200)]
client: Don't auto register agent on non-interactive mode
There is no use to register an agent when on non-interactive mode.
Change-Id: Idbbac0630b0ea901cceeb710bdae32a4e03fbe45
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Szymon Janc [Mon, 19 Feb 2018 13:40:19 +0000 (14:40 +0100)]
adapter: Add ConnectDevice method
This allows to connect device without doing general discovery. This is
needed for some of qualification tests where there is no general
discovery upfront and we need to do connection to device with provided
address.
Another usecase is for scenario where scanning happen on one controller
but connection handling on another.
New device object is announced only if physical connection was
successful. On success this method returns path to created device
object. After ConnectProfile return bluetoothd continue with
services discovery and profile connection.
This patch implements bare minimum properties needed for connection -
address and address type. If needed eg. for non-NFC based OOB it could
be extended with more options.
Change-Id: I08bbd114ac9c46bf377879694175c58d0e8fea02
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Szymon Janc [Tue, 20 Feb 2018 11:09:40 +0000 (12:09 +0100)]
shared/shell: Fix history display with no saved prompt
Prompt needs to be restored always since default prompt is provided.
This fix issues with history line being clobbered by offset of prompt
length.
[bluetooth]# connect 9C:5C:F9:AB:C5:82
Attempting to connect to 9C:5C:F9:AB:C5:82
[bluetooth]# disconnect 9C:5C:F9:AB:C5:82
Attempting to disconnect from 9C:5C:F9:AB:C5:82
Failed to connect: org.bluez.Error.Failed
Successful disconnected
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller 5C:E0:C5:34:AE:1C Discoverable: yes
[bluetooth]# disconnect discoverable on
after pressing up-down
[bluetooth]# disconnect dis5C:F9:AB:C5:82
Change-Id: I83d4d5e15cb67f51256359d7e73c19a840c85a34
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Tue, 20 Feb 2018 09:11:26 +0000 (11:11 +0200)]
shared/io: Don't process HUP cond before others
When a HUP happens there maybe data left to be processed so the
disconnect handler shall be called last.
Change-Id: Ic4a4ec535cc628f01118c5ade20d5e36bc25671a
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Mon, 19 Feb 2018 12:51:50 +0000 (14:51 +0200)]
device: Fix probing service twice
If there is already a service for a given profile there is no point in
probing it again.
Change-Id: I932148183acaf832763e7cc9e419312957d91d72
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Szymon Janc [Mon, 19 Feb 2018 12:43:35 +0000 (13:43 +0100)]
adapter: Fix not clearing connectable setting on power off
When kernel control of connectable is used daemon doesn't enable
connectable setting unless discoverable. Both settings are permanent
over power toggle unless discoverable timeout was set. In that case
discoverable flag is cleared by kernel on power off. This leads to
connectable flag being left enabled when toggling power on discoverable
adapter with timeout set.
This has some implications on system behaviour:
- accepting connection from unknown devices
- not being able to advertise as broadcaster
Since kernel doens't know the reason for enabling connectable flag (and
thus if disable if on power off) this needs to be handled in bluetoothd.
Change-Id: Id454bbd69027affc08a9a11bccfd90e0a2da12a9
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
ERAMOTO Masaya [Fri, 16 Feb 2018 05:51:48 +0000 (14:51 +0900)]
client: Add clear command for advertise
Adds the clear command to advertise-related commands to clear individual
fields or whole of advertise configuration.
Change-Id: I947e47a73830cfc28d370e1c5f3a47d3cf6fb254
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
ERAMOTO Masaya [Fri, 16 Feb 2018 05:51:37 +0000 (14:51 +0900)]
client: Introduce ad_disable_{uuids,service,manufacturer}
Change-Id: Id0555a1433d234f42dd1d0faa08f3274b30a1cc8
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
ERAMOTO Masaya [Fri, 16 Feb 2018 05:51:29 +0000 (14:51 +0900)]
client: Introduce data_clear() calling ->clear()
Change-Id: I96e980ea20bffa99096c367db92478f6aea1ab10
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
ERAMOTO Masaya [Fri, 16 Feb 2018 05:51:21 +0000 (14:51 +0900)]
client: Improve help messages for advertise
Change-Id: Id56c9df117e6c817b4d3b5dda6b54941441349b4
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
ERAMOTO Masaya [Fri, 16 Feb 2018 05:51:15 +0000 (14:51 +0900)]
client: Fix data growth if reconfiguring ad service
Since commit
65eff5c2 ("client: Rename set-service to service"), data
are appended in every run of advertise service with data arguments as
below:
[bluetooth]# service 1 1 2
[bluetooth]# service
UUID: SDP(1)
01 02 ..
[bluetooth]# service 1 1 2 3
[bluetooth]# service
UUID: SDP(1)
01 02 01 02 03 .....
Change-Id: I1e8f6f19adbbd967b2ddc06837ddf7103ea18167
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
ERAMOTO Masaya [Fri, 16 Feb 2018 05:51:08 +0000 (14:51 +0900)]
client: Not output ad service info if no uuid sets
Change-Id: I2f3db46b13b7d33a952993dcc1c1421e01b4ce1c
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
ERAMOTO Masaya [Fri, 16 Feb 2018 05:51:03 +0000 (14:51 +0900)]
client: Fix null output for ad service uuid
If getting the advertise service information without setting, outputs
null as UUID as below:
[bluetooth]# service
UUID: ((null))
Change-Id: I47ce8f6c380b90bf17acfa0db112bfc93b234e14
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Wed, 14 Feb 2018 13:58:15 +0000 (15:58 +0200)]
adapter: Fix initializing GATT server for BR/EDR only controllers
Controller that do not support LE bearer shall not use GATT server for
anything.
Change-Id: Iffde6329966bb828a43262f3af41f6f294ce5667
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
ERAMOTO Masaya [Wed, 14 Feb 2018 07:20:31 +0000 (16:20 +0900)]
obexd: Fix null response name
Prints out "<unknown>" string if there is no response name as below:
obexd[8117]: obexd/src/obex.c:cmd_connect()
obexd[8117]: CONNECT(0x0), (null)(0xffffffff)
Change-Id: I3229def9a31f1397001f9c101550e0f30da17641
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Matt Schulte [Wed, 7 Feb 2018 07:48:56 +0000 (23:48 -0800)]
advertising: only parse adv from adv interfaces
client_proxy_added is called for every interface on an object passed in
to the dbus RegisterAdvertisement method. This can cause a NULL
dereference to occur and a failure status in the reply on dbus
RegisterAdvertisement method calls. The fix is to return early from
client_proxy_added if the proxy interface is not
org.bluez.LEAdvertisement1. If this early return is not there, two
different error paths could occur.
1) client_proxy_added is first called with the
org.bluez.LEAdvertisement1 interface and then with another interface.
The second call will fail the parse_advertisement call and possibly
cause a NULL dereference on the dbus_message_unref if
add_client_complete has already occurred.
2) client_proxy_added is first called with an unknown interface and then
org.bluez.LEAdvertisement1. The first call will cause
parse_advertisement to fail and a failure to be replied to the client
calling RegisterAdvertisement. The advertisement may be successfully
registered on the second client_proxy_added call but a NULL dereference
will occur on the call to dbus_message_new_method_return in
add_client_complete.
Change-Id: I5fa0dbaad9568d0ebdd1c358246f10b20cbe2bcc
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Konstantin Zhukov [Mon, 12 Feb 2018 10:40:30 +0000 (14:40 +0400)]
shared/gatt-db: Fix declaration attributes permission
According to Bluetooth Core specification v4.2 (Vol. 3, part G,
section 3.1), service declararion attributes should have only READ
permission. The same obligation has charateristic declaration and
include service declaration attributes.
Without this permission connected clients could corrupt GATT database
by writing to declaration attributes. After thatm service discovery
fails in other clients.
Change-Id: Ib18c4de213e9c242a09a770d9f24cd850a1af6a0
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
ERAMOTO Masaya [Fri, 9 Feb 2018 09:11:41 +0000 (18:11 +0900)]
obexd: Emit Size property of transfer after open()
Emits the Size property of transfer after calling ->open() because it
may update the size information.
Change-Id: I343e2f9c5993a9c91107e75f7a0af747f262308c
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
ERAMOTO Masaya [Fri, 9 Feb 2018 09:10:57 +0000 (18:10 +0900)]
obexd: Use emitting function wrapped for transfer
Also replaces emit_transfer_progress() with the new wrapper function
because the total/transferred arguments have not been used since commit
a5c2b6e8 ("obexd: Align client and server spec of org.bluez.obex.Transfer1")
and g_dbus_emit_property_changed_full() checks if the path argument is
NULL.
Change-Id: I2733ee5de2de15d008d45724abffafefa87fc045
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Fri, 9 Feb 2018 10:46:55 +0000 (12:46 +0200)]
shared/gatt-client: Reset callbacks when unregistering
If user application is unregistering a notification handler its
callbacks shall not be called even CCC write is still holding a
reference to notify_data.
Change-Id: Ib16702e9d0437478487daf6571844b55ceac5266
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Szymon Janc [Thu, 8 Feb 2018 16:03:06 +0000 (17:03 +0100)]
adapter: Remove spurious propery changed signal
There is no "Connectable" property on Adapter1 interface.
Change-Id: I2673bfc3bf9a5b18ceac1dffacbf47b05181e1a4
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Szymon Janc [Wed, 7 Feb 2018 10:02:24 +0000 (11:02 +0100)]
advertising: Configure discoverable flag based on adapter settings
Until now advertising as peripheral was always setting General Discoverable
flag set. With this patch this is set based on adapter discoverable setting.
Change-Id: Ic4db27d37f94ab6a99250f919d9e9432cfa40886
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Wed, 7 Feb 2018 11:35:07 +0000 (09:35 -0200)]
core: Fixes order InterfaceAdded
Registering on the callback of MGMT_OP_READ_ADV_FEATURES causes
InterfacesAdded to be reschedule after the device objects which causes
tools such as PulseAudio to consider it invalid.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1534857
Change-Id: I5e485ccbeb9d0cd81b0a34bbe970306333ef948e
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Tue, 6 Feb 2018 10:01:19 +0000 (08:01 -0200)]
client: Fix not cleaning up notify pipe
If remote unsubscribe, disconnects or the daemon closes the socket the
io shall be destroyed properly otherwise it will prevent new
subscriptions.
Change-Id: I9cd77b61e7bfdd38ecd160edd0b9316d8285c7b0
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Tue, 6 Feb 2018 09:00:14 +0000 (07:00 -0200)]
gatt: Fix memory leak
If bt_gatt_client_register_notify fails the client shall be freed.
Change-Id: Ie478a2df0edb4129129daa1fb3448c44cfcc7efa
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Mon, 5 Feb 2018 12:02:43 +0000 (10:02 -0200)]
client: Don't set generators for modes
Commands that already have all values set on the argument string don't
need to add a generator since bt_shell can now auto complete them.
Change-Id: I6a1876b4754a574ae68b1dfb7f80b16885e6d83a
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Szymon Janc [Fri, 2 Feb 2018 09:18:11 +0000 (10:18 +0100)]
build: Bump ELL dependency to 0.3
This is first version that supports D-Bus proxy API used by btpclient.
Change-Id: If8dfb4a3f2744fc42c128de72e088ee17893ab18
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Wed, 31 Jan 2018 10:55:30 +0000 (08:55 -0200)]
adapter: Use g_dbus_send_reply whenever possible
This convert calls of g_dbus_create_reply + g_dbus_send_message to just
g_dbus_send_reply as that is simpler to maintain and saver as that always
check if the reply could be constructed properly.
Change-Id: I7514f10f22e4c629892796c929cb556a0fb07a97
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Sun, 28 Jan 2018 13:44:32 +0000 (11:44 -0200)]
gdbus: Fail to send NULL messages
This should make it safe to call g_dbus_send_message with a NULL
message which is more likely to happen now that g_dbus_create_reply
returns NULL when the message is marked with NO_REPLY flag.
Change-Id: Ie5d51fab161acf06a4813c64d05689f3ecc627df
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Sun, 28 Jan 2018 13:22:26 +0000 (11:22 -0200)]
gdbus: Fix replying to messages marked with NOREPLY flag
When a sender flags a D-Bus message as not expecting a reply, it is
against D-Bus policy to send a reply — sending one can result in an
error as reported in:
https://bugzilla.kernel.org/show_bug.cgi?id=198453
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Change-Id: I64f927691a7e135b3855ee2ed10f202f0a1cd632
Luiz Augusto von Dentz [Wed, 24 Jan 2018 13:06:16 +0000 (11:06 -0200)]
obexd: Fix property Size of server transfer
OBJECT_SIZE_DELETE is shall not be consider a valid size.
Change-Id: I84ec5c9f7397dee6597a99263cb200243b0def5f
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
ERAMOTO Masaya [Tue, 23 Jan 2018 09:45:34 +0000 (18:45 +0900)]
obexd: Clean up unneeded list in src/obex.c
Cleans up the sessions list which has been unneeded by commit
8572afb4
("obexd: Make use of transport drivers and some cleanups").
Change-Id: Ie06072fa6d052bd7e5bdc824e8250362bd914cae
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Marcel Holtmann [Mon, 22 Jan 2018 11:06:31 +0000 (12:06 +0100)]
shared: Add missing ecc_valid_public_key function
Change-Id: I955d675fcf2d8fe6c2d50da9a54100c1e7041bd9
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Fri, 19 Jan 2018 13:12:09 +0000 (11:12 -0200)]
client: Print advertising details
Print advertising details when active.
Change-Id: Idc4372ad9dbc7d1e8839f7fe67f4490f5de5433e
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Thu, 14 Dec 2017 18:09:39 +0000 (16:09 -0200)]
client: Rename set-uuids to uuids
Make the command return the current value if no parameters:
[bluetooth]# uuids 0x1820
[bluetooth]# uuids
UUID: Internet Protocol Support (0x1820
Change-Id: Ia0fa56d8374f1efcfdbc03a2929a2ea8131ba00d
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Luiz Augusto von Dentz [Tue, 16 Jan 2018 19:01:03 +0000 (17:01 -0200)]
client: Fix register-{characteristic, descriptor}
Flags parameter should be found in the third parameter not the second
since bt_shell don't omit the command anymore.
Change-Id: I7d38136b3a7d8a6a73411b954a85de908cd15c70
Luiz Augusto von Dentz [Tue, 2 Jan 2018 16:19:26 +0000 (14:19 -0200)]
client: Remove use of double const argument
Change-Id: Ia7869ba6fadb083393b2cda5f62b5de4214ea50a
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
ERAMOTO Masaya [Thu, 28 Dec 2017 05:44:18 +0000 (14:44 +0900)]
client: Use g_dbus_proxy_path_lookup()
Change-Id: Icee4a0543cd13cbd516f5156862450b350631264
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
ERAMOTO Masaya [Thu, 28 Dec 2017 05:44:15 +0000 (14:44 +0900)]
gdbus: Introduce g_dbus_proxy_path_lookup()
g_dbus_proxy_path_lookup() returns the path of the proxy that matches the
passed path. It also returns the index of the proxy coming next to the
matched proxy in the passed list.
Change-Id: Id14371c3c692728ef632987be35190146703be3f
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Wootak Jung [Thu, 28 Mar 2019 04:53:30 +0000 (13:53 +0900)]
Add default a2dp role setting logic for headless
Change-Id: I25f5fa87779790eb189d0ac6070a25d5cead09db
Wootak Jung [Mon, 18 Mar 2019 02:26:03 +0000 (11:26 +0900)]
Fix OPP Server dbus rejection issue
Change-Id: Icd6098a74a6336d5f93cbc985761cf3de9463fd1
DoHyun Pyun [Mon, 18 Mar 2019 00:36:27 +0000 (09:36 +0900)]
Apply the review comments in A2DP multistream
Change-Id: I7e0ff1040067be3062f1433847913808b5923fdd
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Seungyoun Ju [Wed, 23 Jan 2019 06:52:15 +0000 (15:52 +0900)]
Support getting LE Local OOB Data
[Problem] There is no interface to get LE local OOB Data
[Cause & Measure] Send MGMT_OP_READ_LOCAL_OOB_EXT_DATA to kernel to get
LE local OOB Data.
Result:
$ dbus-send --system --print-reply --dest=org.bluez /org/bluez/hci0 org.bluez.OutOfBand.LEReadLocalData
method return time=
1548225479.022260 sender=:1.392 -> destination=:1.400 serial=94 reply_serial=2
array of bytes [
08 1b 86 a6 6a d6 ae 08 00 02 1c 01 11 22 71 05 07 3e 23 98 9b 54 c4 56
c4 b0 af 35 12 30 11 23 c4 3c 10 96 94 ad 99 19 9f 58 03 57 e7 5a ac 33
02 01 00
]
< ACL Data TX: Handle 65 flags 0x00 dlen 11
SMP: Pairing Request (0x01) len 6
IO capability: KeyboardDisplay (0x04)
OOB data: Authentication data from remote device present (0x01)
Authentication requirement: Bonding, MITM, SC, No Keypresses (0x0d)
Max encryption key size: 16
Initiator key distribution: EncKey IdKey Sign (0x07)
Responder key distribution: EncKey IdKey Sign (0x07)
> ACL Data RX: Handle 65 flags 0x02 dlen 11
SMP: Pairing Response (0x02) len 6
IO capability: DisplayOnly (0x00)
OOB data: Authentication data not present (0x00)
Authentication requirement: Bonding, MITM, SC, No Keypresses (0x0d)
Max encryption key size: 16
Initiator key distribution: EncKey IdKey Sign (0x07)
Responder key distribution: EncKey IdKey Sign (0x07)
< ACL Data TX: Handle 65 flags 0x00 dlen 69
SMP: Pairing Public Key (0x0c) len 64
X: cfb9cf0a6922f4c5368c7025f15193e183e895a7ba354d6283cbb6c9ac34aafc
Y: 9c0a76d625852440b0ccc08d56587f38f3f22a11950e3f2824e4ccc2505fd70f
> HCI Event: Number of Completed Packets (0x13) plen 5
Num handles: 1
Handle: 65
Count: 2
> ACL Data RX: Handle 65 flags 0x02 dlen 27
> ACL Data RX: Handle 65 flags 0x01 dlen 27
> ACL Data RX: Handle 65 flags 0x01 dlen 15
SMP: Pairing Public Key (0x0c) len 64
X: acec5a11f457c40138809e618865b8ead2ea1c5f71b38deb8e3bb76c64b219a8
Y: 9bc8d28c0f96d175c9661ec012af89b5b34f936a9a8ec6c39b75e12540eeaf76
< ACL Data TX: Handle 65 flags 0x00 dlen 21
SMP: Pairing Random (0x04) len 16
Random value:
a307ddd44443bfbba384cc26bd51012f
> ACL Data RX: Handle 65 flags 0x02 dlen 21
SMP: Pairing Random (0x04) len 16
Random value:
36bd1b4d18a5a3dfcdaefeae72cb380e
< ACL Data TX: Handle 65 flags 0x00 dlen 21
SMP: Pairing DHKey Check (0x0d) len 16
E:
02cb188687306cd5a10cd3788bd317f3
> HCI Event: Number of Completed Packets (0x13) plen 5
Num handles: 1
Handle: 65
Count: 2
> ACL Data RX: Handle 65 flags 0x02 dlen 21
SMP: Pairing DHKey Check (0x0d) len 16
E:
1970e360950cc322587d322f0c4e333a
< HCI Command: LE Start Encryption (0x08|0x0019) plen 28
Handle: 65
Random number: 0x0000000000000000
Encrypted diversifier: 0x0000
Long term key:
a818945751ab5c2e10c6de92ed1c9130
> HCI Event: Command Status (0x0f) plen 4
LE Start Encryption (0x08|0x0019) ncmd 1
Status: Success (0x00)
> HCI Event: Encryption Change (0x08) plen 4
Status: Success (0x00)
Handle: 65
Encryption: Enabled with AES-CCM (0x01)
Change-Id: I9e8e9bbc6c06b20938c653b71066d4f27a4028ad
Seungyoun Ju [Thu, 8 Nov 2018 08:51:03 +0000 (17:51 +0900)]
Delete temp files
[Problem] Storage directory's size becomes huge (over 6MB)
after infinite rebooting test.
[Cause & Measure] Over 1,500 temp files were created as followings.
g_file_contents_set() creates temp file and writes contents to it. After that,
rename temp file to destination file for atomic operation. If a device turned
off before renaming, temp file remains and never be deleted.
This patch deletes temp files before creating temp files.
4.0K /opt/var/lib/bluetooth/FC:A6:21:B2:E1:7B/settings.CKX5BZ
4.0K /opt/var/lib/bluetooth/FC:A6:21:B2:E1:7B/settings.OA76BZ
4.0K /opt/var/lib/bluetooth/FC:A6:21:B2:E1:7B/settings.1BFTBZ
4.0K /opt/var/lib/bluetooth/FC:A6:21:B2:E1:7B/settings.3CB9BZ
[Checking Method] Reboot device while booting
Change-Id: Ie159ef06eab6295b1f40514e4dde386a512eb5d1
Seungyoun Ju [Fri, 2 Nov 2018 11:12:35 +0000 (20:12 +0900)]
Fix : Multi advertising is not working
[Problem] Multi advertising is not working.
[Cause & Measure] There is a condition to check if multiple advertising
is supported or not. But the condition is not valid now so it has been
removed.
Change-Id: I76387667f19b8c58a40416faf4fa42462782b4cb
Seungyoun Ju [Thu, 25 Oct 2018 09:11:59 +0000 (18:11 +0900)]
Send LE Set Random Address and check response
[Problem] HCI command Tx timeout happens.
[Cause & Measure] Vendor command is sent before Command complete event comes
for LE Set Random Address. It causes bluetooth chip's malfunction.
This commit fixs to check the response about LE Set Random Address. So
that next vendor command is sent after LE Set Random Address is
processed properly by chipset.
[Checking Method] Turn on Bluetooth > Start advertising
Change-Id: Ie757398be6d8ad71da1cc23b72ac132789df9e49
Szymon Janc [Thu, 26 Jul 2018 14:34:00 +0000 (16:34 +0200)]
shared/gatt-client: Fix crash on ext prop read failure
[Problem] bluetoothd crash happens.
[Cause & Measure] There is no routine for failure case of extended
property read response. It causes invalid memory access. There is
upstream patch for this issue. So this patch applies the upstream patch.
[Checking Method] Disconnect BLE during GATT service discovery. This is
some times issue.
[Original upstream patch]
commit
6e2eb99f666ea7084067196472ff8d49e06f90d9
Author: Szymon Janc <szymon.janc@codecoup.pl>
Date: Thu Jul 26 16:34:00 2018 +0200
shared/gatt-client: Fix crash on ext prop read failure
Program received signal SIGSEGV, Segmentation fault.
Program received signal SIGSEGV, Segmentation fault.
ext_prop_read_cb (success=false, att_ecode=0 '\000', value=0x0,
length=0, user_data=0x72ad30) at src/shared/gatt-client.c:711
711 src/shared/gatt-client.c: No such file or directory.
(gdb) bt
0 ext_prop_read_cb (success=false, att_ecode=0 '\000', value=0x0,
length=0, user_data=0x72ad30)
at src/shared/gatt-client.c:711
1 0x000000000049b8cc in disc_att_send_op (data=0x7199b0)
at src/shared/att.c:547
2 0x000000000049cb44 in disconnect_cb (io=<optimized out>,
user_data=0x716070) at src/shared/att.c:580
3 0x00000000004a6405 in watch_callback (channel=<optimized out>,
cond=<optimized out>, user_data=<optimized out>)
at src/shared/io-glib.c:170
4 0x00007ffff78c704a in g_main_context_dispatch ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
5 0x00007ffff78c73f0 in ?? ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
6 0x00007ffff78c7712 in g_main_loop_run ()
from /lib/x86_64-linux-gnu/libglib-2.0.so.0
7 0x000000000040c620 in main (argc=1, argv=0x7fffffffe5a8)
at src/main.c:781
Change-Id: I6f0a0b1501761693ebdbd851773878e827cd6cce
Pyun DoHyun [Tue, 12 Feb 2019 04:22:17 +0000 (04:22 +0000)]
Merge "Don't try to reconnect for A2DP source connection" into tizen
DoHyun Pyun [Fri, 8 Feb 2019 07:46:48 +0000 (16:46 +0900)]
Don't try to reconnect for A2DP source connection
For A2DP multi connection function, we should disable
the reconnection logic for the stable streaming.
Change-Id: I57d217d9e65c7fcbcfd53cdf894236e7ee880dff
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Amit Purwar [Mon, 4 Feb 2019 06:36:08 +0000 (12:06 +0530)]
Modified the write fd for acquired write
Change-Id: I2bdc6b7e925bf8d316eb6bebd32ac35328465b2b
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Pyun DoHyun [Wed, 30 Jan 2019 01:05:53 +0000 (01:05 +0000)]
Merge "A2DP profile multiple source support" into tizen
Amit Purwar [Mon, 28 Jan 2019 05:17:45 +0000 (10:47 +0530)]
Fixed disable notify for acquire notification
Change-Id: Icf807258aa50836ffb99a7bd67740561850e4cff
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
Avichal [Fri, 14 Dec 2018 11:18:48 +0000 (16:48 +0530)]
A2DP profile multiple source support
there will be two sources source1 and source2
pause source 1 when source2 plays and viceversa
Change-Id: I2d424ce76278f505f9c270684248a76141e8e2b9
Signed-off-by: Avichal <avichal.a@samsung.com>
Luiz Augusto von Dentz [Mon, 21 Jan 2019 12:23:10 +0000 (17:53 +0530)]
gatt: Switch from pipe2 to sockepair for Acquire*
This enables to use sendmsg with MSG_NOSIGNAL.
Change-Id: Ie28b0bfbec3730448e7d045d978909accab0f685
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Avichal <avichal.a@samsung.com>
DoHyun Pyun [Wed, 2 Jan 2019 04:06:30 +0000 (13:06 +0900)]
Enable the connection request event for custom obex server
Change-Id: Icac1762393d4527d4fa920e5e123bcdf0ec485bf
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Wootak Jung [Fri, 21 Dec 2018 00:55:13 +0000 (09:55 +0900)]
Include btattach, btmon tools into bluez pkg
Change-Id: I71f7e2659ce03c0a11fdd489d1a15515255b7a06
DoHyun Pyun [Tue, 30 Oct 2018 02:24:14 +0000 (11:24 +0900)]
Remove the apach license in the spec file
Change-Id: I440381913b762cc81f732099cecc08348d8752dc
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
Wootak Jung [Mon, 29 Oct 2018 04:05:31 +0000 (13:05 +0900)]
Fix bluez rpm installation priority
The attribute of hci* execution files is not set network_fw:network_fw,
if bluez rpm is installed before security-config rpm.
Change-Id: Ifadd19e93397a52b14aea872bb88df9f26edc4f9
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>