# Cannot get Bluetooth pairing to work

## zaanpenguin

I've been trying to pair my Logitech DiNovo Bluetooth mouse & keyboard under Gentoo:

When I use hcitool to connect to the keyboard or mouse, hcidump keeps saying that the connection is refused because of a 'security block'.

```
> HCI Event: Connect Request (0x04) plen 10

< HCI Command: Accept Connection Request (0x01|0x0009) plen 7

> HCI Event: Command Status (0x0f) plen 4

> HCI Event: Role Change (0x12) plen 8

> HCI Event: Connect Complete (0x03) plen 11

< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2

> HCI Event: Command Status (0x0f) plen 4

> HCI Event: Read Remote Supported Features (0x0b) plen 11

< HCI Command: Remote Name Request (0x01|0x0019) plen 10

> HCI Event: Command Status (0x0f) plen 4

> ACL data: handle 12 flags 0x02 dlen 12

    L2CAP(s): Connect req: psm 17 scid 0x0041

< ACL data: handle 12 flags 0x02 dlen 16

    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0041 result 1 status 0

      Connection pending - No futher information available

< ACL data: handle 12 flags 0x02 dlen 10

    L2CAP(s): Info req: type 2

> HCI Event: QoS Setup Complete (0x0d) plen 21

> ACL data: handle 12 flags 0x02 dlen 16

    L2CAP(s): Info rsp: type 2 result 0

      Extended feature mask 0x0000

< ACL data: handle 12 flags 0x02 dlen 16

    L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0041 result 0 status 0

      Connection successful

> ACL data: handle 12 flags 0x02 dlen 27

> ACL data: handle 12 flags 0x01 dlen 13

    L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 28

      MTU 48 QoS 0x01 (Best effort) 

< ACL data: handle 12 flags 0x02 dlen 18

    L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 4

      MTU 48 

< ACL data: handle 12 flags 0x02 dlen 12

    L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0

> HCI Event: Remote Name Req Complete (0x07) plen 255

> HCI Event: Number of Completed Packets (0x13) plen 5

> HCI Event: Role Change (0x12) plen 8

> ACL data: handle 12 flags 0x02 dlen 14

    L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0

      Success

< ACL data: handle 12 flags 0x02 dlen 5

    L2CAP(d): cid 0x0041 len 1 [psm 17]

      HIDP: Control: Virtual cable unplug

< ACL data: handle 12 flags 0x02 dlen 12

    L2CAP(s): Disconn req: dcid 0x0041 scid 0x0040

> ACL data: handle 12 flags 0x02 dlen 12

    L2CAP(s): Connect req: psm 19 scid 0x0042

< ACL data: handle 12 flags 0x02 dlen 16

    L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0042 result 1 status 2

      Connection pending - Authorization pending

< ACL data: handle 12 flags 0x02 dlen 16

    L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0042 result 3 status 0

      Connection refused - security block

> HCI Event: Number of Completed Packets (0x13) plen 5

> HCI Event: Number of Completed Packets (0x13) plen 5

> HCI Event: Disconn Complete (0x05) plen 4
```

How do I solve this? I don't know how to 'authorize' a mouse or a keyboard. I've Googled for this and there are very few hits for the two "Connection ..." messages. There are suggestions of using hidd or hid2hci (neither of which exist under Gentoo).

----------

## eccerr0r

Lots of us are feeling your pain with Bluetooth... might want to check out 

https://forums.gentoo.org/viewtopic-t-833038-highlight-.html for our gripes, maybe even get some ideas on how to proceed.

I don't have any HID bluetooth devices, but pairing was the most annoying thing to get working first...

----------

## zaanpenguin

I'm a relative n00b when it comes to this, and I don't see anything like a set of steps I could follow (in the topic you're referring to).  Anyone else have an idea how to proceed?

----------

## dmpogo

Could you try this command-line procedure ?

http://en.gentoo-wiki.com/wiki/Bluetooth_mouse

----------

