[bluez PATCH 0/1] policy: Fix connection stealing with Airpods

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luiz,

When a2dp-sink was added to the reconnection policy, it exposed a bug in
Airpods which were incorrectly emitting Connection Timeout when
connecting to a new device. As a result, Chromebooks started
reconnecting immediately (link loss) and inadvertently "stole"
connections. See hci trace below:

> HCI Event: Disconnect Complete (0x05) plen 4                 #1680 [hci0] 62.656436
        Status: Success (0x00)
        Handle: 256
        Reason: Connection Timeout (0x08)
@ MGMT Event: Device Disconnected (0x000c) plen 8              {0x0004} [hci0] 62.656510
        BR/EDR Address: E4:90:FD:7D:E7:5F (OUI E4-90-FD)
        Reason: Connection timeout (0x01)
@ MGMT Event: Device Disconnected (0x000c) plen 8              {0x0002} [hci0] 62.656510
        BR/EDR Address: E4:90:FD:7D:E7:5F (OUI E4-90-FD)
        Reason: Connection timeout (0x01)
@ MGMT Event: Device Disconnected (0x000c) plen 8              {0x0001} [hci0] 62.656510
        BR/EDR Address: E4:90:FD:7D:E7:5F (OUI E4-90-FD)
        Reason: Connection timeout (0x01)
@ MGMT Event: Device Disconnected (0x000c) plen 8              {0x0003} [hci0] 62.656510
        BR/EDR Address: E4:90:FD:7D:E7:5F (OUI E4-90-FD)
        Reason: Connection timeout (0x01)
< HCI Command: Write Scan Enable (0x03|0x001a) plen 1          #1681 [hci0] 62.668156
        Scan enable: Page Scan (0x02)
> HCI Event: Command Complete (0x0e) plen 4                    #1682 [hci0] 62.670442
      Write Scan Enable (0x03|0x001a) ncmd 2
        Status: Success (0x00)
< HCI Command: Create Connection (0x01|0x0005) plen 13         #1683 [hci0] 64.090171
        Address: E4:90:FD:7D:E7:5F (OUI E4-90-FD)
        Packet type: 0xcc18
          DM1 may be used
          DH1 may be used
          DM3 may be used
          DH3 may be used
          DM5 may be used
          DH5 may be used
        Page scan repetition mode: R2 (0x02)
        Page scan mode: Mandatory (0x00)
        Clock offset: 0x0000
        Role switch: Allow slave (0x01)
> HCI Event: Command Status (0x0f) plen 4                      #1684 [hci0] 64.090446
      Create Connection (0x01|0x0005) ncmd 1

This patch separates the ReconnectUUIDs by adding a ReconnectResumeUUIDs
and distinguishes reconnections that occur on timeout vs. resume.

I've run the following tests:

- Check that Airpods changing to a different device doesn't cause
  a reconnection with this change.
- Check that adding a2dp-sink to ReconnectUUIDs will cause the original
  issue to be seen.
- Make sure Airpods are reconnected on resume.
- Make sure other headphones are reconnected on resume (tested Anker
  Soundcore Life Q20 and ATH-M50xBT)
- Run bluetooth_AdapterSRHealth.sr_reconnect_a2dp (ChromeOS end-to-end
  test)

Thanks
Abhishek



Abhishek Pandit-Subedi (1):
  policy: Refactor reconnect policy for resume

 plugins/policy.c | 72 ++++++++++++++++++++++++++++++++++++------------
 src/main.conf    |  9 +++++-
 2 files changed, 62 insertions(+), 19 deletions(-)

-- 
2.29.2.576.ga3fc446d84-goog




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux