New issue
Advanced search Search tips

Issue 660335 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Feature

Blocking:
issue 570344



Sign in to add a comment

bluetooth: linux: proactively reject requestDevice promise if we know we're going to fail due to old kernel

Project Member Reported by fbeaufort@chromium.org, Oct 28 2016

Issue description

Chromium	56.0.2904.0 (Developer Build) (64-bit)
Revision	fe01d723289f8bc66dc9f5df0bb1df5c3318cb0e
OS	Linux 
BlueZ 5.42

What steps will reproduce the problem?
(1) Go to https://googlechrome.github.io/samples/web-bluetooth/device-info.html?service=0xff02
(2) Click [Get Bluetooth device info] button
(3) Web Bluetooth chooser shows up and scans for devices
(4) Click [Cancel] button in the chooser
(5) Click [Get Bluetooth device info] button a second time
(6) Web Bluetooth chooser shows up

What is the expected output?
A scan should start

What do you see instead?
It says "No bluetooth devices found"


See chrome logs:


// First discovery is fine

[862:862:1028/124310:VERBOSE1:bluetooth_device_chooser_controller.cc(54)] requestDevice called with the following filters: 
[862:862:1028/124310:VERBOSE1:bluetooth_device_chooser_controller.cc(57)] Filter #1
[862:862:1028/124310:VERBOSE1:bluetooth_device_chooser_controller.cc(65)] Services: 
[862:862:1028/124310:VERBOSE1:bluetooth_device_chooser_controller.cc(66)] 	[
[862:862:1028/124310:VERBOSE1:bluetooth_device_chooser_controller.cc(68)] 		0000ff02-0000-1000-8000-00805f9b34fb
[862:862:1028/124310:VERBOSE1:bluetooth_device_chooser_controller.cc(69)] 	]
[862:862:1028/124310:VERBOSE1:bluetooth_adapter_bluez.cc(1289)] AddDiscoverySession
[862:862:1028/124310:VERBOSE1:bluetooth_adapter_bluez.cc(1468)] OnStartDiscovery
[862:862:1028/124310:VERBOSE1:bluetooth_adapter.cc(293)] BluetoothAdapter::OnStartDiscoverySession
[862:862:1028/124310:VERBOSE1:bluetooth_device_chooser_controller.cc(441)] Started discovery session.
[862:862:1028/124310:VERBOSE1:bluetooth_adapter_bluez.cc(1022)] Discovering changed: 1
[862:862:1028/124314:VERBOSE2:bluetooth_device_bluez.cc(166)] Gatt services have not been fully resolved for device /org/bluez/hci0/dev_41_54_9B_E4_93_7D
[862:862:1028/124320:VERBOSE1:bluetooth_discovery_session.cc(45)] Stopping device discovery session.
[862:862:1028/124320:VERBOSE1:bluetooth_adapter_bluez.cc(1352)] RemoveDiscoverySession
[862:862:1028/124320:VERBOSE1:bluetooth_discovery_session.cc(45)] Stopping device discovery session.
[862:862:1028/124320:VERBOSE1:bluetooth_adapter_bluez.cc(1352)] RemoveDiscoverySession
[862:862:1028/124320:VERBOSE1:bluetooth_adapter_bluez.cc(1366)] Pending request to start/stop device discovery. Queueing request to stop discovery session.
[862:862:1028/124320:VERBOSE1:bluetooth_adapter_bluez.cc(1515)] OnStopDiscovery
[862:862:1028/124320:VERBOSE1:bluetooth_adapter_bluez.cc(1022)] Discovering changed: 0

// Second fails...

[862:862:1028/124331:VERBOSE1:bluetooth_device_chooser_controller.cc(54)] requestDevice called with the following filters: 
[862:862:1028/124331:VERBOSE1:bluetooth_device_chooser_controller.cc(57)] Filter #1
[862:862:1028/124331:VERBOSE1:bluetooth_device_chooser_controller.cc(65)] Services: 
[862:862:1028/124331:VERBOSE1:bluetooth_device_chooser_controller.cc(66)] 	[
[862:862:1028/124331:VERBOSE1:bluetooth_device_chooser_controller.cc(68)] 		0000ff02-0000-1000-8000-00805f9b34fb
[862:862:1028/124331:VERBOSE1:bluetooth_device_chooser_controller.cc(69)] 	]
[862:862:1028/124331:VERBOSE1:bluetooth_adapter_bluez.cc(1289)] AddDiscoverySession
[862:862:1028/124331:WARNING:bluetooth_adapter_bluez.cc(1596)] /org/bluez/hci0: Failed to set discovery filter: org.bluez.Error.NotSupported: Operation is not supported
[862:862:1028/124331:WARNING:bluetooth_adapter_bluez.cc(1565)] /org/bluez/hci0: Failed to pre set discovery filter.
[862:862:1028/124331:VERBOSE1:bluetooth_adapter.cc(307)] OnStartDiscoverySessionError: 14

 
Screenshot from 2016-10-28 12:43:40.png
187 KB View Download
For info, I'm running Kernel version 3.13. It should fail the first time...
Just to be clear, upgrading to 3.19 works like a charm.
We should maybe proactively reject requestDevice promise if we know we're going to fail like we've done for MacOS at https://codereview.chromium.org/2384463002

What do you think?

Comment 3 by ortuno@chromium.org, Oct 30 2016

I think it's harder than just the kernel version. People might have applied the necessary kernel patches to make BlueZ work but still be on an old version.

Comment 4 by ortuno@chromium.org, Oct 30 2016

Labels: -Type-Bug Type-Feature
bluetoothd actually checks the management revision not the kernel version.
For info, here's what I get on my current Chromebook:

localhost / # uname -r
3.8.11

localhost / # /sbin/minijail0 -u bluetooth -g bluetooth -G -c 3500 -- /usr/libexec/bluetooth/bluetoothd -d -E --nodetach
bluetoothd[23624]: Bluetooth daemon 5.41
...
bluetoothd[23624]: Bluetooth management interface 1.11 initialized


So even though, my Kernel version is 3.8, I still get Management revision set to 1.11 which is greater than the required version 1.8.

Comment 7 by ortuno@chromium.org, Feb 13 2017

Status: Available (was: Untriaged)

Comment 8 by scheib@chromium.org, Feb 16 2017

Blocking: 570344

Comment 9 by ortuno@chromium.org, Apr 27 2017

 Issue 578779  has been merged into this issue.
Summary: bluetooth: linux: proactively reject requestDevice promise if we know we're going to fail (was: bluetooth: linux: Discovery fails the second time)
Summary: bluetooth: linux: proactively reject requestDevice promise if we know we're going to fail due to old kernel (was: bluetooth: linux: proactively reject requestDevice promise if we know we're going to fail)
Project Member

Comment 12 by sheriffbot@chromium.org, Apr 30 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment