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

Issue 693937 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Feature

Blocking:
issue 490399



Sign in to add a comment

device.gatt.connect() fails for some dual-mode devices

Reported by stoned...@gmail.com, Feb 18 2017

Issue description

Steps to reproduce the problem:
1. Use Web Bluetooth API to connect to a device that advertises both Bluetooth classic and LE capabilities
2. Connection fails if device doesn't support GATT over BD/EDR.

What is the expected behavior?
Chrome should prefer connections using Bluetooth LE transport.

What went wrong?
Chrome uses the Android BluetoothDevice.connectGatt method without the 'transport' parameter (https://chromium.googlesource.com/chromium/src/+/master/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java#104). This defaults to TRANSPORT_AUTO mode which seems to prefer connecting over BD/EDR. In my testing, setting the 'transport' parameter to TRANSPORT_LE solves connection problems with many dual-mode devices. 

Did this work before? No 

Does this work in other browsers? N/A

Chrome version: 55.0.2883.91  Channel: n/a
OS Version: 6.0
Flash Version: Shockwave Flash 24.0 r

I've confirmed this issue on one of these: https://www.amazon.co.uk/d/B01A579ATO/ which uses a Microchip RN4677 Bluetooth module.

 

Comment 1 by ortuno@chromium.org, Feb 20 2017

Blocking: 490399
Cc: fbeaufort@chromium.org
Components: IO>Bluetooth
Labels: -Type-Bug -Pri-2 Pri-3 Type-Feature
Status: Available (was: Unconfirmed)
Thanks for the report! Sadly our code targets API 21 and the connectGatt function you mention is only available in >=23. That said we might be able to change that. 

@fbeaufort: Do you see any problems with having LE as the preferred transport?
Since Web Bluetooth is supported officially for Android M, I think this would  make our code just better. So yeah for it!

Android L users will use TRANSPORT_AUTO.
We may want to document this and add a debug log for that so that we don't forget when debugging.

Comment 3 by ortuno@chromium.org, Apr 17 2017

Owner: ortuno@chromium.org
Status: Fixed (was: Available)
Fixed by http://crrev.com/2706763002

Sign in to add a comment