Skip to content

Bluetooth keyboard pairing without code entry

by Layne on June 14, 2010

This post explains how to connect a Bluetooth keyboard to your Linux/Mac/Windows computer without having to enter a pairing code. This is useful if you have a broken key on your keyboard, if you want to automate the pairing from a script, or you are building a custom keyboard that doesn’t have all the number keys connected (that’s me!).

Linux

Ubuntu Linux LogoBased on the Ubuntu Community Documentation for Bluetooth Setup, these commands were tested on Ubuntu Lucid Lynx 10.4, but should work on other version of Linux provided you can figure out how to install the necessary Bluetooth utilities.

First, we need to scan the available devices. Make sure your keyboard is in discoverable mode (push the button) before running the scan command.

matthew@broderick:~$ hcitool scan
Scanning ...
        00:12:A1:63:34:6E    BluePacket Bluetooth Wireless Keyboard

This provides us with the device ID, similar to the MAC address of a network card. Copy this code to the clipboard for the next command. We need the hidd command, which is part of the bluez-compat package. On Ubuntu, you can install it with this command:

matthew@broderick:~$ sudo apt-get install bluez-compat

Next, we need to manually connect to the keyboard device ID:

matthew@broderick:~$ sudo hidd --connect 00:12:A1:63:34:6E

After this command finishes, your keyboard should be working with Linux. Try typing characters into vim or gedit, to make sure it’s working properly. Congratulations!

Windows 7

Windows 7 LogoThis solution was found at one of the Microsoft support forums. I know, I had no idea that Microsoft had support forums, either. Even more surprisingly, I was able to obtain useful information from a Microsoft webpage. To start, open up the Control Panel, and go to “Hardware and Sound”. Select “Add a Bluetooth device”:

When Windows is searching for your Bluetooth devices, put your keyboard into pairing mode (press the button). When it shows up in the list, don’t double click it! Instead, right-click on the keyboard device and select “Properties”:

In the window that opens, “Keyboard Properties”, wait a couple seconds for the services panel to load. Once it has loaded, check the box for “Drivers for keyboard, mice, etc. (HID)”. Click on “OK” to close the window.

Windows will load the drivers for your keyboard. After everything settles down, your keyboard should be working with Windows. Try typing characters into Notepad, to make sure it’s working properly. Congratulations!

Mac OSX

Apple LogoDespite a couple hours of searching the web and trying all possible menu options, I was unable to figure out how to pair a bluetooth keyboard without having to type in a randomly-generated numeric passcode. If you know how to do get around this, please leave a comment below. Thanks!

From → Uncategorized

54 Comments Leave one →
  1. WORKED PERFECTLY ! THANKS !!

  2. Tova permalink

    Thank you so much!!! I was having trouble pairing a bluetooth keyboard (that I use for my ipad) with my laptop on Windows 7 – it was asking me to type in the pairing code. I used your trick of right clicking and selecting properties. It installed the driver and is now working!!

    So happy because I started getting carpal tunnel syndrome in my dominant hand, and with this wireless keyboard I can place it in a better position for my hands.

    Thanks again, so grateful!

  3. jjm789 permalink

    This old article is the only one that got my laptop’s bluetooth connected to my vehicle radio. Windows 10 easily prompts for the pass key. But Windows 7 would not. So I could not transfer audio. It was tricky getting 7 to stream audio. But thanks to this article, I got it going. Thanks!

  4. cas permalink

    Perfect, thanks. Worked with windows 7, BKB800 generic china keyboard.

Leave a Reply

Note: HTML is allowed. Your email address will not be published.

Subscribe to this comment feed via RSS