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

Issue 691426 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Bluetooth: enlarge connection supervision timeout

Project Member Reported by josephsih@chromium.org, Feb 13 2017

Issue description

Current default supervision timeout in Bluez is 420 ms. This value seems a bit too short which makes the BLE connection less stable. 

  As an example, in  issue 607384 , the marvel's controller (or the bluetooth peripheral) failed to respond within the supervision timeout window, the connection was lost.

  If either BLE peripheral or central device fails to respond within the timeout window, the connection is considered lost. Depending on the situation, the connection may or may not be able to re-establish. Even the connection could be re-established, users may still find the peripheral behave unsmoothly. In addition, it is also possible that the environment may be noisy enough to interfere the RF signal.

  Hence, it seems reasonable to enlarge the default supervision timeout from 420 ms to 4 seconds. There are some data for the new value:
Android has the supervision timeout value currently set to 20 seconds. This makes the connection more stable. However, the very long value looks like a bug and is being tracked in the android issue (https://code.google.com/p/android/issues/detail?id=197129).
iOS design guidelines says that the supervision timeout value should not be longer than 6 seconds to connect to an iOS device.
Many applications set the values between 4 seconds and 6 seconds.

  The cons are that it would take longer for the central device, i.e., the chromebook, to find that a peripheral is lost (due to out of range or power down). However, this seems tolerable. Besides, a peripheral still has the right to negotiate proper connection parameters with the central device based on the services it provides.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 25 2017

Labels: merge-merged-chromeos-3.14
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/1c12956e465eb4628b7738d1abf23ebd17f20777

commit 1c12956e465eb4628b7738d1abf23ebd17f20777
Author: Joseph Hwang <josephsih@chromium.org>
Date: Sat Feb 25 01:22:42 2017

CHROMIUM: bluetooth: enlarge supervision timeout to 2 secs

Enlarge the supervision timeout for more stable connections.

BUG= chromium:691426 
TEST=Perform the following steps
1. cros_workon_make and update_kernel to a DUT.
2. On the DUT, run btmon and connect a BLE peripheral to the DUT.
3. Observe the following message in the btmon output

  < HCI Command: LE Create Connection (0x08|0x000d) plen 25
      ...
      Supervision timeout: 2000 msec (0x00c8)
      ...

4. Note that a peripheral may request to update the parameter
   after the above connection is established. E.g., when using
   a Logitech MX Anywhere 2, one would see

  > ACL Data RX: Handle 3585 flags 0x02 dlen 16
      LE L2CAP: Connection Parameter Update Request (0x12) ident 2 len 8

  < HCI Command: LE Connection Update (0x08|0x0013) plen 14
      ...
      Supervision timeout: 2160 msec (0x00d8)
      ...

Change-Id: I380e8af870e8f5c833d788cdb8bd7b84f827fbb9
Reviewed-on: https://chromium-review.googlesource.com/441506
Commit-Ready: Miao-chen Chou <mcchou@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: François Beaufort <fbeaufort@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/1c12956e465eb4628b7738d1abf23ebd17f20777/net/bluetooth/hci_core.c

Comment 2 by st...@chromium.org, Mar 3 2017

Cc: r...@chromium.org

Comment 3 by st...@chromium.org, Mar 3 2017

Cc: -st...@chromium.org
Status: Fixed (was: Started)
The supervision timeout has been set to 2 seconds. Close this issue.
Status: Verified (was: Fixed)
Project Member

Comment 6 by bugdroid1@chromium.org, May 11 2017

Labels: merge-merged-chromeos-3.8
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/99225fddb0cd76952190afbb7b74bd3fb321dfdc

commit 99225fddb0cd76952190afbb7b74bd3fb321dfdc
Author: Joseph Hwang <josephsih@chromium.org>
Date: Thu May 11 16:40:29 2017

CHROMIUM: bluetooth: enlarge supervision timeout to 2 secs

Enlarge the supervision timeout for more stable connections.

BUG= chromium:691426 
TEST=Perform the following steps
1. cros_workon_make and update_kernel to a DUT.
2. On the DUT, run btmon and connect a BLE peripheral to the DUT.
3. Observe the following message in the btmon output

  < HCI Command: LE Create Connection (0x08|0x000d) plen 25
      ...
      Supervision timeout: 2000 msec (0x00c8)
      ...

4. Note that a peripheral may request to update the parameter
   after the above connection is established. E.g., when using
   a Logitech MX Anywhere 2, one would see

  > ACL Data RX: Handle 3585 flags 0x02 dlen 16
      LE L2CAP: Connection Parameter Update Request (0x12) ident 2 len 8

  < HCI Command: LE Connection Update (0x08|0x0013) plen 14
      ...
      Supervision timeout: 2160 msec (0x00d8)
      ...

Change-Id: I380e8af870e8f5c833d788cdb8bd7b84f827fbb9
Reviewed-on: https://chromium-review.googlesource.com/441506
Commit-Ready: Miao-chen Chou <mcchou@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Franois Beaufort <fbeaufort@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
(cherry picked from commit 1c12956e465eb4628b7738d1abf23ebd17f20777)
Reviewed-on: https://chromium-review.googlesource.com/497237
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>

[modify] https://crrev.com/99225fddb0cd76952190afbb7b74bd3fb321dfdc/net/bluetooth/hci_core.c

Project Member

Comment 7 by bugdroid1@chromium.org, May 11 2017

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/6dee22a703a1811dbaddc8d7690b0bef527296b7

commit 6dee22a703a1811dbaddc8d7690b0bef527296b7
Author: Joseph Hwang <josephsih@chromium.org>
Date: Thu May 11 16:40:28 2017

CHROMIUM: bluetooth: enlarge supervision timeout to 2 secs

Enlarge the supervision timeout for more stable connections.

BUG= chromium:691426 
TEST=Perform the following steps
1. cros_workon_make and update_kernel to a DUT.
2. On the DUT, run btmon and connect a BLE peripheral to the DUT.
3. Observe the following message in the btmon output

  < HCI Command: LE Create Connection (0x08|0x000d) plen 25
      ...
      Supervision timeout: 2000 msec (0x00c8)
      ...

4. Note that a peripheral may request to update the parameter
   after the above connection is established. E.g., when using
   a Logitech MX Anywhere 2, one would see

  > ACL Data RX: Handle 3585 flags 0x02 dlen 16
      LE L2CAP: Connection Parameter Update Request (0x12) ident 2 len 8

  < HCI Command: LE Connection Update (0x08|0x0013) plen 14
      ...
      Supervision timeout: 2160 msec (0x00d8)
      ...

Change-Id: I380e8af870e8f5c833d788cdb8bd7b84f827fbb9
Reviewed-on: https://chromium-review.googlesource.com/441506
Commit-Ready: Miao-chen Chou <mcchou@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Franois Beaufort <fbeaufort@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
(cherry picked from commit 1c12956e465eb4628b7738d1abf23ebd17f20777)
Reviewed-on: https://chromium-review.googlesource.com/497234
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>

[modify] https://crrev.com/6dee22a703a1811dbaddc8d7690b0bef527296b7/net/bluetooth/hci_core.c

Project Member

Comment 8 by bugdroid1@chromium.org, May 11 2017

Labels: merge-merged-chromeos-3.18
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/2c04a8c09fa5dbb78388352451d4d25c77d9d731

commit 2c04a8c09fa5dbb78388352451d4d25c77d9d731
Author: Joseph Hwang <josephsih@chromium.org>
Date: Thu May 11 16:40:30 2017

CHROMIUM: bluetooth: enlarge supervision timeout to 2 secs

Enlarge the supervision timeout for more stable connections.

BUG= chromium:691426 
TEST=Perform the following steps
1. cros_workon_make and update_kernel to a DUT.
2. On the DUT, run btmon and connect a BLE peripheral to the DUT.
3. Observe the following message in the btmon output

  < HCI Command: LE Create Connection (0x08|0x000d) plen 25
      ...
      Supervision timeout: 2000 msec (0x00c8)
      ...

4. Note that a peripheral may request to update the parameter
   after the above connection is established. E.g., when using
   a Logitech MX Anywhere 2, one would see

  > ACL Data RX: Handle 3585 flags 0x02 dlen 16
      LE L2CAP: Connection Parameter Update Request (0x12) ident 2 len 8

  < HCI Command: LE Connection Update (0x08|0x0013) plen 14
      ...
      Supervision timeout: 2160 msec (0x00d8)
      ...

Change-Id: I380e8af870e8f5c833d788cdb8bd7b84f827fbb9
Reviewed-on: https://chromium-review.googlesource.com/441506
Commit-Ready: Miao-chen Chou <mcchou@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Franois Beaufort <fbeaufort@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
(cherry picked from commit 1c12956e465eb4628b7738d1abf23ebd17f20777)
Reviewed-on: https://chromium-review.googlesource.com/497235
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>

[modify] https://crrev.com/2c04a8c09fa5dbb78388352451d4d25c77d9d731/net/bluetooth/hci_core.c

Project Member

Comment 9 by bugdroid1@chromium.org, May 11 2017

Labels: merge-merged-chromeos-3.10
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/8600f4bec11528d5348db58dff24544daa578e2b

commit 8600f4bec11528d5348db58dff24544daa578e2b
Author: Joseph Hwang <josephsih@chromium.org>
Date: Thu May 11 16:40:27 2017

CHROMIUM: bluetooth: enlarge supervision timeout to 2 secs

Enlarge the supervision timeout for more stable connections.

BUG= chromium:691426 
TEST=Perform the following steps
1. cros_workon_make and update_kernel to a DUT.
2. On the DUT, run btmon and connect a BLE peripheral to the DUT.
3. Observe the following message in the btmon output

  < HCI Command: LE Create Connection (0x08|0x000d) plen 25
      ...
      Supervision timeout: 2000 msec (0x00c8)
      ...

4. Note that a peripheral may request to update the parameter
   after the above connection is established. E.g., when using
   a Logitech MX Anywhere 2, one would see

  > ACL Data RX: Handle 3585 flags 0x02 dlen 16
      LE L2CAP: Connection Parameter Update Request (0x12) ident 2 len 8

  < HCI Command: LE Connection Update (0x08|0x0013) plen 14
      ...
      Supervision timeout: 2160 msec (0x00d8)
      ...

Change-Id: I380e8af870e8f5c833d788cdb8bd7b84f827fbb9
Reviewed-on: https://chromium-review.googlesource.com/441506
Commit-Ready: Miao-chen Chou <mcchou@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Franois Beaufort <fbeaufort@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
(cherry picked from commit 1c12956e465eb4628b7738d1abf23ebd17f20777)
Reviewed-on: https://chromium-review.googlesource.com/497236
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>

[modify] https://crrev.com/8600f4bec11528d5348db58dff24544daa578e2b/net/bluetooth/hci_core.c

Project Member

Comment 10 by bugdroid1@chromium.org, May 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/8600f4bec11528d5348db58dff24544daa578e2b

commit 8600f4bec11528d5348db58dff24544daa578e2b
Author: Joseph Hwang <josephsih@chromium.org>
Date: Thu May 11 16:40:27 2017

CHROMIUM: bluetooth: enlarge supervision timeout to 2 secs

Enlarge the supervision timeout for more stable connections.

BUG= chromium:691426 
TEST=Perform the following steps
1. cros_workon_make and update_kernel to a DUT.
2. On the DUT, run btmon and connect a BLE peripheral to the DUT.
3. Observe the following message in the btmon output

  < HCI Command: LE Create Connection (0x08|0x000d) plen 25
      ...
      Supervision timeout: 2000 msec (0x00c8)
      ...

4. Note that a peripheral may request to update the parameter
   after the above connection is established. E.g., when using
   a Logitech MX Anywhere 2, one would see

  > ACL Data RX: Handle 3585 flags 0x02 dlen 16
      LE L2CAP: Connection Parameter Update Request (0x12) ident 2 len 8

  < HCI Command: LE Connection Update (0x08|0x0013) plen 14
      ...
      Supervision timeout: 2160 msec (0x00d8)
      ...

Change-Id: I380e8af870e8f5c833d788cdb8bd7b84f827fbb9
Reviewed-on: https://chromium-review.googlesource.com/441506
Commit-Ready: Miao-chen Chou <mcchou@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Franois Beaufort <fbeaufort@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
(cherry picked from commit 1c12956e465eb4628b7738d1abf23ebd17f20777)
Reviewed-on: https://chromium-review.googlesource.com/497236
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>

[modify] https://crrev.com/8600f4bec11528d5348db58dff24544daa578e2b/net/bluetooth/hci_core.c

Sign in to add a comment