Commit: 6d55c7d7fd0da6bea7adbabac09cae2023a62fcd
Parent: d7bb2abed626a979037a042c02b9a4027c6eb943
Author: Cheng Jiang <quic_chejiang@quicinc.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2024-10-29 16:40:13
Tree: ee8d3e4ba78308db892af906b2c60115caad608c

device: Fix Device.Pair using wrong address type For a BLE-only device, if the device is already paired and the upper layer attempts to pair it again, the bdaddr_type will be set to BDADDR_BREDR since the LE connection is already bonded. This causes the device to use the BR/EDR bearer, which stalls the pairing procedure and requires waiting for the pairing timeout. The bluetoothctl log below shows the error result: [bluetooth]# pair ED:8E:0E:B3:85:C1 Attempting to pair with ED:8E:0E:B3:85:C1 Pairing successful [RAPOO BleMouse]# disconnect ED:8E:0E:B3:85:C1 Attempting to disconnect from ED:8E:0E:B3:85:C1 [RAPOO BleMouse]# [bluetooth]# devices Paired Device ED:8E:0E:B3:85:C1 RAPOO BleMouse [bluetooth]# scan le SetDiscoveryFilter success Discovery started [CHG] Controller 8C:FD:F0:21:84:17 Discovering: yes [CHG] Device ED:8E:0E:B3:85:C1 RSSI: -38 [bluetooth]# scan off Discovery stopped [bluetooth]# pair ED:8E:0E:B3:85:C1 Attempting to pair with ED:8E:0E:B3:85:C1 [bluetooth]# Failed to pair: org.freedesktop.DBus.Error.NoReply

Diffstat

M src/device.c | 23 ++++++++++++++++++- - - - -

1 files changed, 18 insertions(+), 5 deletions(-)

View Full Diff | Patch