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

7 Comments Leave one →
  1. Nate permalink

    Thank you! I was able to pair my Logitech Mediaboard keyboard with Windows 7 64 using this tip. I was trying to get it to work for hours with no success until realizing that you could right click on the device!

  2. Keith permalink

    I searched the web for almost 6 hours for a solution for my LG290c bluetooth connecting to Win 7 32 bit. This info was very helpful

  3. Thanks a lot!!!! It worked just fine for the fix of my Dell BT Keyaboard. I had already installed the bluez-compt pkg so executed the scan and the hidd commands and it worked perfectly. After hours of searching I found this site. I’ve booked marked it and intend to come back to it. If the MAC address stays the same, I’ll make it so that the hidd command executes at startup. Great going! Your are a life saver.

  4. Now if only someone could figure out how to do this in Windows 8 Consumer Preview….!!

  5. Serge Franche permalink

    Man, your solution for Bluetooth keyboard pairing without code entry worked the first time
    for Mint 13

    I am impressed

    Continue to provide us with working solution, we are all apreciating it

    Thanks

    Serge

  6. How do I make this pairing stick? It does work but on restart I have to set the keyboard to connect mode and then run the command again. I could set the command to run on startup but it only runs if the keyboard is in pairing mode.

    I am using a Logitech Tablet Keyboard for Android. I would like to be able to switch it back and forth between my Androids and Ubuntu Thinkpad.

    Thanks for the writeup, the stock bluetooth manager fails to connect to it after I enter the PIN it gives me.

Trackbacks and Pingbacks

  1. Keyglove | Interfacing with a BCM2042/BP20422 Bluetooth HID Module

Leave a Reply

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

Subscribe to this comment feed via RSS