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

Issue 614903 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 604356



Sign in to add a comment

Gatt server API change break Gatt client characteristic read

Project Member Reported by puthik@chromium.org, May 26 2016

Issue description

I can't read GattCharacteristic in latest samus-cheets dev image.

Here is the log when I tried to do this with bluetoothctl command.

localhost ~ # bluetoothctl 
[bluetooth]# connect E0:CF:65:8C:86:1A 
Attempting to connect to E0:CF:65:8C:86:1A
Connection successful
[Pixel C Keyboard]# select-attribute /org/bluez/hci0/dev_E0_CF_65_8C_86_1A/service000c/char000d 
[Pixel C Keyboard:/service000c/char000d]# read
Attempting to read /org/bluez/hci0/dev_E0_CF_65_8C_86_1A/service000c/char000d
Failed to read: org.freedesktop.DBus.Error.UnknownMethod


If I revert bluez to 5.37, the command run successfully as log shown below

localhost ~ # bluetoothctl 
[bluetooth]# connect E0:CF:65:8C:86:1A 
Attempting to connect to E0:CF:65:8C:86:1A
Connection successful
[Pixel C Keyboard]# select-attribute /org/bluez/hci0/dev_E0_CF_65_8C_86_1A/service000c/char000d
[Pixel C Keyboard:/service000c/char000d]# read
Attempting to read /org/bluez/hci0/dev_E0_CF_65_8C_86_1A/service000c/char000d
[CHG] Attribute /org/bluez/hci0/dev_E0_CF_65_8C_86_1A/service000c/char000d Value: 0x47
[CHG] Attribute /org/bluez/hci0/dev_E0_CF_65_8C_86_1A/service000c/char000d Value: 0x6f
[CHG] Attribute /org/bluez/hci0/dev_E0_CF_65_8C_86_1A/service000c/char000d Value: 0x6f
[CHG] Attribute /org/bluez/hci0/dev_E0_CF_65_8C_86_1A/service000c/char000d Value: 0x67
[CHG] Attribute /org/bluez/hci0/dev_E0_CF_65_8C_86_1A/service000c/char000d Value: 0x6c
[CHG] Attribute /org/bluez/hci0/dev_E0_CF_65_8C_86_1A/service000c/char000d Value: 0x65
  47 6f 6f 67 6c 65                                Google



 

Comment 1 by mcchou@chromium.org, May 26 2016

Status: Started (was: Assigned)

Comment 2 by puthik@chromium.org, May 26 2016

Summary: Gatt server API change break Gatt client characteristic read (was: BlueZ 5.39 break Gatt Characteristic read)
I know what happen now.

The api change in  Issue 605187  affect not only BlueZ Gatt Server API, but it also change Gatt client API.

We need to update Chrome BlueZ call to match that.

Workaround for now is to revert CL 2a2e7102 in BlueZ

Comment 3 by puthik@chromium.org, May 26 2016

Owner: puthik@chromium.org
The patch seems to be easy enough so I just submit that.

http://crosreview.com/347459
http://crrev.com/2016023002

Comment 4 by puthik@chromium.org, May 26 2016

Cc: ortuno@chromium.org
Project Member

Comment 5 by bugdroid1@chromium.org, May 27 2016

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

commit cd071769e79e660537e5bfa73b76fe310d7170cb
Author: Puthikorn Voravootivat <puthik@chromium.org>
Date: Thu May 26 19:44:25 2016

dbus: bluetooth: Add GATT option string to match blueZ API change

The BlueZ CL below added option dict to ReadValue and WriteValue.
This CLs add string constant for the key of this option dict.

http://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=93b64d9

BUG= chromium:614903 
TEST=Can read characteristic value from Pixel C keyboard

Change-Id: I146b04c738fd75703eedd26300fd855b07a414be
Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/347459
Reviewed-by: Dan Erat <derat@chromium.org>

[modify] https://crrev.com/cd071769e79e660537e5bfa73b76fe310d7170cb/dbus/service_constants.h

Comment 6 by r...@chromium.org, May 27 2016

Cc: zelidrag@chromium.org
Hey Opal, this should only require adding an empty dictionary in the call to ReadValue/WriteValue. I've left a more detailed comment on the CL.
Can we merge this to M52?
Latest Dev Channel update below has this issue:

Version 52.0.2743.0 dev (64-bit)
Platform 8350.2.0 (Official Build) dev-channel link
Firmware Google_Link.2695.1.169
Blocking: 604356

Comment 9 by ortuno@chromium.org, May 27 2016

Components: -OS>Systems>Bluetooth IO>Bluetooth

Comment 10 by r...@chromium.org, May 27 2016

Labels: -M-53 M-52
Project Member

Comment 11 by bugdroid1@chromium.org, May 27 2016

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

commit 672ef3f9e8849b57eb03ef8752b861f410542ac7
Author: puthik <puthik@chromium.org>
Date: Fri May 27 23:22:57 2016

bluetooth: Add option dict to ReadValue/WriteValue dbus call

The BlueZ CL below added option dict to ReadValue and WriteValue.
http://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=93b64d9

As we intend to use BlueZ API change for Gatt server funtionality,
this CL updates Chrome DBus call to match the new BlueZ API by
just append an empty option dict for Gatt client call.

BUG= chromium:614903 
TEST=Can read characteristic value from Pixel C keyboard

Review-Url: https://codereview.chromium.org/2016023002
Cr-Commit-Position: refs/heads/master@{#396595}

[modify] https://crrev.com/672ef3f9e8849b57eb03ef8752b861f410542ac7/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.cc
[modify] https://crrev.com/672ef3f9e8849b57eb03ef8752b861f410542ac7/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc

Cc: gkihumba@chromium.org
Labels: Merge-Request-52
+gkihumba
Add merge request tag for M-52

Comment 13 by tin...@google.com, Jun 1 2016

Labels: -Merge-Request-52 Merge-Approved-52 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M52 (branch: 2743)
M52 CL: http://crrev.com/2036483002
Project Member

Comment 15 by bugdroid1@chromium.org, Jun 1 2016

Labels: -merge-approved-52 merge-merged-2743
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b3a6bc53984cba32583a23a402dbc9294d116f6a

commit b3a6bc53984cba32583a23a402dbc9294d116f6a
Author: puthik <puthik@chromium.org>
Date: Wed Jun 01 22:48:58 2016

bluetooth: Add option dict to ReadValue/WriteValue dbus call

The BlueZ CL below added option dict to ReadValue and WriteValue.
http://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=93b64d9

As we intend to use BlueZ API change for Gatt server funtionality,
this CL updates Chrome DBus call to match the new BlueZ API by
just append an empty option dict for Gatt client call.

BUG= chromium:614903 
TEST=Can read characteristic value from Pixel C keyboard

Review-Url: https://codereview.chromium.org/2016023002
Cr-Commit-Position: refs/heads/master@{#396595}
(cherry picked from commit 672ef3f9e8849b57eb03ef8752b861f410542ac7)

NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2036483002
Cr-Commit-Position: refs/branch-heads/2743@{#179}
Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939}

[modify] https://crrev.com/b3a6bc53984cba32583a23a402dbc9294d116f6a/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.cc
[modify] https://crrev.com/b3a6bc53984cba32583a23a402dbc9294d116f6a/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc

Status: Fixed (was: Started)
For info, I'm still experiencing this issue on Chrome OS Canary 53.0.2754.0.
Is that expected/
fbeaufort@
Can you post your "chrome://version"

I'm not sure that ChromeOS version already has my patch included or not.
ChromeOS tree status mentioned that we had the "missing Chrome prebuilt" problem.
Version 53.0.2754.0 canary (64-bit)
Platform 8401.0.0 (Official Build) canary-channel samus
Firmware Google_Samus.6300.174.0
Same with:
Version 53.0.2754.0 canary (64-bit)
Platform 8406.0.0 (Official Build) canary-channel samus
Firmware Google_Samus.6300.174.0




Google Chrome	53.0.2754.0 (Official Build) canary (64-bit)
Revision	0
Platform	8406.0.0 (Official Build) canary-channel samus
Blink	537.36 (@0)
JavaScript	V8 5.3.89
Flash	22.0.0.177-r1

Git Hash should be f85d3c1724c9eb77b8b6ce7b6ac050aa406f1d6f if https://chromium.googlesource.com/chromium/src/+/f85d3c1724c9eb77b8b6ce7b6ac050aa406f1d6f is correct
Cr-Commit-Position: refs/heads/master@{#396773}



Status: Started (was: Fixed)
reproduced in my machine. Not sure what happen here.
From my testing, the Chrome API is working properly but bluetoothctl is not working because we didn't merge the change from upstream. Upload the fixed below.

http://crosreview/350172 UPSTREAM: client: Update to use new GATT API

As this just fix the tool, I don't think we need to merge this to M-52.
Broken link
http://crosreview.com/350172 UPSTREAM: client: Update to use new GATT API
If it's not too much of a burden, I would appreciate if we could merge http://crosreview.com/350172 in M52 as Chrome OS users tend to use bluetoothctl to debug Web Bluetooth issues.

Comment 26 Deleted

As a data point, I try out the following devices.

DUT            Jerry
Build          8409.0.0 (canary dev-channel)
Remote device  DELL BLE keyboard
BlueZ version  5.39

After connecting Jerry with the keyboard, bluetoothctl was able to list-attributes and select-attribute.

[DELL Keyboard] list-attributes
...
Characteristic
        /org/bluez/hci0/dev_90_7F_61_1A_48_04/service0024/char0025
        Battery Level
...

[DELL Keyboard] select-attribute /org/bluez/hci0/dev_90_7F_61_1A_48_04/service0024/char0025

However, the read op failed.

[DELL Keyboard:/service0024/char0025]# read
Attempting to read /org/bluez/hci0/dev_90_7F_61_1A_48_04/service0024/char0025
Failed to read: org.freedesktop.DBus.Error.UnknownMethod
Project Member

Comment 28 by bugdroid1@chromium.org, Jun 7 2016

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

commit b85839769962b9e412e06204b8a8cbe9b582a920
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: Sun May 08 14:24:14 2016

UPSTREAM: client: Update to use new GATT API

This update use of ReadValue and WriteValue to include the options
introduced in the API.

BUG= chromium:614903 
TEST=Verified with bluetoothctl command

Change-Id: Id18bf154e553333486ae6a84ab0d26cce7211d55
Reviewed-on: https://chromium-review.googlesource.com/350172
Commit-Ready: Puthikorn Voravootivat <puthik@chromium.org>
Tested-by: Puthikorn Voravootivat <puthik@chromium.org>
Reviewed-by: Rahul Chaturvedi <rkc@chromium.org>

[modify] https://crrev.com/b85839769962b9e412e06204b8a8cbe9b582a920/client/gatt.c

fbeaufort@
Can you help verify the fix once the official dev build is out.

Since M-52 is in beta now, I will ask for merge request to M-52 once we verify that fix is in official build for a day.


I will check next Canary and let you know for sure.
I'm able to read a characteristic from bluetoothctl in:

Version 53.0.2760.0 canary (64-bit)
Platform 8427.0.0 (Official Build) canary-channel samus
Firmware Google_Samus.6300.174.0
Labels: -Hotlist-Merge-Approved Merge-Request-52
Merge request for #28 CL

Comment 33 by tin...@google.com, Jun 9 2016

Labels: -Merge-Request-52 Merge-Approved-52 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M52 (branch: 2743)
Project Member

Comment 34 by bugdroid1@chromium.org, Jun 9 2016

Labels: merge-merged-release-R52-8350.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/bluez/+/24f34e5639139ea062d95d418a4b869cd88f30bf

commit 24f34e5639139ea062d95d418a4b869cd88f30bf
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: Sun May 08 14:24:14 2016

UPSTREAM: client: Update to use new GATT API

This update use of ReadValue and WriteValue to include the options
introduced in the API.

BUG= chromium:614903 
TEST=Verified with bluetoothctl command

Change-Id: Id18bf154e553333486ae6a84ab0d26cce7211d55
Reviewed-on: https://chromium-review.googlesource.com/350172
Commit-Ready: Puthikorn Voravootivat <puthik@chromium.org>
Tested-by: Puthikorn Voravootivat <puthik@chromium.org>
Reviewed-by: Rahul Chaturvedi <rkc@chromium.org>
(cherry picked from commit b85839769962b9e412e06204b8a8cbe9b582a920)
Reviewed-on: https://chromium-review.googlesource.com/351270
Reviewed-by: Puthikorn Voravootivat <puthik@chromium.org>
Commit-Queue: Puthikorn Voravootivat <puthik@chromium.org>
Trybot-Ready: Puthikorn Voravootivat <puthik@chromium.org>

[modify] https://crrev.com/24f34e5639139ea062d95d418a4b869cd88f30bf/client/gatt.c

Status: Fixed (was: Started)
Project Member

Comment 36 by sheriffbot@chromium.org, Jun 10 2016

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Merge-Approved -Merge-Approved-52
Remove Merge-Approved labels
Status: Verified (was: Fixed)
verified on 8350.55.0 samus-cheets

Sign in to add a comment