You are not logged in.

#1 2013-06-20 16:37:58

madsravn
Member
Registered: 2013-05-12
Posts: 22

Bluetooth Apple Keyboard - problems with connecting

Hi,

I just got an Apple bluetooth keyboard and I want to use it with my laptop (T510) running arch linux.

I installed bluez. I'm running

 #bluetoothctl -a 

And inside this I'm trying to follow this "guide". (https://wiki.archlinux.org/index.php/Bluetooth_Keyboard)
So firstly I have the address of the device from doing

 hcitool scan 

. It gives me an address and the name "Apple Wireless Keyboard".
So now inside bluetoothctl I first run this

[bluetooth]# pair 10:9A:DD:9C:3D:DA
Attempting to pair with 10:9A:DD:9C:3D:DA
[CHG] Device 10:9A:DD:9C:3D:DA Connected: yes
[agent] PIN code: 882876

Then I run this

[bluetooth]# trust 10:9A:DD:9C:3D:DA
Changing 10:9A:DD:9C:3D:DA trust succeeded

And info gives this

[bluetooth]# info 10:9A:DD:9C:3D:DA
Device 10:9A:DD:9C:3D:DA
	Name: Apple Wireless Keyboard
	Alias: Apple Wireless Keyboard
	Class: 0x002540
	Icon: input-keyboard
	Paired: no
	Trusted: yes
	Blocked: no
	Connected: no
	LegacyPairing: yes

But when I run

 connect <address>

I get either

Failed to pair: org.bluez.Error.AuthenticationTimeout
[CHG] Device 10:9A:DD:9C:3D:DA Connected: no

or

 
[bluetooth]# connect 10:9A:DD:9C:3D:DA
Attempting to connect to 10:9A:DD:9C:3D:DA
Failed to connect: org.bluez.Error.NotAvailable
Failed to pair: org.bluez.Error.AuthenticationTimeout
[CHG] Device 10:9A:DD:9C:3D:DA Connected: no

Does anyone know what I'm missing? I have an idea it has something to do with the PIN code given to me in the first step. However,  I don't where I should be using it at...

Last edited by madsravn (2013-06-20 16:42:12)

Offline

#2 2013-06-26 17:41:39

Martinistadjer
Member
Registered: 2013-06-26
Posts: 2

Re: Bluetooth Apple Keyboard - problems with connecting

You must enter the PIN code on the Apple keyboard.

Offline

#3 2014-09-11 23:21:10

pierregermain
Member
From: Mty - Par - Mad - Fra
Registered: 2013-11-28
Posts: 10
Website

Re: Bluetooth Apple Keyboard - problems with connecting

Had the same problem, this is the funny side of the history:

To get my keyboard working I needed Internet, the internet said to me: Do not connect to internet to make the keyboard working ... and voila! the pairing process worked!

You have to make bluetooth work before connecting to wifi because they share the same card.

Offline

#4 2014-09-14 23:55:28

allgood38
Member
Registered: 2013-11-04
Posts: 4
Website

Re: Bluetooth Apple Keyboard - problems with connecting

Device 10:9A:DD:9C:3D:DA
	Name: Apple Wireless Keyboard
	Alias: Apple Wireless Keyboard
	Class: 0x002540
	Icon: input-keyboard
	Paired: no
	Trusted: yes
	Blocked: no
	Connected: no
	LegacyPairing: yes

Note that the device doesn't say its paired. It needs to be paired before you can connect to it.

Though I'm not sure of exactly what is causing the problem, try keeping all the commands within your bluetoothctl session and give explicit commands for registering the agent, so:

$ bluetoothctl
[NEW] Controller XX:XX:XX:XX:XX:XX hostname [default]
[bluetooth]# power on
[bluetooth]# agent KeyboardOnly
[bluetooth]# default-agent
[bluetooth]# scan on

Now wait for the device to show up on the scan, it will immediately return to prompt, but the prompt will change as devices are found.

[bluetooth]# scan off
[bluetooth]# pair XX:

You can tab-complete the address or enter the whole thing. It should prompt you for a pin if necessary. Wait until pairing is complete before you trust and connect to it.

Since you're using an apple wireless keyboard, I think it actually requires you to type the pin on the keyboard you are trying to connect to, you might want to look up Apple's instructions for this. In this case your computer would generate the pin to give to the new keyboard instead of the other way around.

Offline

#5 2014-09-17 14:32:33

pierregermain
Member
From: Mty - Par - Mad - Fra
Registered: 2013-11-28
Posts: 10
Website

Re: Bluetooth Apple Keyboard - problems with connecting

Also what I have remarked today is that if you pair the keyboard with OSX and go back to Arch you have to pair it again. So it is advised to only use it with one OS because the pairing process is really annoying.

Offline

Board footer

Powered by FluxBB