New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 862849 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Aug 22
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 812468



Sign in to add a comment

Implement "upward forwarding" in Bluetooth dispatcher

Project Member Reported by sonnysasaka@chromium.org, Jul 12

Issue description

btdispatch should act as a pure proxy for any D-Bus flow from server (BlueZ/NewBlue) to clients (e.g. Chrome, bluetoothctl).

This is the second half of http://go/bluez-split-stack-phase-1.
 
Blocking: 812468
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 17

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/ed47f6dd885b50f656a3bdecbfdd8cf4667aa977

commit ed47f6dd885b50f656a3bdecbfdd8cf4667aa977
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue Jul 17 09:26:24 2018

bluetooth: Added org.bluez.AgentManager1 interface to dispatcher

This is needed for passcode display. The added methods are based on
BlueZ's doc/agent-api.txt.

BUG= chromium:862849 
TEST=End-to-end manual test with bluetoothctl:
     bluetoothctl --service=org.chromium.Bluetooth
     [bluetooth]# agent on

Change-Id: Ic0b2ec409ce5abfe71859a31fed042753d9fa9a7
Reviewed-on: https://chromium-review.googlesource.com/1136720
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/ed47f6dd885b50f656a3bdecbfdd8cf4667aa977/bluetooth/dispatcher/dispatcher.cc
[modify] https://crrev.com/ed47f6dd885b50f656a3bdecbfdd8cf4667aa977/bluetooth/dispatcher/bluez_interface_handler.h
[modify] https://crrev.com/ed47f6dd885b50f656a3bdecbfdd8cf4667aa977/bluetooth/dispatcher/dispatcher_unittest.cc
[modify] https://crrev.com/ed47f6dd885b50f656a3bdecbfdd8cf4667aa977/bluetooth/dispatcher/bluez_interface_handler.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Jul 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/564474a84c85bec2c8079fdca40f8bf6d687cdff

commit 564474a84c85bec2c8079fdca40f8bf6d687cdff
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Thu Jul 19 18:27:19 2018

dbus: Add TryRegisterFallback

The TryRegisterFallback works just like TryRegisterObjectPath,
with addition that the registered callbacks also apply to the specified
object path and its sub paths. This is useful to implement a "catch-all"
handler.

Currently this is needed by Bluetooth dispatcher which needs to catch
all method calls to all objects and forward them to another D-Bus
service.

Bug:  862849 
Change-Id: I77b1cd924690a673c872b69a35120ee5bf223b0d
Reviewed-on: https://chromium-review.googlesource.com/1134605
Commit-Queue: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576565}
[modify] https://crrev.com/564474a84c85bec2c8079fdca40f8bf6d687cdff/dbus/bus.cc
[modify] https://crrev.com/564474a84c85bec2c8079fdca40f8bf6d687cdff/dbus/bus.h
[modify] https://crrev.com/564474a84c85bec2c8079fdca40f8bf6d687cdff/dbus/mock_bus.h

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 20

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/2b2a0e4cfe1ba32b2fa379fdfa546138f8d6ae00

commit 2b2a0e4cfe1ba32b2fa379fdfa546138f8d6ae00
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Fri Jul 20 03:12:57 2018

bluetooth: Added forwarded methods to org.bluez.AdvertisingManager1

BUG= chromium:862849 
TEST=Manual test with bluetoothctl:
     [bluetooth]# advertise on
     It should print "Advertising object registered"

Change-Id: I135ff59a2bc1278c28639012468f2d9021b30e5a
Reviewed-on: https://chromium-review.googlesource.com/1137699
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/2b2a0e4cfe1ba32b2fa379fdfa546138f8d6ae00/bluetooth/dispatcher/bluez_interface_handler.h
[modify] https://crrev.com/2b2a0e4cfe1ba32b2fa379fdfa546138f8d6ae00/bluetooth/dispatcher/bluez_interface_handler.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 24

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/5aa8c5fec0161fe9d49238ac815855cc6e56b52f

commit 5aa8c5fec0161fe9d49238ac815855cc6e56b52f
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue Jul 24 04:04:54 2018

libchrome: dbus: Add TryRegisterFallback

The TryRegisterFallback works just like TryRegisterObjectPath,
with addition that the registered callbacks also apply to the specified
object path and its sub paths. This is useful to implement a "catch-all"
handler.

Currently this is needed by Bluetooth dispatcher which needs to catch
all method calls to all objects and forward them to another D-Bus
service.

This is a cherry-pick of https://crrev.com/c/1134605.

BUG= chromium:862849 
TEST=None

Change-Id: Iebbce5cb3a11b2fce601498043c1dd6e5d56790f
Reviewed-on: https://chromium-review.googlesource.com/1144190
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[rename] https://crrev.com/5aa8c5fec0161fe9d49238ac815855cc6e56b52f/chromeos-base/libchrome/libchrome-395517-r34.ebuild
[add] https://crrev.com/5aa8c5fec0161fe9d49238ac815855cc6e56b52f/chromeos-base/libchrome/files/libchrome-395517-dbus-Add-TryRegisterFallback.patch
[modify] https://crrev.com/5aa8c5fec0161fe9d49238ac815855cc6e56b52f/chromeos-base/libchrome/libchrome-395517.ebuild

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/68b0bdb06e24f6d1cfdbdec538ff8186be9cf8f7

commit 68b0bdb06e24f6d1cfdbdec538ff8186be9cf8f7
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Sat Aug 04 08:59:47 2018

bluetooth: Fix client bookkeeping bug

D-Bus clients should be tracked globally by the dispatcher instead of
individual interfaces. Otherwise DispatcherClient will be created for
each interface, which is not what we want.

BUG= chromium:862849 
TEST=Unit test doesn't regress; Manual test with bluetoothctl to check
     that only 1 client is added with calls to 2 different interfaces:
     bluetoothctl --service=org.chromium.Bluetooth
     [bluetooth]# agent on
     [bluetooth]# scan on

Change-Id: I280f596b3d04b023dd8607e1446480ddb11d7d29
Reviewed-on: https://chromium-review.googlesource.com/1136853
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/68b0bdb06e24f6d1cfdbdec538ff8186be9cf8f7/bluetooth/dispatcher/impersonation_object_manager_interface.h
[modify] https://crrev.com/68b0bdb06e24f6d1cfdbdec538ff8186be9cf8f7/bluetooth/dispatcher/dispatcher.h
[add] https://crrev.com/68b0bdb06e24f6d1cfdbdec538ff8186be9cf8f7/bluetooth/dispatcher/client_manager.cc
[modify] https://crrev.com/68b0bdb06e24f6d1cfdbdec538ff8186be9cf8f7/bluetooth/dispatcher/impersonation_object_manager_interface_unittest.cc
[modify] https://crrev.com/68b0bdb06e24f6d1cfdbdec538ff8186be9cf8f7/bluetooth/bluetooth.gyp
[modify] https://crrev.com/68b0bdb06e24f6d1cfdbdec538ff8186be9cf8f7/bluetooth/dispatcher/dispatcher.cc
[add] https://crrev.com/68b0bdb06e24f6d1cfdbdec538ff8186be9cf8f7/bluetooth/dispatcher/client_manager.h
[modify] https://crrev.com/68b0bdb06e24f6d1cfdbdec538ff8186be9cf8f7/bluetooth/dispatcher/impersonation_object_manager_interface.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/74e9200ecf3ac8bb49cb6ad226dd1e518123943e

commit 74e9200ecf3ac8bb49cb6ad226dd1e518123943e
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue Aug 07 08:51:17 2018

bluetooth: Refactor method call forwarding to a helper class

Method forwarding behavior will be reused for upward forwarding, so it's
moved to a helper class to be reusable.

BUG= chromium:862849 
TEST=Unit test doesn't regress, manual test doesn't regress
CQ-DEPEND=CL:1136853

Change-Id: Ie26a094a520ff98e7c33556753b313eca49a65f3
Reviewed-on: https://chromium-review.googlesource.com/1137436
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[add] https://crrev.com/74e9200ecf3ac8bb49cb6ad226dd1e518123943e/bluetooth/dispatcher/dbus_util.h
[add] https://crrev.com/74e9200ecf3ac8bb49cb6ad226dd1e518123943e/bluetooth/dispatcher/test_helper.cc
[modify] https://crrev.com/74e9200ecf3ac8bb49cb6ad226dd1e518123943e/bluetooth/dispatcher/impersonation_object_manager_interface_unittest.cc
[modify] https://crrev.com/74e9200ecf3ac8bb49cb6ad226dd1e518123943e/bluetooth/bluetooth.gyp
[add] https://crrev.com/74e9200ecf3ac8bb49cb6ad226dd1e518123943e/bluetooth/dispatcher/dbus_util.cc
[add] https://crrev.com/74e9200ecf3ac8bb49cb6ad226dd1e518123943e/bluetooth/dispatcher/test_helper.h
[modify] https://crrev.com/74e9200ecf3ac8bb49cb6ad226dd1e518123943e/bluetooth/dispatcher/impersonation_object_manager_interface.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Aug 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/7b9d5592318293bcc029f2b7f1e1b7b8ac9401f5

commit 7b9d5592318293bcc029f2b7f1e1b7b8ac9401f5
Author: Miao-chen Chou <mcchou@chromium.org>
Date: Tue Aug 07 08:51:01 2018

bluetooth: Export and update device properties during scanning

This adds a generic Property class to track the update status of
interface properties.
A newly-discovered device will have its mandatory fields exported and
its optional fields updated if provided in EIR. An existing device will
have fields updated if fields are provided in EIR or there is any change
on its internal status, such as paired.

BUG= chromium:862849 
TEST=(1) run FEATURES=test emerge-$BOARD bluetooth and verify that all
         unit tests pass
     (2) run newblued manually with
         restart bluetoothd && minijail0 -u bluetooth -- /usr/bin/newblued
         and verify the bluetooth properties with
         bluetoothctl --service=org.chromium.Newblue
         # info <remote device address>

Change-Id: I67459a66788227c43e3c3ab12119e457b635e8a3
Reviewed-on: https://chromium-review.googlesource.com/1152530
Commit-Ready: Miao-chen Chou <mcchou@chromium.org>
Tested-by: Miao-chen Chou <mcchou@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Qiyu Hu <qiyuh@google.com>

[add] https://crrev.com/7b9d5592318293bcc029f2b7f1e1b7b8ac9401f5/bluetooth/newblued/property_unittest.cc
[modify] https://crrev.com/7b9d5592318293bcc029f2b7f1e1b7b8ac9401f5/bluetooth/newblued/newblue_unittest.cc
[modify] https://crrev.com/7b9d5592318293bcc029f2b7f1e1b7b8ac9401f5/bluetooth/newblued/newblue.cc
[modify] https://crrev.com/7b9d5592318293bcc029f2b7f1e1b7b8ac9401f5/bluetooth/newblued/newblue.h
[modify] https://crrev.com/7b9d5592318293bcc029f2b7f1e1b7b8ac9401f5/bluetooth/newblued/newblue_daemon.h
[modify] https://crrev.com/7b9d5592318293bcc029f2b7f1e1b7b8ac9401f5/bluetooth/bluetooth.gyp
[modify] https://crrev.com/7b9d5592318293bcc029f2b7f1e1b7b8ac9401f5/bluetooth/newblued/uuid.cc
[modify] https://crrev.com/7b9d5592318293bcc029f2b7f1e1b7b8ac9401f5/bluetooth/newblued/newblue_daemon.cc
[add] https://crrev.com/7b9d5592318293bcc029f2b7f1e1b7b8ac9401f5/bluetooth/newblued/property.h
[modify] https://crrev.com/7b9d5592318293bcc029f2b7f1e1b7b8ac9401f5/bluetooth/newblued/uuid.h

Project Member

Comment 9 by bugdroid1@chromium.org, Aug 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/527aa753bef4ce181dc46677d121e07b12b58c98

commit 527aa753bef4ce181dc46677d121e07b12b58c98
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed Aug 08 20:45:45 2018

bluetooth: Add upward forwarding

"Upward forwarding" means that Dispatcher forwards any incoming method
calls from BlueZ/NewBlue to clients. This corresponds to
http://go/bluez-split-stack-phase-1 (Work 4).

BUG= chromium:862849 
TEST=Added unit test CatchAllForwarderTest, did manual test with Agent
and Advertising API.

Change-Id: Idc84176c9bc5544feda3aaf62b1e24be28c84e83
Reviewed-on: https://chromium-review.googlesource.com/1139589
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[add] https://crrev.com/527aa753bef4ce181dc46677d121e07b12b58c98/bluetooth/dispatcher/catch_all_forwarder.cc
[modify] https://crrev.com/527aa753bef4ce181dc46677d121e07b12b58c98/bluetooth/dispatcher/client_manager.cc
[modify] https://crrev.com/527aa753bef4ce181dc46677d121e07b12b58c98/bluetooth/bluetooth.gyp
[modify] https://crrev.com/527aa753bef4ce181dc46677d121e07b12b58c98/bluetooth/dispatcher/dispatcher_client.h
[add] https://crrev.com/527aa753bef4ce181dc46677d121e07b12b58c98/bluetooth/dispatcher/catch_all_forwarder.h
[modify] https://crrev.com/527aa753bef4ce181dc46677d121e07b12b58c98/bluetooth/dispatcher/dispatcher_client.cc
[add] https://crrev.com/527aa753bef4ce181dc46677d121e07b12b58c98/bluetooth/dispatcher/catch_all_forwarder_unittest.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Aug 22

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/b50791b0dede1062c77f60601c1f32f1daeaacdb

commit b50791b0dede1062c77f60601c1f32f1daeaacdb
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed Aug 22 02:27:50 2018

bluetooth: Added org.bluez.ProfileManager1 interface to dispatcher

This is needed to keep chrome.bluetoothSocket working. The added methods
are based on BlueZ's doc/profile-api.txt.

BUG= chromium:862849 
TEST=Configure Chrome to use btdispatch, run a robot app, check that the
program can send data to robot successfully.

Change-Id: I8833539aa4b0e46bd44d14ab924ce1c1d241836b
Reviewed-on: https://chromium-review.googlesource.com/1168190
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/b50791b0dede1062c77f60601c1f32f1daeaacdb/bluetooth/dispatcher/dispatcher.cc
[modify] https://crrev.com/b50791b0dede1062c77f60601c1f32f1daeaacdb/bluetooth/dispatcher/bluez_interface_handler.h
[modify] https://crrev.com/b50791b0dede1062c77f60601c1f32f1daeaacdb/bluetooth/dispatcher/dispatcher_unittest.cc
[modify] https://crrev.com/b50791b0dede1062c77f60601c1f32f1daeaacdb/bluetooth/dispatcher/bluez_interface_handler.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Aug 22

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/newblue/+/2495a5a717c306cad1bcaf2ba51e62c229c46b18

commit 2495a5a717c306cad1bcaf2ba51e62c229c46b18
Author: Miao-chen Chou <mcchou@chromium.org>
Date: Wed Aug 22 21:56:56 2018

sm: update IO capability based on the presence of passkey request/display observers

The IO capability should be updated based on whether there are handlers
for passkey display and passkey request. If there is any ongoing pairing
when a client register itself as the observer, the IO capability will be
updated once the current pairing session is done.

BUG= chromium:862849 
TEST=Run the test program on veyron_minnie with "restart bluetoothd &&
     new_blue_test pair <the target LE keyboard address>" and enter passkey on
     the target LE keyboard

Change-Id: I0eb38d49d5b317f0ba184910741af93f3c102b1e

[modify] https://crrev.com/2495a5a717c306cad1bcaf2ba51e62c229c46b18/sm.c
[modify] https://crrev.com/2495a5a717c306cad1bcaf2ba51e62c229c46b18/sm.h
[modify] https://crrev.com/2495a5a717c306cad1bcaf2ba51e62c229c46b18/test.c

Status: Fixed (was: Assigned)
Project Member

Comment 13 by bugdroid1@chromium.org, Aug 22

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/newblue/+/bf00edb48aac104b2cfecf878acd6f3ef18c4b45

commit bf00edb48aac104b2cfecf878acd6f3ef18c4b45
Author: Miao-chen Chou <mcchou@chromium.org>
Date: Wed Aug 22 23:40:19 2018

Revert "sm: update IO capability based on the presence of passkey request/display observers"

This reverts commit 2495a5a717c306cad1bcaf2ba51e62c229c46b18.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> sm: update IO capability based on the presence of passkey request/display observers
> 
> The IO capability should be updated based on whether there are handlers
> for passkey display and passkey request. If there is any ongoing pairing
> when a client register itself as the observer, the IO capability will be
> updated once the current pairing session is done.
> 
> BUG= chromium:862849 
> TEST=Run the test program on veyron_minnie with "restart bluetoothd &&
>      new_blue_test pair <the target LE keyboard address>" and enter passkey on
>      the target LE keyboard
> 
> Change-Id: I0eb38d49d5b317f0ba184910741af93f3c102b1e

Bug:  chromium:862849 
Change-Id: I0408307e5f8c6d3175fa06a1617bafb7afc7ebc8

[modify] https://crrev.com/bf00edb48aac104b2cfecf878acd6f3ef18c4b45/sm.c
[modify] https://crrev.com/bf00edb48aac104b2cfecf878acd6f3ef18c4b45/sm.h
[modify] https://crrev.com/bf00edb48aac104b2cfecf878acd6f3ef18c4b45/test.c

Project Member

Comment 14 by bugdroid1@chromium.org, Aug 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/b0029265c42d4d70858410fa66a13627d5ea0ba7

commit b0029265c42d4d70858410fa66a13627d5ea0ba7
Author: Miao-chen Chou <mcchou@chromium.org>
Date: Fri Aug 31 07:28:01 2018

bluetooth: Plumb the pairing state changed event

This makes use of security manager API to register Newblue as the
central pairing observer who is in charge of managing and notifying the
clients. A client need to register itself as the secondary pairing observer
in order to receive the pairing state changed event. As a secondary,
Newblued will received device information along with D-Bus error if any.
There can be multiple secondary pairing observers if, but for now
Newblued is the only client.

This also adds a unit test for pairing state changed events and a unit test
for UniqueID.

BUG= chromium:862849 
TEST=run FEATURES=test emerge-$BOARD bluetooth and verify that all unit
     tests pass

Change-Id: I6c1dd09027a90989a0a3d23bf4b1765e951aca63
Reviewed-on: https://chromium-review.googlesource.com/1171211
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Sonny Sasaka <sonnysasaka@chromium.org>

[modify] https://crrev.com/b0029265c42d4d70858410fa66a13627d5ea0ba7/bluetooth/newblued/libnewblue.h
[modify] https://crrev.com/b0029265c42d4d70858410fa66a13627d5ea0ba7/bluetooth/newblued/util.cc
[modify] https://crrev.com/b0029265c42d4d70858410fa66a13627d5ea0ba7/bluetooth/newblued/newblue_unittest.cc
[modify] https://crrev.com/b0029265c42d4d70858410fa66a13627d5ea0ba7/bluetooth/newblued/newblue.cc
[modify] https://crrev.com/b0029265c42d4d70858410fa66a13627d5ea0ba7/bluetooth/newblued/newblue.h
[modify] https://crrev.com/b0029265c42d4d70858410fa66a13627d5ea0ba7/bluetooth/newblued/util.h
[modify] https://crrev.com/b0029265c42d4d70858410fa66a13627d5ea0ba7/bluetooth/newblued/newblue_daemon.h
[modify] https://crrev.com/b0029265c42d4d70858410fa66a13627d5ea0ba7/bluetooth/newblued/mock_libnewblue.h
[modify] https://crrev.com/b0029265c42d4d70858410fa66a13627d5ea0ba7/bluetooth/newblued/newblue_daemon.cc
[modify] https://crrev.com/b0029265c42d4d70858410fa66a13627d5ea0ba7/bluetooth/newblued/util_unittest.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Sep 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/newblue/+/26a590ae6bf01f25a336da849dde93ed005c0169

commit 26a590ae6bf01f25a336da849dde93ed005c0169
Author: Miao-chen Chou <mcchou@chromium.org>
Date: Sat Sep 08 23:51:55 2018

Reland "sm: update IO capability based on the presence of passkey request/display observers"

This is a reland of 2495a5a717c306cad1bcaf2ba51e62c229c46b18

Original change's description:
> sm: update IO capability based on the presence of passkey request/display observers
>
> The IO capability should be updated based on whether there are handlers
> for passkey display and passkey request. If there is any ongoing pairing
> when a client register itself as the observer, the IO capability will be
> updated once the current pairing session is done.
>
> BUG= chromium:862849 
> TEST=Run the test program on veyron_minnie with "restart bluetoothd &&
>      new_blue_test pair <the target LE keyboard address>" and enter passkey on
>      the target LE keyboard
>
> Change-Id: I0eb38d49d5b317f0ba184910741af93f3c102b1e

BUG=chromium:863613
TEST=See above
CQ-DEPEND=CL:1186082

Change-Id: I3a208a987c003e64a24003c31827805238d70e44
Reviewed-on: https://chromium-review.googlesource.com/1186042
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/26a590ae6bf01f25a336da849dde93ed005c0169/sm.c
[modify] https://crrev.com/26a590ae6bf01f25a336da849dde93ed005c0169/sm.h
[modify] https://crrev.com/26a590ae6bf01f25a336da849dde93ed005c0169/test.c

Status: Verified (was: Fixed)
Project Member

Comment 17 by bugdroid1@chromium.org, Nov 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/24b6ee4f34195b196eef1ec8002ada54852dc3cc

commit 24b6ee4f34195b196eef1ec8002ada54852dc3cc
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed Nov 28 03:13:42 2018

bluetooth: Fix D-Bus callback handling in client down detection

The event from D-Bus library happens in D-Bus thread, not in the
libchrome's main loop. We should invoke the callback in the main loop
instead of invoking it directly in D-Bus thread to avoid potential race
conditions.

BUG= chromium:862849 
TEST=Modified unit test in DispatcherClientTest

Change-Id: Ib9aeb9b5bdd22f35422e6af7c998e06493b938e8
Reviewed-on: https://chromium-review.googlesource.com/1328242
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Sonny Sasaka <sonnysasaka@chromium.org>

[modify] https://crrev.com/24b6ee4f34195b196eef1ec8002ada54852dc3cc/bluetooth/dispatcher/dispatcher_client.cc
[modify] https://crrev.com/24b6ee4f34195b196eef1ec8002ada54852dc3cc/bluetooth/dispatcher/dispatcher_client_unittest.cc

Project Member

Comment 18 by bugdroid1@chromium.org, Dec 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/1288cc3dd1a73ea09ade8b9ae81763e103a61c02

commit 1288cc3dd1a73ea09ade8b9ae81763e103a61c02
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed Dec 05 09:13:30 2018

bluetooth: rename btdispatch_test to bluetooth_test

The tests cover btdispatch, newblued, and also the common library.
Before it gets confusing too far, let's rename it.

BUG= chromium:862849 
TEST=Tests still run
CQ-DEPEND=CL:1362404

Change-Id: I94e77dec60cdb8f5d24f882811aa78c6e9984ee6
Reviewed-on: https://chromium-review.googlesource.com/1332888
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/1288cc3dd1a73ea09ade8b9ae81763e103a61c02/bluetooth/BUILD.gn

Project Member

Comment 19 by bugdroid1@chromium.org, Dec 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/726de4a0664bd6f89a3e27ec7ea2192851e13f0e

commit 726de4a0664bd6f89a3e27ec7ea2192851e13f0e
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed Dec 05 09:13:29 2018

bluetooth: rename btdispatch_test to bluetooth_test

The tests cover btdispatch, newblued, and also the common library.
Before it gets confusing too far, let's rename it.

BUG= chromium:862849 
TEST=Tests still run
CQ-DEPEND=CL:1332888

Change-Id: Iccbf0cfd3e2570e1fc832cf8f776c8d7b309c491
Reviewed-on: https://chromium-review.googlesource.com/1362404
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/726de4a0664bd6f89a3e27ec7ea2192851e13f0e/chromeos-base/bluetooth/bluetooth-9999.ebuild

Project Member

Comment 20 by bugdroid1@chromium.org, Dec 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/922305dce67d1f29491bf064d01f81767c7ab15d

commit 922305dce67d1f29491bf064d01f81767c7ab15d
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed Dec 19 05:33:33 2018

bluetooth: Refactor DispatcherClient into 2 classes

This refactors DispatcherClient's client tracking function into its own
class to be reusable by future newblued.

BUG= chromium:862849 
TEST=Added unit test, current unit test doesn't regress.

Change-Id: Ib473addb9ed20b47cde822190e97047f9ac5a3cb
Reviewed-on: https://chromium-review.googlesource.com/1330044
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/922305dce67d1f29491bf064d01f81767c7ab15d/bluetooth/BUILD.gn
[add] https://crrev.com/922305dce67d1f29491bf064d01f81767c7ab15d/bluetooth/common/dbus_client_test.cc
[modify] https://crrev.com/922305dce67d1f29491bf064d01f81767c7ab15d/bluetooth/dispatcher/client_manager.cc
[modify] https://crrev.com/922305dce67d1f29491bf064d01f81767c7ab15d/bluetooth/dispatcher/dispatcher_client.h
[add] https://crrev.com/922305dce67d1f29491bf064d01f81767c7ab15d/bluetooth/common/dbus_client.cc
[modify] https://crrev.com/922305dce67d1f29491bf064d01f81767c7ab15d/bluetooth/dispatcher/dispatcher_client.cc
[add] https://crrev.com/922305dce67d1f29491bf064d01f81767c7ab15d/bluetooth/common/dbus_client.h
[modify] https://crrev.com/922305dce67d1f29491bf064d01f81767c7ab15d/bluetooth/dispatcher/dispatcher_client_unittest.cc

Project Member

Comment 21 by bugdroid1@chromium.org, Dec 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/9db00e30d69b35c811e9d167af7933def48425d9

commit 9db00e30d69b35c811e9d167af7933def48425d9
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed Dec 19 09:12:53 2018

bluetooth: Support multi-client discovery

This mimics BlueZ behavior in which each client can have its own
discovery session. This also involves detecting when a client has
disconnected from D-Bus daemon, which will automatically stop its
discovery session.

BUG= chromium:862849 
TEST=Added unit test

Change-Id: I7cc020e4c50a86aea401eedc1aff4daf7718b4e6
Reviewed-on: https://chromium-review.googlesource.com/1330125
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/9db00e30d69b35c811e9d167af7933def48425d9/system_api/dbus/service_constants.h
[modify] https://crrev.com/9db00e30d69b35c811e9d167af7933def48425d9/bluetooth/newblued/adapter_interface_handler.cc
[modify] https://crrev.com/9db00e30d69b35c811e9d167af7933def48425d9/bluetooth/newblued/adapter_interface_handler.h
[modify] https://crrev.com/9db00e30d69b35c811e9d167af7933def48425d9/bluetooth/newblued/newblue_daemon_unittest.cc

Project Member

Comment 22 by bugdroid1@chromium.org, Dec 24

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/9c3f11d4c3c71de93be4db5079761043711dec0c

commit 9c3f11d4c3c71de93be4db5079761043711dec0c
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Mon Dec 24 03:19:25 2018

bluetooth: Always log D-Bus address mapping for dispatcher clients

Having a dispatcher as a proxy between Chrome and BlueZ may make it hard
to debug D-Bus message traffic. Therefore it's useful to always log the
address mapping to help debugging. The only case this will be printed is
when Chrome is restarted so it won't spam the log.

BUG= chromium:862849 
TEST=Manually observe /var/log/messages

Change-Id: Ic63b828392efaaec9fdc2ccb8bf3a2f7fd055e9f
Reviewed-on: https://chromium-review.googlesource.com/1384747
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/9c3f11d4c3c71de93be4db5079761043711dec0c/bluetooth/dispatcher/dispatcher_client.cc

Sign in to add a comment