Forum

Full Version: RPi 3 Bluetooth keyboard
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

Is it possible to use a Keyboard using the internal bluetooth of the RPi 3? So we free a USB port, and maybe is needed less power consume.

How could it be done by a newbie?
(17th Apr, 2016 07:41 AM)Peiote Wrote: [ -> ]Is it possible to use a Keyboard using the internal bluetooth of the RPi 3? So we free a USB port, and maybe is needed less power consume.

Yes it is, but

Quote:How could it be done by a newbie?

unfortunately have no idea how to do this Huh (no hardware available)

Maybe this posting can help
(17th Apr, 2016 07:55 AM)Nachteule Wrote: [ -> ]
(17th Apr, 2016 07:41 AM)Peiote Wrote: [ -> ]Is it possible to use a Keyboard using the internal bluetooth of the RPi 3? So we free a USB port, and maybe is needed less power consume.

Yes it is, but

Quote:How could it be done by a newbie?

unfortunately have no idea how to do this Huh (no hardware available)

Maybe this posting can help

OK. Don't worry, I will survive, I hope xD

Thanks

Terminal
xbian@xbian ~ $ hcitool dev – shows hci0
dev: too many arguments (maximal: 0)
Usage:
dev
xbian@xbian ~ $ hcitool scan
Scanning ...
xbian@xbian ~ $ hcitool scan
Scanning ...
xbian@xbian ~ $
Maybe you have to make your devices visible Dodgy
(17th Apr, 2016 08:11 AM)Nachteule Wrote: [ -> ]Maybe you have to make your devices visible Dodgy

DodgyDodgy you were right.
But now I can't write anything of this:
>> power on
>> agent KeyboardOnly
>> default-agent
Just no character is showing in the terminal when I type:
Terminal
xbian@xbian ~ $ hcitool scan
Scanning ...
00:12:5A:A1:A3Big GrinE Microsoft Wireless Entertainment Keyboard 7000
xbian@xbian ~ $ bluetoothctl -a
[bluetooth]#
Certainly does not seem to work. Might be an issue with the package A2DP.

dmesg shows:

[ 270.209284] apple 0005:05AC:022C.0004: input,hidraw3: BLUETOOTH HID v1.1b Keyboard [Caseflex BT Keyboard] on b8:27:eb:b8:eb:aa
[ 270.246294] init: bluetooth-a2dp pre-start process (4138) terminated with status 1
[ 270.306829] init: bluetooth-pairing main process (4156) terminated with status 127
[ 270.318007] init: bluetooth-discovery-timeout main process (4157) killed by TERM signal

Looking on the forums, seems to suggest a pre-installed package called "pi-bluetooth" is required.

Looks like a "hack" is required

https://www.element14.com/community/docs/DOC-81266/l/setting-up-bluetooth-on-the-raspberry-pi-3
--------------------------------------------------------------------------------
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.
(17th Apr, 2016 09:43 PM)IriDium Wrote: [ -> ]
Awesome, working.
Thanks

EDIT: After restarting Kodi, it keeps working.
It works better than in OE, since it doesn't ask a PIN each time you use the keyboard.
Great - congratulations Smile Marked as solved
Hi

How are you?

I got all done up to :
[bluetooth]# connect 00:00:00:00:17:41

mine gives a error then:
Failed to connect: org.bluez.Error.Failed

Hope you can assist?
(25th Jun, 2017 01:59 PM)IzanP Wrote: [ -> ]Hi

How are you?

I got all done up to :
[bluetooth]# connect 00:00:00:00:17:41

Is this address correct? Sounds very strange ... Confused You have to user the address of YOUR device, not the address from postings above

Quote:mine gives a error then:
Failed to connect: org.bluez.Error.Failed

Hope you can assist?

What did you before?

Bluetooth started and enabled?
Reference URL's