[PATCH] Fix Apple Wireless keyboard pairing?

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

 



Heya,

If anyone has an Apple Wireless keyboard to test pairing against. I
believe the attached patch to be correct. Otherwise Apple keyboards
(which use the same OUI) will get a PIN of 0000.

Cheers
diff --git a/wizard/main.c b/wizard/main.c
index 0854913..0340063 100644
--- a/wizard/main.c
+++ b/wizard/main.c
@@ -62,9 +62,10 @@ static gboolean pincode_callback(DBusGMethodInvocation *context,
 	const char *pincode = target_pincode;
 	gchar *text;
 
-	/* Apple Wireless and Mighty Mouse */
-	if (g_str_has_prefix(target_address, "00:0A:95:") == TRUE ||
-			g_str_has_prefix(target_address, "00:14:51:") == TRUE)
+	/* Apple Wireless and Mighty Mouse, and just the mice */
+	if ((g_str_has_prefix(target_address, "00:0A:95:") == TRUE ||
+			g_str_has_prefix(target_address, "00:14:51:") == TRUE) &&
+	    target_type == BLUETOOTH_TYPE_MOUSE)
 		pincode = "0000";
 
 	/* Most headsets are using 0000 as pincode */

[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