From: Bastien Nocera <hadess@hadess.net>
To: BlueZ development <linux-bluetooth@vger.kernel.org>
Subject: [PATCH] Fix Apple Wireless keyboard pairing?
Date: Wed, 15 Oct 2008 02:06:23 +0100 [thread overview]
Message-ID: <1224032783.5268.1418.camel@cookie.hadess.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 200 bytes --]
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
[-- Attachment #2: bluez-apple-wireless-kbd.patch --]
[-- Type: text/x-patch, Size: 715 bytes --]
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 */
next reply other threads:[~2008-10-15 1:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-15 1:06 Bastien Nocera [this message]
2008-10-15 15:20 ` [PATCH] Fix Apple Wireless keyboard pairing? Marcel Holtmann
2008-10-15 18:40 ` Mario Limonciello
[not found] ` <48F63904.6090902@dell.com>
2008-10-15 21:32 ` Bastien Nocera
2008-10-15 21:41 ` Mario Limonciello
2008-10-23 4:54 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1224032783.5268.1418.camel@cookie.hadess.net \
--to=hadess@hadess.net \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox