Browse Source

Added Bluetooth Pairing Blog Entry

Thomas Buck 9 years ago
parent
commit
71ced817d3
1 changed files with 42 additions and 0 deletions
  1. 42
    0
      input/blog/2015/2015_07_09_bootcamp_bluetooth_pairing.md

+ 42
- 0
input/blog/2015/2015_07_09_bootcamp_bluetooth_pairing.md View File

1
+title: Blog
2
+post: Automatic Bluetooth Pairing in OS X and Windows
3
+date: 2015-07-09
4
+comments: true
5
+flattr: true
6
+twitter: xythobuz
7
+---
8
+
9
+## {{ page["post"] }}
10
+<!--%
11
+from datetime import datetime
12
+date = datetime.strptime(page["date"], "%Y-%m-%d").strftime("%B %d, %Y")
13
+print "*Posted at %s.*" % date
14
+%-->
15
+
16
+I’m using an Apple Magic Trackpad that is connected to my Computer using Bluetooth. It works under Mac OS X and also under Windows, but it does not pair automatically out-of-the-box. If it was previously paired with OS X, it has to be re-paired under Windows, and also the other way round.
17
+
18
+The reason for this is simple. These Bluetooth devices not only identify each other using their MAC addresses, they also share an encryption key that is stored in the Trackpad and the OS, and is generated in the pairing process. If this key is the same on both OS, the Bluetooth device will pair automatically every time.
19
+
20
+In OS X, the keys are stored in a plist file and can be retrieved like this:
21
+
22
+    sudo defaults read /private/var/root/Library/Preferences/blued.plist
23
+
24
+To find the MAC addresses of your adapter and device, alt-click on the bluetooth logo in the OS X menu bar.
25
+
26
+In Windows, the key is stored in the registry at:
27
+
28
+    HKLM/System/CurrentControlSet/services/BTHPORT/Parameters/Keys/*MAC*
29
+
30
+In the Windows 10 Technical Preview, it’s not this exact location, but somewhere else in BTHPORT. You can’t miss it.
31
+
32
+You need to take special care when accessing these keys. Start the registry editor using [PsExec from PsTools](https://technet.microsoft.com/de-de/sysinternals/bb897553.aspx):
33
+
34
+    psexec -s -i regedit
35
+
36
+But you can’t just copy-paste the key from one OS to the other, there is a trick to it. The key is stored backwards in Windows. Because the key is displayed to the user as ASCII-Hex bytes, you have to read the key backwards in pairs of two characters. For example:
37
+
38
+    98542FF9 88E19449 475250E1 3943255B (Shown in OS X)
39
+    5B254339 E1505247 4994E188 F92F5498 (Entered in Windows)
40
+
41
+Thanks go to [pacnow for figuring this out](https://discussions.apple.com/thread/3113227?start=0&tstart=0). And [Soorma07 even made an Apple Script](https://github.com/Soorma07/OS-X-Bluetooth-Pairing-Value-To-Windows-Value) to automate parts of this process.
42
+

Loading…
Cancel
Save