hence there is no tutorial out there for a Logitech Ultra Thin Keyboard (Update: the Logitech Solar Keyboard Folio works fine, too!)
and Raspbmc I’m going to write one.
In general it’s the same procedure like connecting a normal bluetooth keyboard.
Step 1 – Connect your hardware
Of course connect your Bluetooth Dongle first! 🙂
Make sure your Hub has enough power, if you are not connecting directly to your Pi!
Step 2 – SSH connection and getting ready
SSH into your Raspberry Pi, I added an alias in the /etc/hosts file so that I can use just “pi”
ssh [email protected] password (default) is: raspberry
It’s also not a bad idea to update your cache of available packages via
sudo apt-get update
Step 3 – Enable dbus
First of all we need to enable the dbus support
sudo update-rc.d -f dbus defaults
Step 4 – Install bluetooth packages
Now we can go on and install the required bluetooth tools suite via apt-get
sudo apt-get install bluez python-gobject
This might take some time, depending on your internet connection.
Step 5 – Test your hardware
Now your Bluetooth Dongle should be found by the OS. If not re-plug it!
Test the device if it’s listed as hciX (X is a number) as “UP” with
hci0: Type: BR/EDR Bus: USB BD Address: 00:1A:7D:DA:71:14 ACL MTU: 310:10 SCO MTU: 64:8 UP RUNNING PSCAN RX bytes:6901 acl:96 sco:0 events:280 errors:0 TX bytes:3367 acl:78 sco:0 commands:106 errors:0
Step 6 – Scan for the keyboard
It’s time to start a scan (make sure the Logitech Keyboard is visible and turned on!)
It should display something similar to this
Scanning ... 00:1F:20:5D:FE:39 Logitech Ultrathin KB Cover
If you find the keyboard, copy the MAC adress (something like 00:1F:20:5D:FE:39), you are going to need this one.
Step 7 – Pairing and fixing conflicts
In general you would now only need to pair the device with
bluez-simple-agent hci0 00:1F:20:5D:FE:39
In my case (or maybe due to the Logitech Ultrathin Keyboard) I got the following error message
Creating device failed: org.bluez.Error.AuthenticationRejected: Authentication Rejected
There is a simple fix for it. You need to change an occurrence of “KeyboardDisplay” with “DisplayYesNo” in a bluez python script.
sudo vi /usr/bin/bluez-simple-agent
(vi noob? Read this: Hit / and then type KeyboardDisplay, now you have found the line, press I and delete the KeyboardDisplay and write DisplayYesNo. Now hit ESC and type :x, you are done)
Now we can issue the pairing command again and it should work and you will see something like this
DisplayPasskey (/org/bluez/1284/hci0/dev_00_1F_20_5D_FE_39, 328877)
See the 328877? You need to type this code on the keyboard and hit enter!
You will see some more infos
Release New device (/org/bluez/1284/hci0/dev_00_1F_20_5D_FE_39)
Congratulations, it’s now paired!
Step 8 – Connecting
Next we will mark the device as trusted
bluez-test-device trusted 00:1F:20:5D:FE:39 yes
And now connect it (will auto-reconnect after a reboot!)
bluez-test-input connect 00:1F:20:5D:FE:39
That’s it, wait a few seconds and the keyboard should work on Raspbmc
If you receive an error called
dbus.exceptions.DBusException: org.bluez.Error.Failed: Host is down (112)
That means the keyboard is not discoverable, simply press the bluetooth key again
If you receive an error called
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method “Connect” with signature “” on interface “org.bluez.Input” doesn’t exist
Make sure to enable the input plugin in the bluetooth config.
sudo vi /etc/bluetooth/main.conf
It should not be listed under “DisabledPlugins” (either DisabledPlugins starts with a # or it’s not listed there)
Thanks for reading, I hope this tutorial will help some people.
If you have any suggestions or problems, feel free to comment below.