Diff between 8c910c44daff142202e2fe8c6c58bcadad527295 and fc516c2c7f22eb28ad41bded4d53d746677d4589

Changed Files

File Additions Deletions Status
src/adapter.c +11 -0 modified

Full Patch

diff --git a/src/adapter.c b/src/adapter.c
index 952a565..e98b604 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -7300,6 +7300,17 @@ static void read_version_complete(uint8_t status, uint16_t length,
 		abort();
 	}
 
+	/*
+	 * Pre-1.7 mgmt kernel versions don't support outgoing pairing
+	 * with pairable set to false, so we must always keep pairable
+	 * as true.
+	 */
+	if (MGMT_VERSION(mgmt_version, mgmt_revision) < MGMT_VERSION(1, 7) &&
+						!main_opts.always_pairable) {
+		info("Enabling AlwaysPairable because of old kernel");
+		main_opts.always_pairable = TRUE;
+	}
+
 	DBG("sending read supported commands command");
 
 	/*