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

Issue 659940 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Email to this user bounced
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

bluetooth: android: No devices detected during first scan after enabling adapter

Reported by pe...@opera.com, Oct 27 2016

Issue description

On Nexus 5X with Android 7 it takes up to 15 seconds for the adapter to settle after is has been powered up. There are no callbacks for new devices until the initial period has passed.

How to reproduce:

1. Turn off bluetooth
2. Go to a web page with web-bt and open the device chooser.
3. The chooser asks the user to enable bluetooth -> enable bluetooth.
4. Go back to the web page and open the chooser again.

Expected:
devices are found

Actual:
no devices 

Note 1: Chromium and Opera differs a bit wrt. to the chooser. In Chromium the chooser is closed when leaving the browser, while in Opera it stays open and immediately start a scan when adapter is turned on.

Note 2: the 15 seconds to settle is only tested on one device with a lot of paired devices. It is probably different for other devices.




 
 

Comment 1 by pe...@opera.com, Oct 27 2016

Components: Blink>Bluetooth

Comment 2 by pe...@opera.com, Oct 27 2016

Owner: pe...@opera.com
I can't reproduce on Nexus 5X with ANdroid 7. See my ADB logs at http://pastebin.com/raw/LLQ4XNSM

Can you provide some logs as well?
See https://www.chromium.org/developers/how-tos/file-web-bluetooth-bugs

Comment 4 by pe...@opera.com, Oct 28 2016

Paring with one classic BT device (f.ex. headset with A2DP) increases the time from enabling BT to first discover to around 6 seconds. This stays the same up to 3 paired devices (couldn't find more). With 4 paired devices (like on my 5X) it takes around 10 seconds. With 6 paired devices it took around 15 seconds.

Tested with patch from https://codereview.chromium.org/2377513004

Measurements from enabling BT to first scan result:

Paired devices: 0
1.669 s
1.536 s
1.509 s
1.558 s
1.564 s
1.558 s
1.580 s

Paired devices: 1
6.617 s
6.567 s
6.686 s
6.683 s
6.634 s
6.600 s
6.735 s
6.639 s

Paired devices: 2
6.645 s
6.693 s
6.618 s
6.565 s
6.665 s
6.633 s
6.580 s

Paired devices: 3
6.604 s
6.629 s
6.653 s
6.675 s
6.632 s
6.638 s
6.603 s



Cc: jpawlowski@chromium.org
jpawlowski@ Is this a known issue?

Comment 6 by pe...@opera.com, Nov 21 2016

Status: Fixed (was: Untriaged)
This is fixed in https://codereview.chromium.org/2506163002 with a timeout of 60 seconds. More than enough time to get the adapter up and running and detect devices.

Sign in to add a comment