Bluetooth keyboard pairing without code entry
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
Based 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
This 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
Despite 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!
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!
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
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.
Now if only someone could figure out how to do this in Windows 8 Consumer Preview….!!
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
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.
On Lion OSX, you can try connecting a bluetooth device, then when it fails, click options and click passcode options, then pick “no passcode”.
u sir are awesome, i had no keyboard because the number keys dont work so i couldnt pair it, saved me some money TYTYTYTYTY
Hours of surfing and fiddling before finding your post. Instant, easy fix. Bravo!!! Many thanks.
Do you have a solution for windows 8? thank you.
Thankyou. This is the only answer that worked for connecting my Microsoft Wedge Keyboard in Ubuntu or Mint Linux.
THANK YOU so much. After many many failed attempts to pair up my bluetooth Lenovo keyboard with my Sony Vaio PC I was just about to give up when I found your article. It works ! my mistake was to double click on the device. The right click and properties did it for me. Thank you , thank you 🙂
We don’t have any computers running Windows 8, so I’m not sure what would work there, but perhaps someone else knows how to do that.
working tutorial for celluon epic keyboard. Great
Great!.
Good work!
This was my solution: use the guest login to access your desktop. You don’t need to use the keyboard. Then access the bluetooth settings using your mouse.
Is there any way to do this in OSX Mavericks? It’s very, very frustrating that I can’t pair my device because of a stupid code which I have no way of entering BECAUSE IT’S NOT A KEYBOARD!!!
Michael, I don’t have access to a Mavericks machine, but let us know if you find a solution.
Don’t know whether it is my device (Measy BT16 AirMouse) or the current bluez in Linux Mint (circa 2014) that is bawked. Could get the bluetooth device to work on my Android but any attempts to pair in Linux Mint allways failed as it sat waiting for a PIN that never came. But now thanks to this old chestnut of knowledge BAM it works! Thanks
I tried the suggested solution but it didn’t work for me with my Rocketfish bluetooth usb dongle and HP K4000 keyboard. I tried many iterations of batteries out, unplug dongle, rebooot computer.
What finally worked (to get my authentication code prompt back) was to remove the dongle and plug it into a different usb slot.
Hi. I have windows 7 and it when i right click the selected device and go into the properties, it doesnt have the option to check the drivers, keyboard etc. Any advice? Im using a usb bluetooth dongle and trying to connect a wedge mobile keyboard. Thanks in advance.
The method on Windows by right-clicking worked with my Cellulon Epic since it pairs without a passcode.
I cannot pair it on Fedora, Bluedevil gives me a code to enter, bluetoothctl command works with my keyboard/mouse combo that uses a passcode but not the Epic.
How can I do this on Fedora?
yum provides */hidd
has no results
Wow!, your right, useful info originally from a MS site….AMAZING!. Thanx for the tip.
Did you ever figure out how to connect via blue tooth Mac 10.8 to a Mac Keyboard at start up?????
Thanks for the help. Finally found the pairing button on the bottom of my Dell keyboard.
Just want to say THANK YOU! for the info re: Windows — After two hours of trying to get my wireless keyboard to reconnect after changing the batteries … and a trip to computer store to buy a wired keyboard, I found your post. In was up and running in 5 minutes…. and warning to all the Microsoft wizard for this is beyond unhelpful without the information provided here.
Thanks Again!
Perfect! Works like a charm! Thank you so much! 🙂
Great workarounds! Unfortunately it looks like they took away the ability to right-click when adding a device in Windows 8.1. MS Tomfoolery…
A Great workaround,I found that in Windows 10 as JR stated there is no right-right clic..
I found that if when you open :- Control Panel, Hardware & Sound, Devices & Printers, and you see the Keyboard there you can right-Clic the keyboard icon to access the Keyboard Properties and service Panel. (I am typing on the Keyboard I connected).
Even works in Windows 10!
Nice one!
I’m afraid it didn’t worked for me, i need to connect my Bluetooth headset with my pc (windows 7) after searching for the drivers it says “drivers software did not found” something like that. Kindly tell me if there is another way.
I’need to pair lenovo window8.1
Very helpful, thanks. I was connecting 1byone blue tooth keyboard to Windows 7 64 bit and this article resolved the puzzle.
In Windows 10, there is no right-click. In Devices & Printers, there isn’t shown not connected keyboard. Any help? How to open properties of not connected device (as is possible in Windows 7)? Thank you for your help!
Hi Jakub, I haven’t tried this in a long time, so I’m not sure what to suggest. Please let us know if you figure it out!
Hi gaudence, it appears that Windows 8 and 10 don’t have this workaround anymore, so I’m not sure what to suggest. Please let us know if you figure it out!
Windows 10 doesn’t seem to allow the “right-click” to select the HID driver. Is there a way around this? I use a pedal to change pages and Windows thinks it’s a keyboard. Worked successfully in W7, but not W10.
I recently bought a bluetooth keyboard. When I try to connect, the PC (Windows 7 Dell) recognizes the device and the pairing is successful. I am able to enter the verification code and the keyboard is added to the printers and devices list. However, immediately after being added to the list, it becomes grayed out and I am not able to use the keyboard (no response). I click on the properties of the keyboard and it only says authenticated and the rest of the fields show as unavailable or unknown. No services populate the Bluetooth services tab of the keyboard properties. What is causing this problem and can anyone help?
Thank you so much for this how to. It was so easy to install my Logitech printer. You save me a whole lot of grief.
Please help for windows 10!. It does not works on win 10.
thumbs up
TTTHAANKYOUUUU… nice info… my bluetooth keyboard can working, now.
Thanks!!
Tou legend. I’ve been searching for hours for a fix! Thanks
Nothing for Windows 10?
Sorry, this blog post was written four years before Windows 10 was released. Maybe someone else has figured out a way?
Thank you!!! =D
Thank you sir, it so simple and really works!
Thanks for your help. I managed to connect my wireless keyboard to my PC on Windows 10. I was originally struggling to get a passcode but this tip did the trick! Thanks again.