bluetooth: linux: proactively reject requestDevice promise if we know we're going to fail due to old kernel |
||||||||
Issue descriptionChromium 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
,
Oct 28 2016
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?
,
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.
,
Oct 30 2016
,
Nov 1 2016
bluetoothd actually checks the management revision not the kernel version.
,
Nov 2 2016
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.
,
Feb 13 2017
,
Feb 16 2017
,
Apr 27 2017
Issue 578779 has been merged into this issue.
,
Apr 27 2017
,
Apr 27 2017
,
Apr 30 2018
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
,
May 2 2018
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by fbeaufort@chromium.org
, Oct 28 2016