You are not logged in.

#1 2014-07-21 01:44:35

bendavis78
Member
Registered: 2014-06-21
Posts: 41

[SOLVED] Bluetooth: "Connection refused - security block"

When I try to add my bluetooth keyboard, it shows up during a scan and then instantly disappears. Running btmon shows this output: http://sprunge.us/aAjV. Of interest is the following:

< ACL Data TX: Handle 12 flags 0x00 dlen 16                                              [hci0] 24.073197
      L2CAP: Connection Response (0x03) ident 7 len 8
        Destination CID: 65
        Source CID: 67
        Result: Connection refused - security block (0x0003)
        Status: No further information available (0x0000)

I'm having major difficulty getting this to work. It worked fine before a recent update, but I can't find exactly what broke.

Last edited by bendavis78 (2014-07-24 02:22:45)

Offline

#2 2014-07-21 23:16:07

bendavis78
Member
Registered: 2014-06-21
Posts: 41

Re: [SOLVED] Bluetooth: "Connection refused - security block"

This is the output from bluetoothd when this error happens:

bluetoothd[8708]: src/adapter.c:connected_callback() hci0 device 28:37:37:2A:BC:7A connected eir_len 5
bluetoothd[8708]: src/device.c:device_create() dst 28:37:37:2A:BC:7A
bluetoothd[8708]: src/device.c:device_new() address 28:37:37:2A:BC:7A
bluetoothd[8708]: src/device.c:device_new() Creating device /org/bluez/hci0/dev_28_37_37_2A_BC_7A
bluetoothd[8708]: src/device.c:btd_device_set_temporary() temporary 1
bluetoothd[8708]: src/adapter.c:adapter_connect_list_remove() device /org/bluez/hci0/dev_28_37_37_2A_BC_7A is not on the list, ignoring
bluetoothd[8708]: src/device.c:device_set_class() /org/bluez/hci0/dev_28_37_37_2A_BC_7A 0x002540
bluetoothd[8708]: profiles/input/server.c:connect_event_cb() Incoming connection from 28:37:37:2A:BC:7A on PSM 17
bluetoothd[8708]: profiles/input/device.c:input_device_set_channel() idev (nil) psm 17
bluetoothd[8708]: Refusing input device connect: No such file or directory (2)
bluetoothd[8708]: profiles/input/server.c:confirm_event_cb()
bluetoothd[8708]: Refusing connection from 28:37:37:2A:BC:7A: unknown device
bluetoothd[8708]: src/adapter.c:dev_disconnected() Device 28:37:37:2A:BC:7A disconnected, reason 3
bluetoothd[8708]: src/adapter.c:adapter_remove_connection()
bluetoothd[8708]: src/adapter.c:adapter_remove_connection() Removing temporary device /org/bluez/hci0/dev_28_37_37_2A_BC_7A
bluetoothd[8708]: src/device.c:device_remove() Removing device /org/bluez/hci0/dev_28_37_37_2A_BC_7A
bluetoothd[8708]: src/device.c:btd_device_unref() Freeing device /org/bluez/hci0/dev_28_37_37_2A_BC_7A
bluetoothd[8708]: src/device.c:device_free() 0xedcae0
bluetoothd[8708]: plugins/policy.c:disconnect_cb() reason 3
bluetoothd[8708]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr 28:37:37:2A:BC:7A type 0 status 0xe
bluetoothd[8708]: src/adapter.c:resume_discovery()

The interesting part is the "Refusing input device connect: No such file or directory (2)". I ran bluetoothd under strace to see what file it was looking for (grepped for ENOENT), and it was looking for /var/lib/bluetooth/<adapter mac>/<keyboard mac>. Why would it not just automatically create those directories? Why does bluetoothd think they should exist? Is there somewhere else that bluetoothd stores information other than /var/lib/bluetooth?

Offline

#3 2014-07-24 00:41:29

lokoum
Member
Registered: 2014-07-22
Posts: 18

Re: [SOLVED] Bluetooth: "Connection refused - security block"

Did you try with another bluetooth device ? android or bluetooth speakers ?
What about another bluetooth manager ? try blueman.

Offline

#4 2014-07-24 00:50:34

bendavis78
Member
Registered: 2014-06-21
Posts: 41

Re: [SOLVED] Bluetooth: "Connection refused - security block"

Using a different frontend doesn't help, since the error happens without using a bluetooth frontend at all. All I have to do to reproduce the error is run bluetoothd and hit the pair button on my keyboard.

My guess is that there's something saved somewhere that makes bluetoothd think that the keyboard shouuld already be paired, but I've cleared out /var/lib/bluetooth, and I'm not sure of anywhere else where it might store data. I've also cleared out /etc/bluetooth (and have restarted, rebooted, etc).

Offline

#5 2014-07-24 00:55:13

bendavis78
Member
Registered: 2014-06-21
Posts: 41

Re: [SOLVED] Bluetooth: "Connection refused - security block"

Other bluetooth devices seem to show up fine, that is, they don't disappear immediately during the scan.

Offline

#6 2014-07-24 02:22:35

bendavis78
Member
Registered: 2014-06-21
Posts: 41

Re: [SOLVED] Bluetooth: "Connection refused - security block"

Ok, I figured it out. Chalk this one up to confusing errors in bluetooth that lead me down the wrong path. With the apple wireless keyboard, you apparently have to hold the button down for more than 30 seconds before it completely resets and goes into pairing mode.

Offline

Board footer

Powered by FluxBB