New issue
Advanced search Search tips

Issue 647221 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Dec 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug

Blocking:
issue 364359



Sign in to add a comment

bluetooth: mac: Some scanning intervals cause devices not found

Project Member Reported by fbeaufort@chromium.org, Sep 15 2016

Issue description

Version: 55.0.2861.0	
OS: Mac

What steps will reproduce the problem?
(1) Make sure a nearby device advertises its presence every 600ms
(2) Go to https://googlechrome.github.io/samples/web-bluetooth/discover-services-and-characteristics.html
(3) Click "Discover services & characteristics" button
(4) Bluetooth chooser is shown.

What is the expected output?
I should find my device right away.

What do you see instead?
I don't. I have to wait...
Sometimes I even have to re-scan multiple times to see it...
 
For info, I can't reproduce this issue when advertising interval is 20ms as recommended in Bluetooth Accessory Design Guidelines for Apple Products at  https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf page 21
Cc: -jlebel@chromium.org
Owner: jlebel@chromium.org
Status: Assigned (was: Available)

Comment 3 by jlebel@chromium.org, Sep 21 2016

Status: Started (was: Assigned)
Do any of 152.5 ms, 211.25 ms, 318.75 ms, 417.5 ms, 546.25 ms, 760 ms, 852.5 ms, 1022.5 ms, or 1285 ms work better than 600ms? I suspect 600ms resonates with Core Bluetooth's scanning interval, and so often happens to never send when the mac is listening. I don't think we should try to support every single possible advertising interval, although scanning for longer is still a good idea.

Comment 5 by scheib@chromium.org, Sep 30 2016

Summary: bluetooth: mac: Some scanning intervals cause devices not found (was: bluetooth: Improve scanning situation on Mac)
Status: Assigned (was: Started)
I've just tried jlebel@ WIP patch at https://codereview.chromium.org/2521503003/ which basically runs a loop of "start scan for 100ms & stop scan" and it works great on my MacBook Air Early 2015 with macOS Sierra. Here's my bluetooth config below:

 Apple Bluetooth Software Version:	5.0.1f7

  Hardware, Features, and Settings:
  Bluetooth Low Energy Supported:	Yes
  Manufacturer:	Broadcom
  Transport:	USB
  Chipset:	20702B0
  Firmware Version:	v127 c9208
  Bluetooth Power:	On

For info, latest Chrome Mac Canary still fails on me at that time (57.0.2926.0).
Sadly, on jlebel@ MacBook machine, this patch fails to find the bluetooth device we're looking for.

Comment 8 by jlebel@chromium.org, Nov 21 2016

My computer:
  Apple Bluetooth Software Version:	4.4.6f1 17910
  Bluetooth Low Energy Supported:	Yes
  Manufacturer:	Broadcom
  Transport:	USB
  Chipset:	20702B0
  Firmware Version:	v118 c9121

(with 10.11.6, MacBook Pro (Retina, 15-inch, Mid 2014))
Here's a solution that should help Web Bluetooth scan situation on macOS I believe:

0:00 User starts scan
0:05 User didn't pick any device yet, let's update timer value to X
0:10 User still didn't pick any device, let's update timer value to Y
...
0:25 User picked device, let's reset timer value.


What do you folks think about this?
Status: WontFix (was: Assigned)
We scan for a longer period of time now. I agree with jyasskin's comment 4 that we shouldn't try to work around the OS level logic for managing the scanning parameters. This is either a peripheral interval bug or a macOS bug.

Reopen if folks strongly disagree.

Sign in to add a comment