Page 1 of 12 12311 ... LastLast
Results 1 to 10 of 118

Thread: HOWTO: Apple Wireless Keyboard (Bluetooth)

  1. #1
    Join Date
    Apr 2006
    Beans
    4

    HOWTO: Apple Wireless Keyboard (Bluetooth)

    This guide was previously written for Ubuntu 6.06. However, these instructions have been updated to work on Ubuntu 7.04 (Feisty Fawn).

    Changes made:
    Replaced "hidd --search" by "hidd --connect BD_ADDR"
    Replaced "/etc/init.d/bluez-utils" by "/etc/init.d/bluetooth"
    Added "HIDD_ENABLED=1"
    Added package "bluetooth" and "bluez-gnome"


    Hello guys,

    I lately had some trouble using my Apple Wireless Keyboard with Ubuntu 7.04 so I'd like to share my experiences with you. So this is a small guide on pairing your Apple Wireless Keyboard with your Bluetooth Dongle of choice. Okay, so let's get started.

    First of all, install the package bluez-gnome:

    Code:
    user@ubuntu:~$ sudo apt-get install bluetooth bluez-gnome
    Restart your desktop session by logging out and logging in again. This will automatically start the bluetooth applet which will help you enter the PIN during the bluetooth pairing process.

    Now we need to find out the Bluetooth Hardware Device Address (BD_ADDR) of our Apple Keyboard. Unfortunately, this is not written anywhere on the keyboard itself. So we need to turn on the keyboard (or restart it) using the switch on the bottom and run the following command:

    Code:
    user@ubuntu:~$ hcitool scan
    Scanning ...
            BD_ADDR       Apple Wireless Keyboard
    user@ubuntu:~$
    Okay, there we got the BD_ADDR and the name of our device.

    This seems to be the crucial piece of the bluetooth puzzle!

    Now copy that BD_ADDR to your clipboard and edit the file /etc/bluetooth/hcid.conf to enable authentication and encryption for this very BD_ADDR.

    Code:
    user@ubuntu:~$ sudo gedit /etc/bluetooth/hcid.conf
    Enter the following stanza at the end of the file, replacing BD_ADDR with your BD_ADDR from the clipboard:

    Code:
    device BD_ADDR {
        name "Apple Wireless Keyboard";
        auth enable;
        encrypt enable;
    }
    When you're finished, save the file and close gedit.

    We're now going to enable HID-support by default:

    Code:
    user@ubuntu:~$ sudo gedit /etc/default/bluetooth
    Change "HIDD_ENABLED=1" to "HIDD_ENABLED=0". Take care that using this how-to you do not need any "--connect BD_ADDR" parameters to hidd. So you can remove them from HIDD_OPTIONS. "HIDD_OPTIONS='--master --server'" is just fine.

    Save the file, close gedit and restart the Bluetooth subsystem using the following command:

    Code:
    user@ubuntu:~$ sudo /etc/init.d/bluetooth restart
     * Restarting Bluetooth services... [ ok ]
    Notice that this will terminate any active bluetooth connections. However, reconnecting should not be a problem

    Finally, we're ready to do the actual pairing. Restart the keyboard again using the switch on the bottom to make it discoverable. Do not hit any keys on your Apple Keyboard unless this tutorial says so. It might cause all sorts of strange trouble during the pairing procedure. Okay, so, right after restarting the keyboard, run the following command (replacing BD_ADDR by the actual address, of course ):

    Code:
    user@ubuntu:~$ sudo hidd --connect BD_ADDR
    user@ubuntu:~$
    Ubuntu will now try to connect to the keyboard without showing any progress bar or other output. It will just sit there and wait. Okay, enter a PIN consisting of 4 digits and hit the enter key (both on your Apple Keyboard). Right after hitting enter, a notification window should pop up on your desktop asking you for the PIN you just entered. Enter it. "hidd" should finish without further outputs. You should now be set up.

    I hope that this will be useful to some people out there. Feel free to correct me or ask questions
    Last edited by naag; April 2nd, 2007 at 07:05 PM. Reason: Update for 7.04 Feisty Fawn

  2. #2
    Join Date
    Aug 2005
    Location
    Sun Prairie, WI
    Beans
    181
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Apple Wireless Keyboard (Bluetooth)

    Thank you very much for this. I have to tell you that I was slightly disappointed that my bluetooth keyboard didn't 'just work' after I updated to Dapper, but then I was really disappointed when following the same steps that got it working under Breezy didn't work. While I don't remember the precise steps I took in Breezy, I do remember that they were way simpler than this.

    Anyhow, thanks again for the great howto. This worked perfectly (after I had properly charged batteries in the keyboard). Now all I have to do is find a bluetooth mouse that I can afford, There must be a grand total of 3 mice that are bluetooth and are not made by Apple. (Like the keyboards, hate the mice.)
    Adopt a post!! Click on the Unanswered Threads link and share the knowledge and love!

  3. #3
    Join Date
    Jun 2006
    Beans
    15

    Re: HOWTO: Apple Wireless Keyboard (Bluetooth)

    I followed these instructions to the T, but if I turn my keyboard off, it is never automatically recognized again.

    Every time I want to use it, I have to manually (and with another keyboard) type "sudo hidd --search".

    What might I be doing wrong?

  4. #4
    Join Date
    May 2005
    Beans
    498

    Re: HOWTO: Apple Wireless Keyboard (Bluetooth)

    [/QUOTE]

    Okay, now we're ready to do the actual pairing. Restart the keyboard again using the switch on the bottom. Do not hit any buttons on your Apple Keyboard unless this tutorial says so. It might cause all sorts of strange trouble during the pairing procedure. Okay, so, right after restarting the keyboard, execute the following command:

    Code:
    user@ubuntu:~$ sudo hidd --search
    Searching ...
            Connecting to device BD_ADDR
    user@ubuntu:~$
    As soon as it prints out "Connecting to device BD_ADDR", you should enter a PIN consisting of 4 digits and hit the Return key (on your Apple Keyboard). Right after hitting Return, a window should pop up on your computer asking you for the PIN you just entered. Enter it. You should now be set up.

    I hope that this will be useful to some people out there. Feel free to correct me or ask questions [/QUOTE]

    works thus far the I get

    "Searching ...
    Connecting to device 00:0A:95:3F:75:17
    Can't get device information: File descriptor in bad state"

    Any help received with thanks. It would really be nice if we could make a sticky out of this as I like many I suspect are using cheapo usb keyboards,mice and headsets with our good gear sat in a cupboard.

    I think there is a bluez file that stores the code for your seperate bluetooth devices. I seem to remember editing it a while back for my phone or headset but I knew the codes to enter.

  5. #5
    Join Date
    Dec 2006
    Beans
    2

    Re: HOWTO: Apple Wireless Keyboard (Bluetooth)

    What a great howto - it worked flawlessly the first time! Thanks so much for the info.

    However, similar to nakko above, I'm struggling to understand how to make the pairing automatic in the case of either the keyboard or computer falling asleep or restarting. Is it simply a matter of putting the "hidd --search" command in a startup script somewhere?

    Any help is much appreciated.

  6. #6
    Join Date
    Dec 2006
    Beans
    29
    Distro
    Gutsy Gibbon Testing

    Re: HOWTO: Apple Wireless Keyboard (Bluetooth)

    Or you can just uninstall bluez-utils. It worked like an instant charm for me. System -> Administration -> Synaptic Package Manager.

    Search for bluez, uncheck (check for removal) bluez-utils. Apply.

  7. #7
    Join Date
    Dec 2006
    Beans
    2

    Re: HOWTO: Apple Wireless Keyboard (Bluetooth)

    As it turns out, I found the information I needed here: https://help.ubuntu.com/community/BluetoothSetup Now my Apple Wireless Keyboard will work after reboot, and also wake the machine up from sleep. Brilliant! Now if I could just figure out how to get the Apple Wireless Mighty Mouse input to be interpreted properly...

  8. #8
    Join Date
    Jun 2006
    Beans
    88

    Wink Re: HOWTO: Apple Wireless Keyboard (Bluetooth)

    Thanks morphet!
    Removing the bluez utils mad both the keyboard and mouse pair instantaneously
    What an easy fix!

    zman

  9. #9
    Join Date
    May 2006
    Location
    Vermont
    Beans
    40
    Distro
    Ubuntu 6.06

    Re: HOWTO: Apple Wireless Keyboard (Bluetooth)

    This thread gives me hope. I don't have a bluetooth keyboard but I've been hoping that there's a way to get my usb rf keyboard/mouse to work on Ubuntu. (It works fine on a windows box and I like it.) The Ubuntu box recognizes it as shown by the following info in the Device Manager:

    Device Manager "Advanced" tab gives the following:

    button.has_state Bool false
    button.type strlist
    info.addons list hald-addon-keyboard
    info.capabilities list input, input.keyboard, button
    info.category strlist input
    info.parent strlist /org/freedesktop/Hal/devices/usb_device_195d_7777_noserial_if1
    info.product strlist Itron Powerful Receiver
    info.udi strlist /org/freedesktop/Hal/devices/usb_device_195d_7777_noserial_if1_logical_input
    input.device strlist /dev/input/event3
    input.physical_device strlist /org/freedesktop/Hal/devices/usb_device_195d_7777_noserial_if1
    input.product strlist Itron Powerful Receiver
    linux.device_file strlist /dev/input/event3
    linux.hotplug_type int 2(0x2)
    linux.subsystem strlist input
    linux.sysfs_path strlist /sys/class/input/input3/event3

    Any suggestions???????
    Dell 4550 with Pentium-4 2.66 GHz running Ubuntu 6.06 networked to a custom box with ASRock 775i65GV mobo and Core2-duo cpu running WinXP for GIS work.

  10. #10
    Join Date
    Jan 2006
    Beans
    95
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: HOWTO: Apple Wireless Keyboard (Bluetooth)

    Arghh, this guide used to work for me.

    Now when I follow the above steps, upon running "sudo hidd --search", it says it's connecting to the device.

    I then input my PIN, but just get

    Searching ...
    Connecting to device 00:0B:94:42:39:66
    Can't get device information: Permission denied


    Any ideas???

Page 1 of 12 12311 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •