--------------------------------------------------------------------------------
This seems to be what is required for RPi3 onboard BT chip
---------------------------------------------------------------------------------
Terminal
$ sudo apt-get install bluez-firmware
$ sudo reboot
Terminal
xbian@xbian ~ $ hcitool dev
Devices:
hci0 B8:27:EB:B8:EB:AA
Turn on keyboard and set it to scan mode.
Terminal
xbian@xbian ~ $ hcitool scan
Scanning ...
00:00:00:00:17:41 Caseflex BT Keyboard
Make a note of this address 00:00:00:00:17:41 (Yours will be different)
The sudo here is important, if not used you will loose the use of the keyboard!
Terminal
xbian@xbian ~ $ sudo bluetoothctl -a
[NEW] Controller B8:27:EB:B8:EB:AA xbian [default]
Agent registered
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# agent KeyboardOnly
Agent is already registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Controller B8:27:EB:B8:EB:AA Discovering: yes
[NEW] Device 00:00:00:00:17:41 Caseflex BT Keyboard
[bluetooth]# pair 00:00:00:00:17:41
Attempting to pair with 00:00:00:00:17:41
[CHG] Device 00:00:00:00:17:41 Connected: yes
[agent] PIN code: 187815
[CHG] Device 00:00:00:00:17:41 Modalias: usb:v05ACp022Cd011B
[CHG] Device 00:00:00:00:17:41 UUIDs:
00001124-0000-1000-8000-00805f9b34fb
00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 00:00:00:00:17:41 Paired: yes
Pairing successful
[CHG] Device 00:00:00:00:17:41 Connected: no
At this point, on your BT keyboard, enter the PIN code as requested (Yours will be different)
Terminal
[bluetooth]# trust 00:00:00:00:17:41
[CHG] Device 00:00:00:00:17:41 Trusted: yes
Changing 00:00:00:00:17:41 trust succeeded
[CHG] Device 00:00:00:00:17:41 RSSI: -56
[bluetooth]# connect 00:00:00:00:17:41
Attempting to connect to 00:00:00:00:17:41
[CHG] Device 00:00:00:00:17:41 Connected: yes
Connection successful
[CHG] Controller B8:27:EB:B8:EB:AA Discoverable: yes
[CHG] Controller B8:27:EB:B8:EB:AA Discoverable: no
[bluetooth]# quit
Agent unregistered
[DEL] Controller B8:27:EB:B8:EB:AA xbian [default]
The BT keyboard should now be working.
(Remember if doing this via remote ssh, the BT keyboard will not work. It will work in Kodi.