Tutorials → Bluetooth keyboard in RaspBMC

Bluetooth keyboard in RaspBMC

This tutorial shows you, how to easily connect a bluetooth keyboard to RaspBMC.
  • Connect via SSH to your Raspberry Pi and login as user pi with password raspberry
  • When connected, at first enable dbus:
    pi@raspbmc:~$ sudo update-rc.d -f dbus defaults
  • Then install needed software:
    pi@raspbmc:~$ sudo apt-get install bluez python-gobject
  • Then list your bluetooth devices:
    pi@raspbmc:~$ sudo hcitool dev
    The result shows the name of your bluetooth stick (here hci0 - you need it later).
    Devices:
    hci0      00:09:DD:50:31:FB
  • Switch your keyboard to pairing-mode (there should be a special button on your keyboard) and enter:
    pi@raspbmc:~$ sudo hcitool scan
    In the result you should see your keyboard (bluetooth iPazzport with it's MAC address, which you need later).
    Scanning...
    54:46:6B:00:70:66      bluetooth iPazzport
  • Then enter the following commands, but replace the green and red fields with your values:
    pi@raspbmc:~$ sudo bluez-simple-agent hci0 54:46:6B:00:70:66
    Then it asks you to enter a PIN Code. Just enter some number like 1337:
    Enter PIN Code: 1337
    Now you have to enter the same number on your bluetooth keyboard and press the [ENTER] key.
    When all worked right you should see a message:
    Release
    New device (/org/bluez/2139/hci0/dev_54_46_6B_00_70_66)
  • Next set your keyboard as trusted:
    pi@raspbmc:~$ sudo bluez-test-device trusted 54:46:6B:00:70:66 yes
  • Last of all, connect to your keyboard:
    pi@raspbmc:~$ sudo bluez-test-input connect 54:46:6B:00:70:66
    Wait a few seconds and your keyboard should work.
  • If it doesn't work yet, try restarting the daemon:
    pi@raspbmc:~$ /etc/init.d/bluetooth restart
  • And if you made something wrong and want to delete a known device, just enter:
    pi@raspbmc:~$ bluez-test-device remove 54:46:6B:00:70:66
  • WARNING: Editing XBMC services (FTP, SSH, ...) seems to disable bluetooth. Then just restart RaspBMC and it should work again!

Einmal wurde Chuck Norris auf Latein beleidigt. Seitdem gilt es als tote Sprache.