Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] adapter: remove bondable mode hijacking when setting IO capabilities
@ 2026-09-22 11:12 Michal Dzik
  2026-09-22 12:24 ` [BlueZ] " bluez.test.bot
  2026-10-07 12:05 ` bluez.test.bot
  0 siblings, 2 replies; 6+ messages in thread
From: Michal Dzik @ 2026-09-22 11:12 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Michal Dzik

Setting IO capabilities could implicitly toggle bondable mode on or off.
This behavior was introduced by "core: Add AlwaysPairable to main.conf"
and creates unwanted side effects for external pairing handling,
specifically glitches in the Pairable property during BlueZ startup.
The unnecessary setting of MGMT_OP_SET_BONDABLE has no basis in the
Bluetooth specification and should be removed.
---
 src/adapter.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 33e1ff07a..a1f3d058d 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -9514,14 +9514,8 @@ int adapter_set_io_capability(struct btd_adapter *adapter,
 
 	if (!btd_opts.pairable) {
 		if (io_cap == MGMT_IO_CAPABILITY_INVALID) {
-			if (adapter->current_settings & MGMT_SETTING_BONDABLE)
-				set_mode(adapter, MGMT_OP_SET_BONDABLE, 0x00);
-
 			return 0;
 		}
-
-		if (!(adapter->current_settings & MGMT_SETTING_BONDABLE))
-			set_mode(adapter, MGMT_OP_SET_BONDABLE, 0x01);
 	} else if (io_cap == MGMT_IO_CAPABILITY_INVALID)
 		io_cap = MGMT_IO_CAPABILITY_NOINPUTNOOUTPUT;
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-07 12:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-22 11:12 [PATCH BlueZ] adapter: remove bondable mode hijacking when setting IO capabilities Michal Dzik
2026-09-22 12:24 ` [BlueZ] " bluez.test.bot
2026-09-22 15:12   ` Luiz Augusto von Dentz
2026-09-23 15:19     ` Michal Dzik
2026-09-23 15:52       ` Luiz Augusto von Dentz
2026-10-07 12:05 ` bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox