You are not logged in.

#1 2013-12-14 05:40:49

Neverlasting
Member
Registered: 2008-12-26
Posts: 13

[SOLVED] Bluetooth keyboard: Unable to pair (authentication timeout)

Hi,

I have tried using my Apple Wireless Keyboard with Arch Linux using Bluez 5.12. However, I have not been able to pair with the device. The GNOME bluetooth application fails without any further explanation. When I use the bluetoothctl program to pair with the keyboard, a connection appears to be made, but the program does not ask me to input a PIN code on the wireless keyboard. Soon afterwards, it fails with an authentication timeout. Here is the session:

$ bluetoothctl
[NEW] Controller C8:E0:EB:48:0F:6E foo [default]
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent 
Default agent request successful
[bluetooth]# scan on
Discovery started
[CHG] Controller C8:E0:EB:48:0F:6E Discovering: yes
[NEW] Device C8:E0:EB:04:52:55 Foobar’s Keyboard
[bluetooth]# pair C8:E0:EB:04:52:55 
Attempting to pair with C8:E0:EB:04:52:55
[CHG] Device C8:E0:EB:04:52:55 Connected: yes
[agent] PIN code: 689398
Failed to pair: org.bluez.Error.AuthenticationTimeout
[CHG] Device C8:E0:EB:04:52:55 Connected: no
[bluetooth]# info C8:E0:EB:04:52:55 
Device C8:E0:EB:04:52:55
	Name: Foobar’s Keyboard
	Alias: Foobar’s Keyboard
	Class: 0x002540
	Icon: input-keyboard
	Paired: no
	Trusted: no
	Blocked: no
	Connected: no
	LegacyPairing: yes
[bluetooth]# trust C8:E0:EB:04:52:55 
[CHG] Device C8:E0:EB:04:52:55 Trusted: yes
Changing C8:E0:EB:04:52:55 trust succeeded
[bluetooth]# pair C8:E0:EB:04:52:55 
Attempting to pair with C8:E0:EB:04:52:55
[CHG] Device C8:E0:EB:04:52:55 Connected: yes
[agent] PIN code: 390412
[bluetooth]# info C8:E0:EB:04:52:55 
Device C8:E0:EB:04:52:55
	Name: Foobar’s Keyboard
	Alias: Foobar’s Keyboard
	Class: 0x002540
	Icon: input-keyboard
	Paired: no
	Trusted: yes
	Blocked: no
	Connected: yes
	LegacyPairing: yes
Failed to pair: org.bluez.Error.AuthenticationTimeout
[CHG] Device C8:E0:EB:04:52:55 Connected: no

lsusb shows:

Bus 001 Device 006: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)

I have been successful in pairing the keyboard in Mac OS X, so it does work.

Also, in some of my desparate struggles with bluetoothctl, I somehow managed to get to a state where bluetoothctl asked me to enter a PIN code on the wireless keyboard and it indeed was possible to enter numbers -- however, pairing did not succeed either. (bluetoothd crashed soon afterwards and I can't really reproduce this situation reliably, so I can't tell you exactly how I did this. I think it was something with connecting to the device even without pairing or while pairing was in progress. Anyway, as far as I know you are supposed to pair with the device before you do anything else with it.)

Help please! smile

Cheers

Last edited by Neverlasting (2013-12-14 14:41:28)

Offline

#2 2013-12-14 08:57:20

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: [SOLVED] Bluetooth keyboard: Unable to pair (authentication timeout)

Hi, look again at your bluetoothctl output , it asks for a pin twice. wink

[agent] PIN code: 689398
[agent] PIN code: 390412

fill in the pin hit enter...

Offline

#3 2013-12-14 13:50:03

Neverlasting
Member
Registered: 2008-12-26
Posts: 13

Re: [SOLVED] Bluetooth keyboard: Unable to pair (authentication timeout)

qinohe wrote:

Hi, look again at your bluetoothctl output , it asks for a pin twice. wink

[agent] PIN code: 689398
[agent] PIN code: 390412

fill in the pin hit enter...

Believe me, I spent several hours fiddling around with bluetoothctl, and although it states some PIN code, it wouldn't let me enter that on my bluetooth keyboard. It just returns to the usual bluetoothctl prompt. There nothing happens when I press keys on the bluetooth keyboard. (Oh, and by the way, typing in that PIN code on my wired keyboard, does not help either, of course, as this is the usual bluetoothctl prompt, not a PIN prompt, for one.)

What the Wiki says should happen is a situation like the following (copied from the Wiki):

[bluetooth]# pair 00:12:34:56:78:90
Attempting to pair with 00:12:34:56:78:90
[CHG] Device 00:12:34:56:78:90 Connected: yes
[CHG] Device 00:12:34:56:78:90 Connected: no
[CHG] Device 00:12:34:56:78:90 Connected: yes
Request PIN code
[agent] Enter PIN code: 1234
[CHG] Device 00:12:34:56:78:90 Paired: yes
Pairing successful
[CHG] Device 00:12:34:56:78:90 Connected: no

So if I'm not mistaken, after "Enter PIN code:" It would let you enter a code on your bluetooth keyboard, which it doesn't.

Kernel is 3.12.4, by the way.

Last edited by Neverlasting (2013-12-14 13:53:16)

Offline

#4 2013-12-14 14:31:09

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,629
Website

Re: [SOLVED] Bluetooth keyboard: Unable to pair (authentication timeout)

Of late I've read a few threads that seem to imply that there is a problem with buletooth in this latest iteration of the kernel.
If you look at the forum threads on bluetooth you may find some more info.

R.

p.s. BTW the problem, as I recall, is that it connects and then immediately disconnects.

Last edited by ralvez (2013-12-14 14:34:40)

Offline

#5 2013-12-14 14:40:38

Neverlasting
Member
Registered: 2008-12-26
Posts: 13

Re: [SOLVED] Bluetooth keyboard: Unable to pair (authentication timeout)

Okay, thanks everyone for your replies. It is embarassing, but I managed to get my keyboard paired. Thank you, qinohe, your reply was quite useful after all. wink

After typing "pair ..." in bluetoothctl, it would respond with "PIN code: ...". I tried typing this code using my bluetooth keyboard, followed by Return, even though no prompt for a PIN was present where I could enter it. (So I had to enter it "blind".) To my surprise, this indeed led to the keyboard being paired. At least for the last few minutes it's now working. smile

What confused me was a) that the GNOME bluetooth application does not manage to get it paired, and b) that I was expecting a visual echo of my entering the PIN on the bluetooth keyboard. (You usually get such a visual response when you pair bluetooth keyboards...) So I guess this is solved. Thank you!

Last edited by Neverlasting (2013-12-14 14:41:04)

Offline

#6 2013-12-14 14:55:52

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: [SOLVED] Bluetooth keyboard: Unable to pair (authentication timeout)

cool

Can't help you with the Gnome part though , I use i3, works as it should...

nice!  vv

Last edited by qinohe (2013-12-14 15:07:37)

Offline

#7 2013-12-14 14:59:09

Neverlasting
Member
Registered: 2008-12-26
Posts: 13

Re: [SOLVED] Bluetooth keyboard: Unable to pair (authentication timeout)

Once I got it paired, it worked in GNOME, fortunately. smile

Offline

Board footer

Powered by FluxBB