# apple bluetooth keyboard stopped working

## mijenix

Hi

I used my apple bluetooth keyboard with my macmini and gentoo/macosx/win7 tripple boot a long time.

But after a kernel update from 2.6.38-gentoo-r6 to 2.6.39-gentoo-r3 my apple bluetooth keyboard stopped working.

As well with the old kernel it does not work, so I decided to pair the keyboard again but no luck.

Under MacOS X (Lion) and Win7 (32bit) the keyboard works without any problems.

Here are some infos about the system and software version 

and also the output of a pair and connection attempt with hcidump.

lsusb:

Bus 005 Device 004: ID 05ac:8205 Apple, Inc. Bluetooth HCI

kernel:

2.6.39-gentoo-r3

bluez:

 *Quote:*   

> 
> 
> net-wireless/bluez-4.93
> 
> net-wireless/bluez-hcidump-2.0
> ...

 

dmesg | grep Bluetooth: 

 *Quote:*   

> 
> 
> Bluetooth: Core ver 2.16
> 
> Bluetooth: HCI device and connection manager initialized
> ...

 

pair the keyboard with simple-agent, before I removed everything under /var/lib/bluetooth

 *Quote:*   

> 
> 
> simple-agent hci0 E8:06:88:42:6E:7D
> 
> RequestPinCode (/org/bluez/2364/hci0/dev_E8_06_88_42_6E_7D)
> ...

 

/var/log/messages:

 *Quote:*   

> 
> 
> Aug 29 20:38:00 minime bluetoothd[2364]: Bluetooth deamon 4.93
> 
> Aug 29 20:38:00 minime bluetoothd[2365]: Starting SDP server
> ...

 

hcidump output:

```

HCI sniffer - Bluetooth packet analyzer ver 2.0

device: hci0 snap_len: 1028 filter: 0xffffffffffffffff

< HCI Command: Read Local Version Information (0x04|0x0001) plen 0

> HCI Event: Command Complete (0x0e) plen 12

    Read Local Version Information (0x04|0x0001) ncmd 1

    status 0x00

    HCI Version: 2.0 (0x3) HCI Revision: 0x7ad

    LMP Version: 2.0 (0x3) LMP Subversion: 0x7ad

    Manufacturer: Cambridge Silicon Radio (10)

< HCI Command: Write Page Timeout (0x03|0x0018) plen 2

    timeout 8192

> HCI Event: Command Complete (0x0e) plen 4

    Write Page Timeout (0x03|0x0018) ncmd 1

    status 0x00

< HCI Command: Read Stored Link Key (0x03|0x000d) plen 7

    bdaddr 00:00:00:00:00:00 all 1

> HCI Event: Command Complete (0x0e) plen 8

    Read Stored Link Key (0x03|0x000d) ncmd 1

    status 0x00 max 16 num 0

< HCI Command: Set Event Mask (0x03|0x0001) plen 8

    Mask: 0xfffffbff07180000

> HCI Event: Command Complete (0x0e) plen 4

    Set Event Mask (0x03|0x0001) ncmd 1

    status 0x00

< HCI Command: Write Inquiry Mode (0x03|0x0045) plen 1

    mode 1

> HCI Event: Command Complete (0x0e) plen 4

    Write Inquiry Mode (0x03|0x0045) ncmd 1

    status 0x00

< HCI Command: Write Default Link Policy Settings (0x02|0x000f) plen 2

    policy 0x0f

    Link policy: RSWITCH HOLD SNIFF PARK 

> HCI Event: Command Complete (0x0e) plen 4

    Write Default Link Policy Settings (0x02|0x000f) ncmd 1

    status 0x00

< HCI Command: Write Local Name (0x03|0x0013) plen 248

    name 'minime-0'

> HCI Event: Command Complete (0x0e) plen 4

    Write Local Name (0x03|0x0013) ncmd 1

    status 0x00

< HCI Command: Write Class of Device (0x03|0x0024) plen 3

    class 0x080100

> HCI Event: Command Complete (0x0e) plen 4

    Write Class of Device (0x03|0x0024) ncmd 1

    status 0x00

< HCI Command: Write Scan Enable (0x03|0x001a) plen 1

    enable 2

> HCI Event: Command Complete (0x0e) plen 4

    Write Scan Enable (0x03|0x001a) ncmd 1

    status 0x00

< HCI Command: Exit Periodic Inquiry Mode (0x01|0x0004) plen 0

> HCI Event: Command Complete (0x0e) plen 4

    Exit Periodic Inquiry Mode (0x01|0x0004) ncmd 1

    status 0x0c

    Error: Command Disallowed

< HCI Command: Read Local Name (0x03|0x0014) plen 0

> HCI Event: Command Complete (0x0e) plen 252

    Read Local Name (0x03|0x0014) ncmd 1

    status 0x00 name 'minime-0'

< HCI Command: Read Scan Enable (0x03|0x0019) plen 0

> HCI Event: Command Complete (0x0e) plen 5

    Read Scan Enable (0x03|0x0019) ncmd 1

    status 0x00 enable 2

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

    bdaddr E8:06:88:42:6E:7D class 0x002540 type ACL

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

    bdaddr E8:06:88:42:6E:7D role 0x00

    Role: Master

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

    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1

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

    status 0x00 bdaddr E8:06:88:42:6E:7D role 0x00

    Role: Master

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

    status 0x00 handle 46 bdaddr E8:06:88:42:6E:7D type ACL encrypt 0x00

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

    handle 46

> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7

    bdaddr E8:06:88:42:6E:7D mode 1

> ACL data: handle 46 flags 0x02 dlen 12

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

< ACL data: handle 46 flags 0x02 dlen 16

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

      Connection pending - No futher information available

< ACL data: handle 46 flags 0x02 dlen 10

    L2CAP(s): Info req: type 2

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

    handle 46 packets 1

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

    handle 46 packets 1

> ACL data: handle 46 flags 0x02 dlen 16

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

      Extended feature mask 0x0004

        Bi-directional QoS

< ACL data: handle 46 flags 0x02 dlen 16

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

      Connection successful

< ACL data: handle 46 flags 0x02 dlen 12

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

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

    handle 46 packets 1

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

    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1

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

    handle 46 packets 1

> ACL data: handle 46 flags 0x02 dlen 16

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

      MTU 185 

< ACL data: handle 46 flags 0x02 dlen 18

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

      MTU 185 

> ACL data: handle 46 flags 0x02 dlen 18

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

      MTU 185 

< ACL data: handle 46 flags 0x02 dlen 5

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

      HIDP: Control: Virtual cable unplug

< ACL data: handle 46 flags 0x02 dlen 12

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

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

    handle 46 packets 1

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

    handle 46 packets 1

> ACL data: handle 46 flags 0x02 dlen 12

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

< ACL data: handle 46 flags 0x02 dlen 16

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

      Connection pending - Authorization pending

< ACL data: handle 46 flags 0x02 dlen 16

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

      Connection refused - security block

> ACL data: handle 46 flags 0x02 dlen 12

    L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0040

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

    handle 46 packets 1

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

    status 0x00 handle 46

    Features: 0xbc 0x02 0x04 0x38 0x08 0x00 0x00 0x00

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

    bdaddr E8:06:88:42:6E:7D mode 2 clkoffset 0x0000

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

    handle 46 packets 1

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

    handle 46 packets 1

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

    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1

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

    status 0x13 bdaddr E8:06:88:42:6E:7D name ''

    Error: Remote User Terminated Connection

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

    status 0x00 handle 46 reason 0x13

    Reason: Remote User Terminated Connection

< HCI Command: Read Remote Version Information (0x01|0x001d) plen 2

    handle 46

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

    Read Remote Version Information (0x01|0x001d) status 0x02 ncmd 1

    Error: Unknown Connection Identifier

< HCI Command: Create Connection (0x01|0x0005) plen 13

    bdaddr E8:06:88:42:6E:7D ptype 0xcc18 rswitch 0x01 clkoffset 0x0000

    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 

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

    Create Connection (0x01|0x0005) status 0x00 ncmd 1

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

    status 0x00 handle 47 bdaddr E8:06:88:42:6E:7D type ACL encrypt 0x00

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

    handle 47

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

    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1

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

    status 0x00 handle 47

    Features: 0xbc 0x02 0x04 0x38 0x08 0x00 0x00 0x00

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

    bdaddr E8:06:88:42:6E:7D mode 2 clkoffset 0x0000

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

    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1

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

    status 0x00 bdaddr E8:06:88:42:6E:7D name 'mijenix...s keyboard'

< HCI Command: Authentication Requested (0x01|0x0011) plen 2

    handle 47

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

    Authentication Requested (0x01|0x0011) status 0x00 ncmd 1

> HCI Event: Link Key Request (0x17) plen 6

    bdaddr E8:06:88:42:6E:7D

< HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6

    bdaddr E8:06:88:42:6E:7D

> HCI Event: Command Complete (0x0e) plen 10

    Link Key Request Negative Reply (0x01|0x000c) ncmd 1

    status 0x00 bdaddr E8:06:88:42:6E:7D

> HCI Event: PIN Code Request (0x16) plen 6

    bdaddr E8:06:88:42:6E:7D

< HCI Command: Read Remote Version Information (0x01|0x001d) plen 2

    handle 47

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

    Read Remote Version Information (0x01|0x001d) status 0x00 ncmd 1

< HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23

    bdaddr E8:06:88:42:6E:7D len 4 pin '1234'

> HCI Event: Command Complete (0x0e) plen 10

    PIN Code Request Reply (0x01|0x000d) ncmd 1

    status 0x00 bdaddr E8:06:88:42:6E:7D

> HCI Event: Link Key Notification (0x18) plen 23

    bdaddr E8:06:88:42:6E:7D key 406FB90AAA25563C49DA82D33A2C5A63 type 0

    Type: Combination Key

> HCI Event: Auth Complete (0x06) plen 3

    status 0x00 handle 47

< HCI Command: Authentication Requested (0x01|0x0011) plen 2

    handle 47

< ACL data: handle 47 flags 0x02 dlen 10

    L2CAP(s): Info req: type 2

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

    handle 47 packets 1

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

    Authentication Requested (0x01|0x0011) status 0x00 ncmd 0

> ACL data: handle 47 flags 0x02 dlen 16

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

      Extended feature mask 0x0004

        Bi-directional QoS

< ACL data: handle 47 flags 0x02 dlen 12

    L2CAP(s): Connect req: psm 1 scid 0x0040

> HCI Event: Read Remote Ver Info Complete (0x0c) plen 8

    status 0x00 handle 47

    LMP Version: 2.0 (0x3) LMP Subversion: 0x31c

    Manufacturer: Apple, Inc. (76)

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

    handle 47 packets 1

> ACL data: handle 47 flags 0x02 dlen 16

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

      Connection successful

< ACL data: handle 47 flags 0x02 dlen 12

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

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

    handle 47 packets 1

> ACL data: handle 47 flags 0x02 dlen 18

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

      MTU 185 

> ACL data: handle 47 flags 0x02 dlen 16

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

      MTU 185 

< ACL data: handle 47 flags 0x02 dlen 18

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

      MTU 185 

< ACL data: handle 47 flags 0x02 dlen 24

    L2CAP(d): cid 0x0042 len 20 [psm 1]

        SDP SSA Req: tid 0x0 len 0xf

          pat uuid-16 0x0100 (L2CAP)

          max 65535

          aid(s) 0x0000 - 0xffff

          cont 00

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

    Unknown (0x00|0x0000) status 0x00 ncmd 1

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

    handle 47 packets 1

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

    handle 47 packets 1

> HCI Event: Auth Complete (0x06) plen 3

    status 0x00 handle 47

> ACL data: handle 47 flags 0x02 dlen 27

> ACL data: handle 47 flags 0x01 dlen 27

> ACL data: handle 47 flags 0x01 dlen 27

> ACL data: handle 47 flags 0x01 dlen 27

> ACL data: handle 47 flags 0x01 dlen 24

    L2CAP(d): cid 0x0040 len 128 [psm 1]

        SDP SSA Rsp: tid 0x0 len 0x7b

          count 118

          cont 02 00 76

< ACL data: handle 47 flags 0x02 dlen 26

    L2CAP(d): cid 0x0042 len 22 [psm 1]

        SDP SSA Req: tid 0x1 len 0x11

          pat uuid-16 0x0100 (L2CAP)

          max 65535

          aid(s) 0x0000 - 0xffff

          cont 02 00 76

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

    handle 47 packets 1

> ACL data: handle 47 flags 0x02 dlen 27

> ACL data: handle 47 flags 0x01 dlen 27

> ACL data: handle 47 flags 0x01 dlen 27

> ACL data: handle 47 flags 0x01 dlen 27

> ACL data: handle 47 flags 0x01 dlen 24

    L2CAP(d): cid 0x0040 len 128 [psm 1]

        SDP SSA Rsp: tid 0x1 len 0x7b

          count 118

          cont 02 00 EC

< ACL data: handle 47 flags 0x02 dlen 26

    L2CAP(d): cid 0x0042 len 22 [psm 1]

        SDP SSA Req: tid 0x2 len 0x11

          pat uuid-16 0x0100 (L2CAP)

          max 65535

          aid(s) 0x0000 - 0xffff

          cont 02 00 EC

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

    handle 47 packets 1

> ACL data: handle 47 flags 0x02 dlen 27

> ACL data: handle 47 flags 0x01 dlen 27

> ACL data: handle 47 flags 0x01 dlen 27

> ACL data: handle 47 flags 0x01 dlen 27

> ACL data: handle 47 flags 0x01 dlen 24

    L2CAP(d): cid 0x0040 len 128 [psm 1]

        SDP SSA Rsp: tid 0x2 len 0x7b

          count 118

          cont 02 01 62

< ACL data: handle 47 flags 0x02 dlen 26

    L2CAP(d): cid 0x0042 len 22 [psm 1]

        SDP SSA Req: tid 0x3 len 0x11

          pat uuid-16 0x0100 (L2CAP)

          max 65535

          aid(s) 0x0000 - 0xffff

          cont 02 01 62

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

    handle 47 packets 1

> ACL data: handle 47 flags 0x02 dlen 27

> ACL data: handle 47 flags 0x01 dlen 27

> ACL data: handle 47 flags 0x01 dlen 27

> ACL data: handle 47 flags 0x01 dlen 27

> ACL data: handle 47 flags 0x01 dlen 24

    L2CAP(d): cid 0x0040 len 128 [psm 1]

        SDP SSA Rsp: tid 0x3 len 0x7b

          count 118

          cont 02 01 D8

< ACL data: handle 47 flags 0x02 dlen 26

    L2CAP(d): cid 0x0042 len 22 [psm 1]

        SDP SSA Req: tid 0x4 len 0x11

          pat uuid-16 0x0100 (L2CAP)

          max 65535

          aid(s) 0x0000 - 0xffff

          cont 02 01 D8

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

    handle 47 packets 1

> ACL data: handle 47 flags 0x02 dlen 27

> ACL data: handle 47 flags 0x01 dlen 27

> ACL data: handle 47 flags 0x01 dlen 27

> ACL data: handle 47 flags 0x01 dlen 1

    L2CAP(d): cid 0x0040 len 78 [psm 1]

        SDP SSA Rsp: tid 0x4 len 0x49

          count 70

          record #0

              aid 0x0000 (SrvRecHndl)

                 uint 0x10000

              aid 0x0001 (SrvClassIDList)

                 < uuid-16 0x1124 (HID) >

              aid 0x0004 (ProtocolDescList)

                 < < uuid-16 0x0100 (L2CAP) uint 0x11 > <

                 uuid-16 0x0011 (HIDP) > >

              aid 0x0005 (BrwGrpList)

                 < uuid-16 0x1002 (PubBrwsGrp) >

              aid 0x0006 (LangBaseAttrIDList)

                 < uint 0x656e uint 0x6a uint 0x100 >

              aid 0x0009 (BTProfileDescList)

                 < < uuid-16 0x1124 (HID) uint 0x100 > >

              aid 0x000d (AdditionalProtocolDescLists)

                 < < < uuid-16 0x0100 (L2CAP) uint 0x13 > < uuid-16 0x0011 (HIDP) > > >

              aid 0x0100 (SrvName)

                 str "Apple Wireless Keyboard"

              aid 0x0101 (SrvDesc)

                 str "Keyboard"

              aid 0x0102 (ProviderName)

                 str "Apple Inc."

              aid 0x0201 (SrvDBState)

                 uint 0x111

              aid 0x0202 (unknown)

                 uint 0x40

              aid 0x0203 (unknown)

                 uint 0x21

              aid 0x0204 (unknown)

                 bool 0x0

              aid 0x0205 (unknown)

                 bool 0x1

              aid 0x0206 (unknown)

                 < < uint 0x22 str 05 01 09 06 a1 01 85 01 05 07 19 e0 29 e7 15 00 25 01 75 01 95 08 81 02 75 08 95 01 81 01 75 01 95 05 05 08 19 01 29 05 91 02 75 03 95 01 91 01 75 08 95 06 15 00 26 ff 00 05 07 19 00 2a ff 00 81 00 c0 05 0c 09 01 a1 01 85 47 05 01 09 06 a1 02 05 06 09 20 15 00 26 ff 00 75 08 95 01 81 02 c0 c0 05 0c 09 01 a1 01 85 11 15 00 25 01 75 01 95 03 81 01 75 01 95 01 05 0c 09 b8 81 02 06 ff 00 09 03 81 02 75 01 95 03 81 01 05 0c 85 12 15 00 25 01 75 01 95 01 09 cd 81 02 09 b3 81 02 09 b4 81 02 09 b5 81 02 09 b6 81 02 81 01 81 01 81 01 85 13 15 00 25 01 75 01 95 01 06 01 ff 09 0a 81 02 06 01 ff 09 0c 81 22 75 01 95 06 81 01 85 09 09 0b 75 08 95 01 b1 02 75 08 95 02 b1 01 c0 > >

              aid 0x0207 (unknown)

                 < < uint 0x409 uint 0x100 > >

              aid 0x0209 (unknown)

                 bool 0x1

              aid 0x020a (unknown)

                 bool 0x1

              aid 0x020b (unknown)

                 uint 0x100

              aid 0x020c (unknown)

                 uint 0x1f40

              aid 0x020d (unknown)

                 bool 0x1

              aid 0x020e (unknown)

                 bool 0x1

          record #1

              aid 0x0000 (SrvRecHndl)

                 uint 0x10001

              aid 0x0001 (SrvClassIDList)

                 < uuid-16 0x1200 (PNPInfo) >

              aid 0x0004 (ProtocolDescList)

                 < < uuid-16 0x0100 (L2CAP) uint 0x1 > <

                 uuid-16 0x0001 (SDP) > >

              aid 0x0009 (BTProfileDescList)

                 < < uuid-16 0x1200 (PNPInfo) uint 0x100 > >

              aid 0x0200 (VersionNumList)

                 uint 0x100

              aid 0x0201 (SrvDBState)

                 uint 0x5ac

              aid 0x0202 (unknown)

                 uint 0x239

              aid 0x0203 (unknown)

                 uint 0x50

              aid 0x0204 (unknown)

                 bool 0x1

              aid 0x0205 (unknown)

                 uint 0x2

          cont 00

< ACL data: handle 47 flags 0x02 dlen 24

    L2CAP(d): cid 0x0042 len 20 [psm 1]

        SDP SSA Req: tid 0x5 len 0xf

          pat uuid-16 0x1200 (PNPInfo)

          max 65535

          aid(s) 0x0000 - 0xffff

          cont 00

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

    handle 47 packets 1

> ACL data: handle 47 flags 0x02 dlen 27

> ACL data: handle 47 flags 0x01 dlen 27

> ACL data: handle 47 flags 0x01 dlen 27

> ACL data: handle 47 flags 0x01 dlen 19

    L2CAP(d): cid 0x0040 len 96 [psm 1]

        SDP SSA Rsp: tid 0x5 len 0x5b

          count 88

          record #0

              aid 0x0000 (SrvRecHndl)

                 uint 0x10001

              aid 0x0001 (SrvClassIDList)

                 < uuid-16 0x1200 (PNPInfo) >

              aid 0x0004 (ProtocolDescList)

                 < < uuid-16 0x0100 (L2CAP) uint 0x1 > <

                 uuid-16 0x0001 (SDP) > >

              aid 0x0009 (BTProfileDescList)

                 < < uuid-16 0x1200 (PNPInfo) uint 0x100 > >

              aid 0x0200 (VersionNumList)

                 uint 0x100

              aid 0x0201 (SrvDBState)

                 uint 0x5ac

              aid 0x0202 (unknown)

                 uint 0x239

              aid 0x0203 (unknown)

                 uint 0x50

              aid 0x0204 (unknown)

                 bool 0x1

              aid 0x0205 (unknown)

                 uint 0x2

          cont 00

< ACL data: handle 47 flags 0x02 dlen 12

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

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

    handle 47 packets 1

> ACL data: handle 47 flags 0x02 dlen 12

    L2CAP(s): Disconn rsp: dcid 0x0042 scid 0x0040

< HCI Command: Disconnect (0x01|0x0006) plen 3

    handle 47 reason 0x13

    Reason: Remote User Terminated Connection

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

    Disconnect (0x01|0x0006) status 0x00 ncmd 1

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

    status 0x00 handle 47 reason 0x16

    Reason: Connection Terminated by Local Host

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

    bdaddr E8:06:88:42:6E:7D class 0x002540 type ACL

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

    bdaddr E8:06:88:42:6E:7D role 0x00

    Role: Master

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

    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1

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

    status 0x00 bdaddr E8:06:88:42:6E:7D role 0x00

    Role: Master

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

    status 0x00 handle 48 bdaddr E8:06:88:42:6E:7D type ACL encrypt 0x00

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

    handle 48

> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7

    bdaddr E8:06:88:42:6E:7D mode 1

> ACL data: handle 48 flags 0x02 dlen 12

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

< ACL data: handle 48 flags 0x02 dlen 16

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

      Connection pending - No futher information available

< ACL data: handle 48 flags 0x02 dlen 10

    L2CAP(s): Info req: type 2

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

    handle 48 packets 1

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

    handle 48 packets 1

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

    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1

> ACL data: handle 48 flags 0x02 dlen 16

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

      Extended feature mask 0x0004

        Bi-directional QoS

< ACL data: handle 48 flags 0x02 dlen 16

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

      Connection successful

< ACL data: handle 48 flags 0x02 dlen 12

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

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

    handle 48 packets 1

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

    handle 48 packets 1

> ACL data: handle 48 flags 0x02 dlen 16

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

      MTU 185 

< ACL data: handle 48 flags 0x02 dlen 18

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

      MTU 185 

> ACL data: handle 48 flags 0x02 dlen 18

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

      MTU 185 

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

    status 0x00 handle 48

    Features: 0xbc 0x02 0x04 0x38 0x08 0x00 0x00 0x00

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

    bdaddr E8:06:88:42:6E:7D mode 2 clkoffset 0x0000

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

    handle 48 packets 1

> ACL data: handle 48 flags 0x02 dlen 12

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

< ACL data: handle 48 flags 0x02 dlen 16

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

      Connection pending - Authorization pending

< ACL data: handle 48 flags 0x02 dlen 12

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

< ACL data: handle 48 flags 0x02 dlen 16

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

      Connection refused - security block

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

    handle 48 packets 1

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

    handle 48 packets 1

> ACL data: handle 48 flags 0x02 dlen 12

    L2CAP(s): Disconn rsp: dcid 0x0043 scid 0x0040

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

    handle 48 packets 1

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

    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1

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

    status 0x13 bdaddr E8:06:88:42:6E:7D name ''

    Error: Remote User Terminated Connection

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

    status 0x00 handle 48 reason 0x13

    Reason: Remote User Terminated Connection

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

    bdaddr E8:06:88:42:6E:7D class 0x002540 type ACL

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

    bdaddr E8:06:88:42:6E:7D role 0x00

    Role: Master

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

    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1

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

    status 0x00 bdaddr E8:06:88:42:6E:7D role 0x00

    Role: Master

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

    status 0x00 handle 46 bdaddr E8:06:88:42:6E:7D type ACL encrypt 0x00

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

    handle 46

> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7

    bdaddr E8:06:88:42:6E:7D mode 1

> ACL data: handle 46 flags 0x02 dlen 12

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

< ACL data: handle 46 flags 0x02 dlen 16

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

      Connection pending - No futher information available

< ACL data: handle 46 flags 0x02 dlen 10

    L2CAP(s): Info req: type 2

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

    handle 46 packets 1

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

    handle 46 packets 1

> ACL data: handle 46 flags 0x02 dlen 16

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

      Extended feature mask 0x0004

        Bi-directional QoS

< ACL data: handle 46 flags 0x02 dlen 16

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

      Connection successful

< ACL data: handle 46 flags 0x02 dlen 12

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

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

    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1

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

    handle 46 packets 1

> ACL data: handle 46 flags 0x02 dlen 16

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

      MTU 185 

< ACL data: handle 46 flags 0x02 dlen 18

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

      MTU 185 

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

    handle 46 packets 1

> ACL data: handle 46 flags 0x02 dlen 18

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

      MTU 185 

< ACL data: handle 46 flags 0x02 dlen 12

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

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

    handle 46 packets 1

> ACL data: handle 46 flags 0x02 dlen 12

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

< ACL data: handle 46 flags 0x02 dlen 16

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

      Connection pending - Authorization pending

< ACL data: handle 46 flags 0x02 dlen 16

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

      Connection refused - security block

> ACL data: handle 46 flags 0x02 dlen 12

    L2CAP(s): Disconn rsp: dcid 0x0045 scid 0x0040

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

    handle 46 packets 1

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

    status 0x00 handle 46

    Features: 0xbc 0x02 0x04 0x38 0x08 0x00 0x00 0x00

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

    bdaddr E8:06:88:42:6E:7D mode 2 clkoffset 0x0000

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

    handle 46 packets 2

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

    Remote Name Request (0x01|0x0019) status 0x00 ncmd 1

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

    status 0x13 bdaddr E8:06:88:42:6E:7D name ''

    Error: Remote User Terminated Connection

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

    status 0x00 handle 46 reason 0x13

    Reason: Remote User Terminated Connection

```

Any ideas what can be the problem?

Thanks in advice.

Cheers

mijenixLast edited by mijenix on Tue Sep 06, 2011 6:28 pm; edited 1 time in total

----------

## mijenix

it seems that I've to add /var/lib/bluetooth/AA\:AA\:AA\:AA\:AA\:AA/pincodes

 *Quote:*   

> 
> 
> BB:BB:BB:BB:BB:BB 9876
> 
> 

 

and File: /var/lib/bluetooth/AA\:AA\:AA\:AA\:AA\:AA/trusts

 *Quote:*   

> 
> 
> BB:BB:BB:BB:BB:BB [all]
> 
> 

 

this link helped my a lot http://en.gentoo-wiki.com/wiki/Bluetooth_Network_Aggregation_Point

after that it worked without problems.

----------

## mijenix

I forgot that it only works if I run once after pairing with simple-agent

```

bluez-test-device trusted E8:06:88:42:6E:7D yes

```

then it works after reboot/shutdown until I boot into Win7 or MacOS X. 

The Keyboard doesn't work there and I've to pair it and then under Gentoo it doesn't work anymore.

Someone any ideas?

Thanks in advice.

----------

## Sheldon

Hello,

I try to get a apple-keyboard connected.

But where do I find those pyhon-utilities:

simple-agent

bluez-test-device

and 

bluez-test-input

I've emerged bluez. And there those files aren't:

-bash: bluez-test-device: command not found (as root)

I found simple-agent on a Website, copied it and with some more python-modules it does its work, I believe.

But where do I get the others?

----------

## Sheldon

Sorry, didn't read that:

https://forums.gentoo.org/viewtopic-t-880305-start-0-postdays-0-postorder-asc-highlight-blueztestdevice.html

----------

