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

Issue 840517 link

Starred by 2 users

Issue metadata

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

Blocked on:
issue 844266



Sign in to add a comment

Implement D-Bus interface for newblue's scanning API

Project Member Reported by sonnysasaka@chromium.org, May 7 2018

Issue description

newblued to implement BlueZ-compatible D-Bus interface for scanning: StartDiscovery and StopDiscovery. This needs exposing objects on org.bluez.Adapter1 and org.bluez.Device1 interfaces.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/system_api/+/57aea396912a6a2a6482383457bc2a734197e91a

commit 57aea396912a6a2a6482383457bc2a734197e91a
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed May 09 08:11:07 2018

bluetooth: Add constants for NewBlue

This adds constants for the D-Bus address of newblued (corresponds to
Process_NewBlue Service in go/bluez-stack-split Phase 3).

BUG=chromium:840517
TEST=build chromeos-base/bluetooth

Change-Id: I3082db2aa100a04087044e267ba3175cd4293d5c
Reviewed-on: https://chromium-review.googlesource.com/1048312
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/57aea396912a6a2a6482383457bc2a734197e91a/dbus/service_constants.h

Project Member

Comment 2 by bugdroid1@chromium.org, May 14 2018

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

commit fd7055b1189cf95c6f30c16f9d75bd7da3bde231
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Mon May 14 22:33:07 2018

Make newblue installable as a shared library

BUG=chromium:840517
TEST=emerge-$(BOARD) newblue
echo '#include <newblue/hci.h> void foo() {persistLoad();}' | \
cc -c --sysroot=/build/$BOARD -lnewblue

Change-Id: Ib1b3f0d3d595ff79676166a77d70ef8e1c529355
Reviewed-on: https://chromium-review.googlesource.com/1053553
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Dmitry Grinberg <dmitrygr@google.com>

[modify] https://crrev.com/fd7055b1189cf95c6f30c16f9d75bd7da3bde231/hci_plugin/Makefile
[modify] https://crrev.com/fd7055b1189cf95c6f30c16f9d75bd7da3bde231/Makefile
[modify] https://crrev.com/fd7055b1189cf95c6f30c16f9d75bd7da3bde231/.gitignore

Project Member

Comment 3 by bugdroid1@chromium.org, May 15 2018

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

commit 36d90c720d0ef5229d5538d7225091bdda6cf688
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Mon May 14 23:59:40 2018

Fix: C++11 requires a space between literal and identifier.

Needed to be used as library header for C++ newblued.

BUG=chromium:840517
TEST=compile with c++-11

Change-Id: I263b1d28fe6fa409493acbd48ff42f92b35176af

[modify] https://crrev.com/36d90c720d0ef5229d5538d7225091bdda6cf688/hci.h

Project Member

Comment 4 by bugdroid1@chromium.org, May 17 2018

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

commit 1d17ab7c14afe0f816187467563e07dd74d9ebd1
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Thu May 17 10:24:25 2018

Add pkgconfig file

This is needed for platform2/bluetooth to know how to link against
libnewblue.

BUG=chromium:840517
TEST=Install with ebuild

Change-Id: Iadcf9493f094afb5cb07d26e2f21e3b5f9a0754e
Reviewed-on: https://chromium-review.googlesource.com/1062765
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Dmitry Grinberg <dmitrygr@google.com>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[add] https://crrev.com/1d17ab7c14afe0f816187467563e07dd74d9ebd1/newblue.pc

Comment 5 by mcchou@chromium.org, May 18 2018

Blockedon: 844266
Project Member

Comment 6 by bugdroid1@chromium.org, May 18 2018

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

commit 42bf3e1036e6b378ae819caa897dbbca37a49761
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Fri May 18 05:21:08 2018

bluetooth: Add newblued initial commit

This adds the newblued binary skeleton (no logic is there yet).

BUG=chromium:840517
TEST=build chromeos-base/bluetooth, deploy, and check that newblued runs
CQ-DEPEND=CL:1048312

Change-Id: I66f66697f6306a55e1ac86b81b41d606e48a9ff4
Reviewed-on: https://chromium-review.googlesource.com/1048134
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/42bf3e1036e6b378ae819caa897dbbca37a49761/bluetooth/newblued/dbus_daemon.h
[add] https://crrev.com/42bf3e1036e6b378ae819caa897dbbca37a49761/bluetooth/dbus/org.chromium.Newblue.conf
[add] https://crrev.com/42bf3e1036e6b378ae819caa897dbbca37a49761/bluetooth/newblued/main.cc
[add] https://crrev.com/42bf3e1036e6b378ae819caa897dbbca37a49761/bluetooth/seccomp_filters/newblued-seccomp-amd64.policy
[add] https://crrev.com/42bf3e1036e6b378ae819caa897dbbca37a49761/bluetooth/init/upstart/newblued.conf
[add] https://crrev.com/42bf3e1036e6b378ae819caa897dbbca37a49761/bluetooth/newblued/newblue_daemon.h
[modify] https://crrev.com/42bf3e1036e6b378ae819caa897dbbca37a49761/bluetooth/bluetooth.gyp
[add] https://crrev.com/42bf3e1036e6b378ae819caa897dbbca37a49761/bluetooth/seccomp_filters/newblued-seccomp-arm.policy
[add] https://crrev.com/42bf3e1036e6b378ae819caa897dbbca37a49761/bluetooth/newblued/bluetooth_daemon.h
[add] https://crrev.com/42bf3e1036e6b378ae819caa897dbbca37a49761/bluetooth/newblued/newblue_daemon.cc
[add] https://crrev.com/42bf3e1036e6b378ae819caa897dbbca37a49761/bluetooth/newblued/dbus_daemon.cc

Project Member

Comment 7 by bugdroid1@chromium.org, May 21 2018

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

commit 194ae21225b1959dc92bb345e71fc96289cd290d
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Fri May 18 23:12:26 2018

Link libnewblue against libdl.

BUG=chromium:840517
TEST=libnewblue.so shouldn't complain about dlopen

Change-Id: Ice8acb872ce79f1c4c1631ac05da942c441a8577

[modify] https://crrev.com/194ae21225b1959dc92bb345e71fc96289cd290d/hci_plugin/Makefile
[modify] https://crrev.com/194ae21225b1959dc92bb345e71fc96289cd290d/Makefile

Project Member

Comment 8 by bugdroid1@chromium.org, May 21 2018

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

commit 57a4a9133dd2b5ecc87eeb2c2519de33c71005b1
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Mon May 21 18:21:13 2018

Add callback to hciUp

Upper layer needs to know when the LE stack is ready to be brought up.
This adds a callback parameter to hciUp().

BUG=chromium:840517
TEST=test.c

Change-Id: I19b5934ff22594ad055a11bfde233786515446c1

[modify] https://crrev.com/57a4a9133dd2b5ecc87eeb2c2519de33c71005b1/test.c
[modify] https://crrev.com/57a4a9133dd2b5ecc87eeb2c2519de33c71005b1/hci.c
[modify] https://crrev.com/57a4a9133dd2b5ecc87eeb2c2519de33c71005b1/hci.h

Project Member

Comment 9 by bugdroid1@chromium.org, May 22 2018

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

commit 9fb1e24496763e59718ed2855220d8f1be9ba7e3
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue May 22 07:21:37 2018

bluetooth: Add newblued installation in ebuild

BUG=chromium:840517
TEST=emerge-$(BOARD) bluetooth; cros deploy $DUT bluetooth
CQ-DEPEND=CL:1048134

Change-Id: I76c01548f531bb74d5e8a0e85d43f961267678bc
Reviewed-on: https://chromium-review.googlesource.com/1048136
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/9fb1e24496763e59718ed2855220d8f1be9ba7e3/chromeos-base/bluetooth/bluetooth-9999.ebuild

Project Member

Comment 10 by bugdroid1@chromium.org, May 22 2018

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

commit bcbad88c6d02589b925c2cb0dddf77a3a4194200
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue May 22 07:21:29 2018

bluetooth: Move common components from newblued/ and dispatcher/ to common/

newblued will need to reuse common components from dispatcher, so the
common components are better organized in its own directory.

BUG=chromium:840517
TEST=build and unit test

Change-Id: If198e55ebdac77466fba13b66b943b04517b0e3c
Reviewed-on: https://chromium-review.googlesource.com/1050444
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/bcbad88c6d02589b925c2cb0dddf77a3a4194200/bluetooth/dispatcher/impersonation_object_manager_interface.h
[modify] https://crrev.com/bcbad88c6d02589b925c2cb0dddf77a3a4194200/bluetooth/newblued/main.cc
[rename] https://crrev.com/bcbad88c6d02589b925c2cb0dddf77a3a4194200/bluetooth/common/property.cc
[rename] https://crrev.com/bcbad88c6d02589b925c2cb0dddf77a3a4194200/bluetooth/common/property_unittest.cc
[rename] https://crrev.com/bcbad88c6d02589b925c2cb0dddf77a3a4194200/bluetooth/common/exported_object_manager_wrapper_unittest.cc
[modify] https://crrev.com/bcbad88c6d02589b925c2cb0dddf77a3a4194200/bluetooth/newblued/newblue_daemon.h
[rename] https://crrev.com/bcbad88c6d02589b925c2cb0dddf77a3a4194200/bluetooth/common/dbus_daemon.cc
[rename] https://crrev.com/bcbad88c6d02589b925c2cb0dddf77a3a4194200/bluetooth/common/exported_object_manager_wrapper.h
[rename] https://crrev.com/bcbad88c6d02589b925c2cb0dddf77a3a4194200/bluetooth/common/property.h
[modify] https://crrev.com/bcbad88c6d02589b925c2cb0dddf77a3a4194200/bluetooth/bluetooth.gyp
[rename] https://crrev.com/bcbad88c6d02589b925c2cb0dddf77a3a4194200/bluetooth/common/dbus_daemon.h
[rename] https://crrev.com/bcbad88c6d02589b925c2cb0dddf77a3a4194200/bluetooth/common/bluetooth_daemon.h
[rename] https://crrev.com/bcbad88c6d02589b925c2cb0dddf77a3a4194200/bluetooth/common/exported_object_manager_wrapper.cc

Project Member

Comment 11 by bugdroid1@chromium.org, May 24 2018

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

commit 613cd1ec6e1117ada3d16f42f3555c53b51a36c6
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Thu May 24 22:44:39 2018

bluetooth: Add dummy adapter interface to newblued.

Expose a fake adapter object "/org/bluez/hci0". The only property that
needs to exist is "Powered" with any fake value. This property won't be
able to actually turn on/off the adapter, but only for interface
compatibility with clients so that clients can recognize the presence of
a Bluetooth adapter.

BUG=chromium:840517
TEST=unit test and manual test with the command:
dbus-send --system --print-reply --dest=org.chromium.Newblue \
/ org.freedesktop.DBus.ObjectManager.GetManagedObjects

Change-Id: I1329e54d5abf736122f0bd6295f84f6381c25034
Reviewed-on: https://chromium-review.googlesource.com/1050620
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>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[add] https://crrev.com/613cd1ec6e1117ada3d16f42f3555c53b51a36c6/bluetooth/newblued/newblue.h
[modify] https://crrev.com/613cd1ec6e1117ada3d16f42f3555c53b51a36c6/bluetooth/newblued/newblue_daemon.h
[modify] https://crrev.com/613cd1ec6e1117ada3d16f42f3555c53b51a36c6/bluetooth/common/dbus_daemon.cc
[modify] https://crrev.com/613cd1ec6e1117ada3d16f42f3555c53b51a36c6/bluetooth/common/exported_object_manager_wrapper.h
[modify] https://crrev.com/613cd1ec6e1117ada3d16f42f3555c53b51a36c6/bluetooth/bluetooth.gyp
[modify] https://crrev.com/613cd1ec6e1117ada3d16f42f3555c53b51a36c6/bluetooth/newblued/newblue_daemon.cc
[modify] https://crrev.com/613cd1ec6e1117ada3d16f42f3555c53b51a36c6/bluetooth/common/bluetooth_daemon.h
[add] https://crrev.com/613cd1ec6e1117ada3d16f42f3555c53b51a36c6/bluetooth/newblued/newblue_daemon_unittest.cc

Project Member

Comment 12 by bugdroid1@chromium.org, May 31 2018

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

commit 4290a34c97879f4ee2cf7cf401b08f68f8a5370c
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Thu May 31 10:50:16 2018

newblue: add ebuild newblue

This creates the ebuild for newblue, and the changes includes
- C library installation
- integrate unit test run
Note that new_blue_test executable does not get installed where it needs
to be copy over to the DUT for now.

This is needed by platform2/bluetooth for newblue integration. The original
version can be found at dmitrygr's http://crosreview.com/776054.

BUG=chromium:840517
TEST=run emerge-$BOARD newblue and verify the build
     run FEATURES="test" emerge-$BOARD newblue and verify the unit test run
     run cros deploy DUT newblue and verify the installation
CQ-DEPEND=CL:1053553,CL:1064979

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

[add] https://crrev.com/4290a34c97879f4ee2cf7cf401b08f68f8a5370c/chromeos-base/newblue/newblue-9999.ebuild

Project Member

Comment 13 by bugdroid1@chromium.org, May 31 2018

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

commit dd5181a5da6a8d3826262166bb1ee30e8a5982f0
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Thu May 31 23:22:49 2018

bluetooth: Use bluetooth::DBusDaemon for dispatcher.

Use bluetooth::DBusDaemon for the Dispatcher daemon to avoid D-Bus
boilerplate.

BUG=chromium:840517
TEST=unit test still passes: FEATURES=test emerge-$BOARD bluetooth

Change-Id: Ibfad26338c7d3ba8281874164e6f2d0630659fba
Reviewed-on: https://chromium-review.googlesource.com/1066393
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>

[modify] https://crrev.com/dd5181a5da6a8d3826262166bb1ee30e8a5982f0/bluetooth/dispatcher/main.cc
[rename] https://crrev.com/dd5181a5da6a8d3826262166bb1ee30e8a5982f0/bluetooth/dispatcher/dispatcher_daemon.h
[modify] https://crrev.com/dd5181a5da6a8d3826262166bb1ee30e8a5982f0/bluetooth/dispatcher/dispatcher.h
[modify] https://crrev.com/dd5181a5da6a8d3826262166bb1ee30e8a5982f0/bluetooth/bluetooth.gyp
[add] https://crrev.com/dd5181a5da6a8d3826262166bb1ee30e8a5982f0/bluetooth/dispatcher/dispatcher_daemon.cc
[modify] https://crrev.com/dd5181a5da6a8d3826262166bb1ee30e8a5982f0/bluetooth/dispatcher/dispatcher.cc
[delete] https://crrev.com/08d8a20a8e591fbd8bfc28bdd53f2ae3cc4847d4/bluetooth/dispatcher/daemon.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Jun 5 2018

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

commit 48ef14a8b36b02f6fbdfd826da883c74b76b0d93
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue Jun 05 00:23:47 2018

bluetooth: Tidy up comments

Consistently use:
* Imperative verb form for describing what a piece of code does inside a method.
  (e.g. Do this thing and that)
* Declarative verb form for describing what a method does.
  (e.g. Does this thing and that)

Also added small method reordering to match .h and .cc

BUG=chromium:840517
TEST=None

Change-Id: Ia11f8e0926d219dd7e98d287fa91509f02ae35f5
Reviewed-on: https://chromium-review.googlesource.com/1080150
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/48ef14a8b36b02f6fbdfd826da883c74b76b0d93/bluetooth/common/exported_object_manager_wrapper_unittest.cc
[modify] https://crrev.com/48ef14a8b36b02f6fbdfd826da883c74b76b0d93/bluetooth/dispatcher/dispatcher_unittest.cc
[modify] https://crrev.com/48ef14a8b36b02f6fbdfd826da883c74b76b0d93/bluetooth/dispatcher/impersonation_object_manager_interface_unittest.cc
[modify] https://crrev.com/48ef14a8b36b02f6fbdfd826da883c74b76b0d93/bluetooth/dispatcher/suspend_manager_unittest.cc
[modify] https://crrev.com/48ef14a8b36b02f6fbdfd826da883c74b76b0d93/bluetooth/dispatcher/dispatcher.cc
[modify] https://crrev.com/48ef14a8b36b02f6fbdfd826da883c74b76b0d93/bluetooth/newblued/newblue_daemon.cc
[modify] https://crrev.com/48ef14a8b36b02f6fbdfd826da883c74b76b0d93/bluetooth/dispatcher/object_manager_interface_multiplexer_unittest.cc
[modify] https://crrev.com/48ef14a8b36b02f6fbdfd826da883c74b76b0d93/bluetooth/dispatcher/dispatcher_client.cc
[modify] https://crrev.com/48ef14a8b36b02f6fbdfd826da883c74b76b0d93/bluetooth/dispatcher/suspend_manager.cc
[modify] https://crrev.com/48ef14a8b36b02f6fbdfd826da883c74b76b0d93/bluetooth/dispatcher/impersonation_object_manager_interface.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Jun 5 2018

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

commit 59474b299fe59bd47636b98eff3fb6071a578970
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue Jun 05 05:15:32 2018

newblue: Add udev rules

The /dev/hci_le splitter needs to be accessible by user and group
"bluetooth".

BUG=chromium:840517
TEST=emerge newblue, deploy, reboot, and verify that /dev/hci_le is
owned by user and group "bluetooth".

Change-Id: I01228991a660105055f9c100f824829d64131f7f
Reviewed-on: https://chromium-review.googlesource.com/1080977
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/59474b299fe59bd47636b98eff3fb6071a578970/chromeos-base/newblue/files/50-newblue.rules
[modify] https://crrev.com/59474b299fe59bd47636b98eff3fb6071a578970/chromeos-base/newblue/newblue-9999.ebuild

Project Member

Comment 16 by bugdroid1@chromium.org, Jun 6 2018

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

commit b9b53ee829f78f73f74235561805f7ab6765778c
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed Jun 06 21:31:38 2018

Define __packed in its own header

newblued needs __packed to be defined, so we should define this in a
separate header that is distributable. This CL creates a header for
macro definitions that need to be visible by libnewblue clients.

BUG=chromium:840517
TEST=emerge-$BOARD newblue; emerge-$BOARD bluetooth

Change-Id: I928376ec01adab43acae1626f028f9479a948865

[modify] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/l2cap.c
[modify] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/persist.c
[modify] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/gatt-builtin.h
[modify] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/hci_int.h
[modify] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/gatt-builtin.c
[modify] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/bt_vendor_lib.h
[modify] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/test.c
[modify] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/Makefile
[modify] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/sm.c
[rename] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/newblue-macros.h
[modify] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/gatt.h
[modify] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/att.c
[modify] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/hci.c
[modify] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/uuid.h
[modify] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/util.h
[modify] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/att.h
[modify] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/gatt.c
[modify] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/sm.h
[modify] https://crrev.com/b9b53ee829f78f73f74235561805f7ab6765778c/hci.h

Project Member

Comment 17 by bugdroid1@chromium.org, Jun 8 2018

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

commit 100b2da8b3fb955ee88969adf703eb6349a8be87
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Fri Jun 08 06:33:33 2018

bluetooth: Don't install newblued upstart init file

newblued shouldn't be brought up by default, until the kernel splitter
is checked in and there is a way to enable/disable the splitter at
runtime.

BUG=chromium:840517
TEST=None

Change-Id: I070e2dbe448222421004d388b5195bf004d54895
Reviewed-on: https://chromium-review.googlesource.com/1086373
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/100b2da8b3fb955ee88969adf703eb6349a8be87/chromeos-base/bluetooth/bluetooth-9999.ebuild

Project Member

Comment 18 by bugdroid1@chromium.org, Jun 16 2018

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

commit 3d769069d7361893a18d79eb737f5af204b41860
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Sat Jun 16 05:17:15 2018

bluetooth: Add option for dispatcher to passthrough to BlueZ or NewBlue

For testing and diagnosis purposes, it's useful to allow btdispatch to
be purely forwarding D-Bus traffic to/from BlueZ or NewBlue only.

BUG=chromium:840517
TEST=Unit test and manual test with commands:
     btdispatch --help
     btdispatch --passthrough=newblue

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

[modify] https://crrev.com/3d769069d7361893a18d79eb737f5af204b41860/bluetooth/dispatcher/main.cc
[modify] https://crrev.com/3d769069d7361893a18d79eb737f5af204b41860/bluetooth/dispatcher/dispatcher_daemon.h
[modify] https://crrev.com/3d769069d7361893a18d79eb737f5af204b41860/bluetooth/dispatcher/dispatcher.h
[modify] https://crrev.com/3d769069d7361893a18d79eb737f5af204b41860/bluetooth/dispatcher/dispatcher_unittest.cc
[modify] https://crrev.com/3d769069d7361893a18d79eb737f5af204b41860/bluetooth/dispatcher/dispatcher_daemon.cc
[modify] https://crrev.com/3d769069d7361893a18d79eb737f5af204b41860/bluetooth/dispatcher/dispatcher.cc

Project Member

Comment 19 by bugdroid1@chromium.org, Jun 23 2018

Labels: merge-merged-chromeos-5.44
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/bluez/+/9f7db20940e0ec97201abe527afdd11bf5cdb171

commit 9f7db20940e0ec97201abe527afdd11bf5cdb171
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Sat Jun 23 00:22:07 2018

CHROMIUM: Add option to bluetoothctl for specifying service

This option lets bluetoothctl choose which BlueZ-compatible service to
talk to. Our use case is to specify bluetoothctl to talk to
org.chromium.Newblue so we have a tool for testing or diagnosing
newblued.

BUG=chromium:840517
TEST=Run newblued, and do manual call:
     bluetoothctl --help
     bluetoothctl --service=org.chromium.Newblue

Change-Id: I47312677b1d47d891057ee0c1c50919dfa0aee48
Reviewed-on: https://chromium-review.googlesource.com/1110615
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/9f7db20940e0ec97201abe527afdd11bf5cdb171/client/main.c

Project Member

Comment 20 by bugdroid1@chromium.org, Jul 3

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

commit 68d866b2a37e5c4a30c04d2a95c6b516f2cc6eaa
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue Jul 03 21:59:26 2018

bluetooth: Add libnewblue wrapper

This introduces the integration with libnewblue.

BUG=chromium:840517
TEST=Added unit test
CQ-DEPEND=CL:1066977,CL:1089920

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

[modify] https://crrev.com/68d866b2a37e5c4a30c04d2a95c6b516f2cc6eaa/bluetooth/newblued/main.cc
[add] https://crrev.com/68d866b2a37e5c4a30c04d2a95c6b516f2cc6eaa/bluetooth/newblued/libnewblue.h
[add] https://crrev.com/68d866b2a37e5c4a30c04d2a95c6b516f2cc6eaa/bluetooth/newblued/newblue.cc
[modify] https://crrev.com/68d866b2a37e5c4a30c04d2a95c6b516f2cc6eaa/bluetooth/newblued/newblue.h
[modify] https://crrev.com/68d866b2a37e5c4a30c04d2a95c6b516f2cc6eaa/bluetooth/common/dbus_daemon.cc
[modify] https://crrev.com/68d866b2a37e5c4a30c04d2a95c6b516f2cc6eaa/bluetooth/newblued/newblue_daemon.h
[modify] https://crrev.com/68d866b2a37e5c4a30c04d2a95c6b516f2cc6eaa/bluetooth/bluetooth.gyp
[add] https://crrev.com/68d866b2a37e5c4a30c04d2a95c6b516f2cc6eaa/bluetooth/newblued/mock_libnewblue.h
[add] https://crrev.com/68d866b2a37e5c4a30c04d2a95c6b516f2cc6eaa/bluetooth/newblued/mock_newblue.h
[modify] https://crrev.com/68d866b2a37e5c4a30c04d2a95c6b516f2cc6eaa/bluetooth/newblued/newblue_daemon.cc
[add] https://crrev.com/68d866b2a37e5c4a30c04d2a95c6b516f2cc6eaa/bluetooth/newblued/libnewblue_generated_function.h
[modify] https://crrev.com/68d866b2a37e5c4a30c04d2a95c6b516f2cc6eaa/bluetooth/newblued/newblue_daemon_unittest.cc

Project Member

Comment 21 by bugdroid1@chromium.org, Jul 3

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

commit d8f2c70258649f91d02dbe59ddb81d355d782775
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Tue Jul 03 21:59:26 2018

Make libnewblue headers C++ friendly.

This CL adds extern "C" wrapping for exported headers so that the C++
consumers can include them without specifying extern "C" themselves.

BUG=chromium:840517
TEST=Build C++ client (newblued) without extern "C".

Change-Id: Ifa164bf274e39bb7fbf3380e76be8a069912f0aa
Reviewed-on: https://chromium-review.googlesource.com/1089920
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/d8f2c70258649f91d02dbe59ddb81d355d782775/gatt-builtin.h
[modify] https://crrev.com/d8f2c70258649f91d02dbe59ddb81d355d782775/l2cap.h
[modify] https://crrev.com/d8f2c70258649f91d02dbe59ddb81d355d782775/newblue-macros.h
[modify] https://crrev.com/d8f2c70258649f91d02dbe59ddb81d355d782775/gatt.h
[modify] https://crrev.com/d8f2c70258649f91d02dbe59ddb81d355d782775/att.h
[modify] https://crrev.com/d8f2c70258649f91d02dbe59ddb81d355d782775/sm.h
[modify] https://crrev.com/d8f2c70258649f91d02dbe59ddb81d355d782775/hci.h

Project Member

Comment 22 by bugdroid1@chromium.org, Jul 11

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

commit 7e1d3e39a0db20c470197d62880762e2017e2948
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed Jul 11 19:13:12 2018

bluetooth: Add NewBlue initialization and bring up.

BUG=chromium:840517
TEST=Added unit tests, and manual test:
     Run newblued, wait until initialization and bring up succeeds.

Change-Id: Ieb8921e65af9420b0092dc7c5d3a7acbdffbbede
Reviewed-on: https://chromium-review.googlesource.com/1100114
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>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[add] https://crrev.com/7e1d3e39a0db20c470197d62880762e2017e2948/bluetooth/newblued/newblue_unittest.cc
[modify] https://crrev.com/7e1d3e39a0db20c470197d62880762e2017e2948/bluetooth/newblued/newblue.cc
[modify] https://crrev.com/7e1d3e39a0db20c470197d62880762e2017e2948/bluetooth/dispatcher/main.cc
[modify] https://crrev.com/7e1d3e39a0db20c470197d62880762e2017e2948/bluetooth/dispatcher/dispatcher_daemon.h
[modify] https://crrev.com/7e1d3e39a0db20c470197d62880762e2017e2948/bluetooth/common/dbus_daemon.cc
[modify] https://crrev.com/7e1d3e39a0db20c470197d62880762e2017e2948/bluetooth/newblued/newblue_daemon.h
[modify] https://crrev.com/7e1d3e39a0db20c470197d62880762e2017e2948/bluetooth/bluetooth.gyp
[modify] https://crrev.com/7e1d3e39a0db20c470197d62880762e2017e2948/bluetooth/dispatcher/dispatcher_daemon.cc
[modify] https://crrev.com/7e1d3e39a0db20c470197d62880762e2017e2948/bluetooth/newblued/mock_newblue.h
[modify] https://crrev.com/7e1d3e39a0db20c470197d62880762e2017e2948/bluetooth/newblued/newblue_daemon.cc
[modify] https://crrev.com/7e1d3e39a0db20c470197d62880762e2017e2948/bluetooth/common/bluetooth_daemon.h
[modify] https://crrev.com/7e1d3e39a0db20c470197d62880762e2017e2948/bluetooth/newblued/newblue.h
[modify] https://crrev.com/7e1d3e39a0db20c470197d62880762e2017e2948/bluetooth/newblued/newblue_daemon_unittest.cc

Project Member

Comment 23 by bugdroid1@chromium.org, Jul 11

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

commit 7fecfeda3c0d0e1d1e8c79b141a858cd669335fa
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed Jul 11 23:47:55 2018

device/bluetooth: Add a flag to show all unfiltered devices.

Newblue development needs to see all the discovered devices unfiltered,
so this flag is useful for Newblue development and can be removed once
Newblue is stable.

Bug: 840517
Change-Id: I65c95c567ebfb8dbb6d831bfb1e1219b153346c0
Reviewed-on: https://chromium-review.googlesource.com/1130655
Commit-Queue: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Xiaoyin Hu <xiaoyinh@chromium.org>
Reviewed-by: Rahul Chaturvedi <rkc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574412}
[modify] https://crrev.com/7fecfeda3c0d0e1d1e8c79b141a858cd669335fa/ash/BUILD.gn
[modify] https://crrev.com/7fecfeda3c0d0e1d1e8c79b141a858cd669335fa/ash/DEPS
[modify] https://crrev.com/7fecfeda3c0d0e1d1e8c79b141a858cd669335fa/ash/system/bluetooth/tray_bluetooth_helper_unittest.cc
[modify] https://crrev.com/7fecfeda3c0d0e1d1e8c79b141a858cd669335fa/chrome/browser/about_flags.cc
[modify] https://crrev.com/7fecfeda3c0d0e1d1e8c79b141a858cd669335fa/chrome/browser/flag_descriptions.cc
[modify] https://crrev.com/7fecfeda3c0d0e1d1e8c79b141a858cd669335fa/chrome/browser/flag_descriptions.h
[modify] https://crrev.com/7fecfeda3c0d0e1d1e8c79b141a858cd669335fa/device/base/features.cc
[modify] https://crrev.com/7fecfeda3c0d0e1d1e8c79b141a858cd669335fa/device/base/features.h
[modify] https://crrev.com/7fecfeda3c0d0e1d1e8c79b141a858cd669335fa/device/bluetooth/chromeos/bluetooth_utils.cc
[modify] https://crrev.com/7fecfeda3c0d0e1d1e8c79b141a858cd669335fa/device/bluetooth/dbus/bluez_dbus_manager.cc
[modify] https://crrev.com/7fecfeda3c0d0e1d1e8c79b141a858cd669335fa/tools/metrics/histograms/enums.xml

Project Member

Comment 24 by bugdroid1@chromium.org, Jul 12

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

commit 49df60386485a50962a4ae016a2019b36a61f83a
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Thu Jul 12 01:48:38 2018

bluetooth: Add discovery API to Newblue class

This adds discovery API (StartDiscovery and StopDiscovery) to class
Newblue, which will be used by NewblueDaemon in the next CL.

BUG=chromium:840517
TEST=Added unit test in NewblueTest

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

[modify] https://crrev.com/49df60386485a50962a4ae016a2019b36a61f83a/bluetooth/newblued/mock_libnewblue.h
[modify] https://crrev.com/49df60386485a50962a4ae016a2019b36a61f83a/bluetooth/newblued/newblue.cc
[modify] https://crrev.com/49df60386485a50962a4ae016a2019b36a61f83a/bluetooth/newblued/newblue.h
[modify] https://crrev.com/49df60386485a50962a4ae016a2019b36a61f83a/bluetooth/newblued/newblue_unittest.cc

Project Member

Comment 25 by bugdroid1@chromium.org, Jul 25

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

commit 7a505da47e8b0ce2125e909789df74704bdf558b
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed Jul 25 07:14:27 2018

bluetooth: Add scan D-Bus interface to NewblueDaemon.

This provides D-Bus methods StartDiscovery and StopDiscovery to the
adapter object on interface org.bluez.Adapter1.

This completes the minimum work required for end-to-end scanning to work
on Chrome OS with NewBlue.

Further work is still needed for complete scanning API of newblued:
* D-Bus method for setting scan filter (SetDiscoveryFilter)
* Cleaning up cached discovered devices
* Updating "Discovering" property
* Multi-client discovery sessions

BUG=chromium:840517
TEST=Added unit test to NewblueDaemonTest, and manual end-to-end test
     with Chrome communicating with newblued directly instead of BlueZ.

Change-Id: I970f8a045356cf1bfaf8e42e669a99a20d43f0db
Reviewed-on: https://chromium-review.googlesource.com/1102671
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/7a505da47e8b0ce2125e909789df74704bdf558b/bluetooth/newblued/newblue_daemon.cc
[modify] https://crrev.com/7a505da47e8b0ce2125e909789df74704bdf558b/bluetooth/newblued/newblue_daemon.h
[modify] https://crrev.com/7a505da47e8b0ce2125e909789df74704bdf558b/bluetooth/newblued/mock_newblue.h
[modify] https://crrev.com/7a505da47e8b0ce2125e909789df74704bdf558b/bluetooth/newblued/newblue_daemon_unittest.cc
[modify] https://crrev.com/7a505da47e8b0ce2125e909789df74704bdf558b/bluetooth/common/exported_object_manager_wrapper.h
[modify] https://crrev.com/7a505da47e8b0ce2125e909789df74704bdf558b/bluetooth/common/exported_object_manager_wrapper.cc

Cc: shijinabraham@chromium.org
Project Member

Comment 28 by bugdroid1@chromium.org, Nov 28

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

commit 8090c245be7a9efa0ac884b6d91062f43809558c
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Wed Nov 28 03:13:41 2018

bluetooth: Move the handling of org.bluez.Adapter1 methods

StartDiscovery and StopDiscovery are going to get more and more complex.
Therefore it should be separated into its own class for better
complexity management.

BUG=chromium:840517
TEST=No behavior change, unit tests don't regress

Change-Id: I92dbe76448279b16ec92c1218c60770004c6bce2
Reviewed-on: https://chromium-review.googlesource.com/1328241
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Qiyu Hu <qiyuh@google.com>

[modify] https://crrev.com/8090c245be7a9efa0ac884b6d91062f43809558c/bluetooth/newblued/agent_manager_interface_handler.h
[modify] https://crrev.com/8090c245be7a9efa0ac884b6d91062f43809558c/bluetooth/BUILD.gn
[add] https://crrev.com/8090c245be7a9efa0ac884b6d91062f43809558c/bluetooth/newblued/adapter_interface_handler.cc
[add] https://crrev.com/8090c245be7a9efa0ac884b6d91062f43809558c/bluetooth/newblued/adapter_interface_handler.h
[modify] https://crrev.com/8090c245be7a9efa0ac884b6d91062f43809558c/bluetooth/newblued/newblue_daemon.h
[modify] https://crrev.com/8090c245be7a9efa0ac884b6d91062f43809558c/bluetooth/newblued/newblue_daemon.cc

Sign in to add a comment