Monday, 9 October 2017

When Bluetooth pairing goes wrong

Having recently determined that there is only one decent* full-sized Bluetooth keyboard ever made (namely the first-generation Apple Wireless Keyboard**) and then acquired one, the next step was to pair it with Windows.  There are various sets of instructions around, all of which point to a critical flaw in the Windows pairing process.

For whatever reason, Windows 7 does not detect that the Apple Wireless Keyboard needs a pairing code entering.  So it just sits there with a spinning "Connecting..." message until it times out.  The solution to that is to enter a pairing code on the keyboard and press Enter (how are you supposed to guess that?!), which will take Windows to the next step where you enter the pairing code in the dialog.  Nineteen times out of twenty, that fails.  Either Windows notices that the pairing fails, or Windows thinks that it has succeeded, but it has actually failed and the keyboard is still in pairing mode.

There is no way to persuade Windows to offer a choice of how to pair (don't use a code; generate a code; use a fixed code from the device).  Ironically Windows does have such a step in the wizard, but it doesn't show up (unless you press Enter on the keyboard without typing a code, and even then only rarely, and when it does show up, whichever method you choose, pairing fails.)  Ultimately, though, the links in the wizard offer no help.  Bluetooth is supposed to "just work", but when it doesn't, there needs to be another way.  Microsoft offers no other way than this wizard to pair Bluetooth devices.

Fortunately, someone else does.  By using btpair from the free Bluetooth command line tools, it's possible to specify the pairing code up front in Windows, then enter the pairing code on the keyboard, and after a few attempts, pairing succeeds.

Maybe the Apple keyboard doesn't behave the way it should - and since it's over a decade old, it will likely be using version 1.x of the Bluetooth protocol.  But this isn't the only device that has trouble pairing under Windows 7 - there are others, and in each case there's no way of recovering.  Since the keyboard can be paired, Windows should offer a way to do it.

All it would need is for Windows to at least offer the ability to choose the pairing method manually, and users could fix the issue themselves without having to download additional utilities.  I don't know if this is addressed in newer versions of Windows, but even "just works" technology should have a backup plan for when it just doesn't.


* "decent" for me means "has nice, full-travel keys, and all keys including the right Windows key are present; has the same layout as a regular PC keyboard; and the arrow key cluster and the six keys above it are in standard formation".  The right Windows key makes it easy to lock the computer by pressing Win+L with one hand.

** "But wait, an Apple keyboard wouldn't have Windows keys?" - the Command keys on an Apple keyboard work like Windows keys when connected to a PC.  The F14-F16 keys can be mapped to PrtSc/Scroll Lock/Break using the magnificent AutoHotkey, with which I also turned F13 into the context-menu key.

No comments:

Post a Comment