* [PATCH BlueZ] device: Fix airpods pairing
@ 2024-04-05 9:00 Frédéric Danis
2024-04-05 10:36 ` [BlueZ] " bluez.test.bot
2024-04-05 15:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Frédéric Danis @ 2024-04-05 9:00 UTC (permalink / raw)
To: linux-bluetooth
Apple Airpods are discoverable and pairable in BREDR mode, but also
advertise in unconnectable mode in LE with the same Public address, at the
same time. As the pairing process uses the latest seen address, sometimes
it uses the LE Public address to pair, which fails.
This commit introduces the connectable state when selecting the bearer to
use for a connection. The last_seen value is used only for connectable
devices.
---
src/device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/device.c b/src/device.c
index ac0b0e003..1d4b8ab36 100644
--- a/src/device.c
+++ b/src/device.c
@@ -2537,13 +2537,13 @@ static uint8_t select_conn_bearer(struct btd_device *dev)
if (dev->bdaddr_type == BDADDR_LE_RANDOM)
return dev->bdaddr_type;
- if (dev->bredr_state.last_seen) {
+ if (dev->bredr_state.connectable && dev->bredr_state.last_seen) {
bredr_last = current - dev->bredr_state.last_seen;
if (bredr_last > SEEN_TRESHHOLD)
bredr_last = NVAL_TIME;
}
- if (dev->le_state.last_seen) {
+ if (dev->le_state.connectable && dev->le_state.last_seen) {
le_last = current - dev->le_state.last_seen;
if (le_last > SEEN_TRESHHOLD)
le_last = NVAL_TIME;
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [BlueZ] device: Fix airpods pairing
2024-04-05 9:00 [PATCH BlueZ] device: Fix airpods pairing Frédéric Danis
@ 2024-04-05 10:36 ` bluez.test.bot
2024-04-05 15:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2024-04-05 10:36 UTC (permalink / raw)
To: linux-bluetooth, frederic.danis
[-- Attachment #1: Type: text/plain, Size: 948 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=841718
---Test result---
Test Summary:
CheckPatch PASS 1.48 seconds
GitLint PASS 0.31 seconds
BuildEll PASS 24.53 seconds
BluezMake PASS 1617.20 seconds
MakeCheck PASS 12.91 seconds
MakeDistcheck PASS 176.72 seconds
CheckValgrind PASS 245.82 seconds
CheckSmatch PASS 349.97 seconds
bluezmakeextell PASS 119.24 seconds
IncrementalBuild PASS 1390.81 seconds
ScanBuild PASS 990.97 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ] device: Fix airpods pairing
2024-04-05 9:00 [PATCH BlueZ] device: Fix airpods pairing Frédéric Danis
2024-04-05 10:36 ` [BlueZ] " bluez.test.bot
@ 2024-04-05 15:00 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2024-04-05 15:00 UTC (permalink / raw)
To: =?utf-8?b?RnLDqWTDqXJpYyBEYW5pcyA8ZnJlZGVyaWMuZGFuaXNAY29sbGFib3JhLmNvbT4=?=
Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Fri, 5 Apr 2024 11:00:50 +0200 you wrote:
> Apple Airpods are discoverable and pairable in BREDR mode, but also
> advertise in unconnectable mode in LE with the same Public address, at the
> same time. As the pairing process uses the latest seen address, sometimes
> it uses the LE Public address to pair, which fails.
>
> This commit introduces the connectable state when selecting the bearer to
> use for a connection. The last_seen value is used only for connectable
> devices.
>
> [...]
Here is the summary with links:
- [BlueZ] device: Fix airpods pairing
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=98bed16d254c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-05 15:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-05 9:00 [PATCH BlueZ] device: Fix airpods pairing Frédéric Danis
2024-04-05 10:36 ` [BlueZ] " bluez.test.bot
2024-04-05 15:00 ` [PATCH BlueZ] " patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).