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

Issue 632466 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

BLE advertising stops when a device is connected

Project Member Reported by lfabian@google.com, Jul 28 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36

Steps to reproduce the problem:
1. Enable BLE advertising using chrome.bluetoothLowEnergy.registerAdvertisement()
2. Scan for advertising using hcitool lescan --duplicates | grep 'YOURMAC'
3. Connect to the device from another Chromebox using bluetoothctl --> connect YOURMAC
4. Hit enter to see if the device shows up again - you wouldn't see the device (THIS IS THE BUG)
5. Disconnect from the device, and you will see the device again

What is the expected behavior?
Advertising shouldn't stop.

What went wrong?
Step 4 on repro.

Did this work before? N/A 

Chrome version: 53.0.2772.0  Channel: n/a
OS Version: 8481
Flash Version:
 

Comment 1 by r...@chromium.org, Jul 28 2016

Cc: mcchou@chromium.org puthik@chromium.org jleong@chromium.org josephsih@chromium.org snanda@chromium.org
Components: IO>Bluetooth OS>Systems>Bluetooth
Labels: -Pri-2 -Via-Wizard M-54 Pri-1
Owner: r...@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 2 by ortuno@chromium.org, Jul 28 2016

This is WAI isn't it? I don't know of any Chrome OS devices that are able to advertise and hold a gatt connection at the same time. If I remember correctly only devices with BT 4.2 are able to do this.

Comment 3 by r...@chromium.org, Jul 28 2016

I believe Luis is saying that advertising from the local machine stops if another device connects to the GATT server running on the local machine. That shouldn't require 4.2?

I could be completely wrong, but my understanding was that you cannot advertise and make "outgoing" GATT connections.

Comment 4 by ortuno@chromium.org, Jul 28 2016

Yup, that's what I meant. I was under the impression that you needed support for multiple advertisements for that which was only added in 4.2. I actually never read the spec regarding this but that was my understanding based on the Android APIs, so I could be completely wrong.

Comment 5 by r...@chromium.org, Jul 28 2016

Labels: -Pri-1 -M-54 Pri-2
Ah. I'll look in the 4.0 spec again and mark the bug accordingly.

Comment 6 by mcchou@google.com, Jul 29 2016

We talked about this once, the restrictions are written in [Vol.6 Part B. 1.1] of spec 4.0 and spec 4.2.

In 4.0, these two restrictions explain why the advertising stops when the device is connected as a slave role.
This combination is also marked as prohibited in Table 1.1.
 (1) When entered from the Advertising State, the Connection State
shall be in the Slave Role.
 (2) If the Link Layer is already operating in the Connection State or Initiating
State, the Link Layer shall not operate in the Advertising State with a type of
advertising that could result in the Link Layer entering the Connection State
in the Slave Role.

Although in 4.2, (1) still applies, it has different rules on roles and the allowed number of state machine
This combination can be found in Table 1.1 Combination A at row 3(if starting from 0).
The Link Layer may have multiple instances of the Link Layer state machine, and multiple state machines can be active at a time, so one state machine can be in connection (Slave role) while there is another state machine does the advertising.

Maintaining a connection and a advertising in parallel may not be possible even if the controller can do it, depending on the parameters used it wouldn't be possible for the scheduler to attend both modes. Also it is very weird to continue, at least it should advertise as connectable again.

Btw, the multiple advertisement support doesn't seems to be an adopted Bluetooth concept, there doesn't exist any HCI command for it, so it is probably only available as a vendor command to Android, etc, which is why is so complicated to treat it as there is no document explaining what should be the expected behavior. In fact in this matter I think it complicates the scheduler job even more, because the could be multiple advertisement competing for the baseband which could starve any ongoing connection.


Project Member

Comment 8 by sheriffbot@chromium.org, Jul 29 2016

Labels: Hotlist-Google

Comment 9 by r...@chromium.org, Jul 29 2016

Status: WontFix (was: Assigned)
WAI then.

Sign in to add a comment