# Mighty Mouse mit Bluetooth

## bytenirvana

Hi,

versuche gerade die Bluetooth MightyMouse von Apple anzuschliessen. Die Maus an sich kann ich nach dem Einschalten sehen:

```

hcitool info  XX:XX:XX:XX:XX:XX

Requesting information ...

        BD Address:  XX:XX:XX:XX:XX:XX

        Device Name: Mighty Mouse

        LMP Version: 1.2 (0x2) LMP Subversion: 0x314

        Manufacturer: Broadcom Corporation (15)

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

                <encryption> <slot offset> <timing accuracy> <role switch>

                <sniff mode> <RSSI> <power control> <enhanced iscan>

                <interlaced iscan> <interlaced pscan> <AFH cap. slave>

sdptool browse  XX:XX:XX:XX:XX:XX

Browsing XX:XX:XX:XX:XX:XX ...

Service Name: Mighty Mouse

Service Description: Mighty Mouse

Service Provider: Apple Computer, Inc.

Service RecHandle: 0x10000

Service Class ID List:

  "Human Interface Device" (0x1124)

Protocol Descriptor List:

  "L2CAP" (0x0100)

    PSM: 17

  "HIDP" (0x0011)

Language Base Attr List:

  code_ISO639: 0x656e

  encoding:    0x6a

  base_offset: 0x100

Profile Descriptor List:

  "Human Interface Device" (0x1124)

    Version: 0x0100

```

Nur verbinden mag er irgendwie nicht. Nach einem

```

/etc/init.d/bluetooth stop

hidd --killall   #(drop mouse connection)

/etc/init.d/bluetooth start

```

kommt immer

```

hidd --search

Searching ...

        Connecting to device XX:XX:XX:XX:XX:XX

Can't create HID control channel: Connection refused

```

oder

```

hidd --connect  XX:XX:XX:XX:XX:XX

Can't create HID control channel: Connection refused

```

Hier noch meine hcid.conf:

```

#

# HCI daemon configuration file.

#

# HCId options

options {

   # Automatically initialize new devices

   autoinit yes;

   # Security Manager mode

   #   none - Security manager disabled

   #   auto - Use local PIN for incoming connections

   #   user - Always ask user for a PIN

   #

   security user;

   # Pairing mode

   #   none  - Pairing disabled

   #   multi - Allow pairing with already paired devices

   #   once  - Pair once and deny successive attempts

   pairing multi;

   # Default PIN code for incoming connections

   passkey "0000";

}

# Default settings for HCI devices

device {

   # Local device name

   #   %d - device id

   #   %h - host name

   name "TR5MP %h (%d)";

   # Local device class

   class 0x000100;

   # Default packet type

   #pkt_type DH1,DM1,HV1;

   # Inquiry and Page scan

   iscan enable; pscan enable;

   # Authentication and Encryption (Security Mode 3)

   # richtig hier?

   auth enable;encrypt enable;

   

   # Default link mode

   #   none   - no specific policy 

   #   accept - always accept incoming connections

   #   master - become master on incoming connections,

   #            deny role switch on outgoing connections

   lm accept;

   # Default link policy

   #   none    - no specific policy

   #   rswitch - allow role switch

   #   hold    - allow hold mode

   #   sniff   - allow sniff mode

   #   park    - allow park mode

   lp rswitch,hold,sniff,park;

}

```

Wie bekomme ich denn meine MightyMouse zum laufen?

----------

## XMath

Hi,

ersetze mal die Zeile "passkey ..." mit "pinhelper /usr/lib64/kdebluetooth/kbluepin" falls du KDE und 64bit verwendest.

----------

## bytenirvana

 *XMath wrote:*   

> 
> 
> ersetze mal die Zeile "passkey ..." mit "pinhelper /usr/lib64/kdebluetooth/kbluepin" falls du KDE und 64bit verwendest.

 

 :Exclamation:  Mmh... ich benutze Fluxbox als WM, Gnome-Panel und KDE Konsole/Tilda. Also bischen was von beidem, ist aber 32bit x86.

mit

```

   # Default PIN code for incoming connections

   #passkey "0000";

   #stattdessen:

   pinhelper /usr/lib/kdebluetooth/kbluepin;
```

ist es dasselbe.

----------

## bytenirvana

Bin noch nicht soweit, dass es läuft. Was muss ich noch checken?

Gibt es noch Informationen, die ich angeben sollte?

----------

## 69719

Nimm mal "pin_helper /etc/bluetooth/pin-helper;" und anschließend "0000" in die "/etc/bluetooth/pin" eintragen.

----------

## bytenirvana

funktioniert nicht:

```
localhost conf.d # hidd --connect  XX:XX:XX:XX:XX:XX

Can't create HID control channel: Connection refused

```

```
localhost bluetooth # rfcomm connect 0 

Can't connect RFCOMM socket: Connection refused

```

Ich hab' so ziemlich alles emergt/konfiguriert was mit bluez zu tun hat une bekomme immer noch keine Verbindung, obwohl ich die Maus sehen kann.

Meine aktuelle hcid.conf:

```

localhost bluetooth # cat hcid.conf 

#

# HCI daemon configuration file.

# HCId options

options {

   # Automatically initialize new devices

   autoinit yes;

   # Security Manager mode

   #   none - Security manager disabled

   #   auto - Use local PIN for incoming connections

   #   user - Always ask user for a PIN

   security auto;

   # Pairing mode

   #   none  - Pairing disabled

   #   multi - Allow pairing with already paired devices

   #   once  - Pair once and deny successive attempts

   pairing multi;

   # Default PIN code for incoming connections

   #passkey "0000";

   #stattdessen:

   #pinhelper /usr/lib/kdebluetooth/kbluepin;

   #pin_helper /etc/bluetooth/pin-helper;

   pin_helper /etc/bluetooth/pin-helper;

}

# Default settings for HCI devices

device {

   # Local device name

   #   %d - device id

   #   %h - host name

   name "TR5MP %h (%d)";

   # Local device class

   class 0x000100;

   # Default packet type

   pkt_type DH1,DM1,HV1;

   # Inquiry and Page scan

   iscan enable; pscan enable;

   # Authentication and Encryption (Security Mode 3)

   # richtig hier?

   auth enable;encrypt enable;

   

   # Default link mode

   #   none   - no specific policy 

   #   accept - always accept incoming connections

   #   master - become master on incoming connections,

   #            deny role switch on outgoing connections

   lm accept;

   # Default link policy

   #   none    - no specific policy

   #   rswitch - allow role switch

   #   hold    - allow hold mode

   #   sniff   - allow sniff mode

   #   park    - allow park mode

   lp rswitch,hold,sniff,park;

}

```

Unter root zeigt hcid folgende Fehler an:

```

localhost bluetooth # hcid -n

hcid[31991]: Bluetooth HCI daemon

hcid[31991]: Parsing /etc/bluetooth/main.conf failed: No such file or directory

hcid[31991]: Unknown option 'pin_helper' line 26

hcid[31991]: syntax error line 26

hcid[31991]: Unknown option 'auth' line 47

hcid[31991]: Unable to get on D-Bus

```

----------

