# Wireless Apple Mighty Mouse over Bluetooth

## bytenirvana

Hi,

I'm really stuck to get my Bluetooth Mouse working with gentoo. I can see it:

```

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 

```

but it won't connect:

```

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 

```

Under root I get following error msgs:

```

localhost conf.d # hcid -n

hcid[5230]: Bluetooth HCI daemon

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

hcid[5230]: Unknown option 'pin_helper' line 23

hcid[5230]: syntax error line 23

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

```

I'm not sure why there is no main.conf or why it keeps asking for it. And I don't know what "Unable to get on D-Bus" means.

Thats my current 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:

   pin_helper /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)

   #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;

}

```

----------

## bytenirvana

I'm still trying to use the mouse. Here is a part of my xorg.conf

```

Section "ServerLayout"

   Option "AIGLX" "true"

   Identifier     "X.org Configured"

   Screen      0  "Screen0" 0 0

   InputDevice    "Mouse0" "CorePointer"

   InputDevice "MightyMouse"

   InputDevice    "Keyboard0" "CoreKeyboard"

   Option         "Xinerama" "off"

EndSection

Section "InputDevice"

   Identifier "MightyMouse"

   Driver "evdev"

#   Option     "SendCoreEvents" "true"

#   Option "Device" "/dev/input/mice"

#   Option "Buttons" "8" 

   Option "Name" "Mitsumi Electric Apple Optical USB Mouse" 

   Option "HWHEELRelativeAxisButtons" "6 7"

   Option "WHEELRelativeAxisButtons" "4 5"

#   Option "ZAxisMapping" "5 6 7 8" 

EndSection 

```

 and the USE flags for xorg-server:

```

[ebuild   R   ] x11-base/xorg-server-1.5.2  USE="dri hal ipv6 nptl xorg -3dfx -debug -dmx -kdrive -minimal -sdl" INPUT_DEVICES="evdev keyboard mouse -acecad -aiptek -calcomp -citron -digitaledge -dmc -dynapro -elo2300 -elographics -fpit -hyperpen -jamstudio -joystick -magellan -microtouch -mutouch -palmax -penmount -spaceorb -summa -synaptics -tek4957 -ur98 -vmmouse -void -wacom" VIDEO_CARDS="i810 vesa -apm -ark -ast -chips -cirrus -cyrix -dummy -epson -fbdev -fglrx -geode -glint -i128 -i740 (-impact) -imstt -mach64 -mga -neomagic (-newport) -nsc -nv -nvidia -r128 -radeon -radeonhd -rendition -s3 -s3virge -savage -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l -vermilion -vga -via -vmware -voodoo -xgi" 0 kB
```

----------

## mamac

Hi,

Same here when I start bluetooth.

Did you find a way to generate the main.conf file ?

Thanks

----------

## bytenirvana

No, not yet. But honestly I bought a Mac on which I dual boot so it's a only 50% problem for me   :Rolling Eyes: 

----------

## mamac

Not sure yet how it works but seems since I upgraded to kde4.3, things have changed for bluetooth, and now /etc/bluetooth/main.conf has been created, maybe when emerging bluez (bluez-utils and bluez-libs have been unmerged).

I'll dig a bit more later

----------

