1. OCAU Merchandise is available! Check out our 20th Anniversary Mugs, Classic Logo Shirts and much more! Discussion in this thread.
    Dismiss Notice

Ubuntu Automatic Bluetooth Pairing Without Passkey?

Discussion in 'Other Operating Systems' started by IPW, May 27, 2010.

  1. IPW

    IPW Member

    Joined:
    Dec 3, 2002
    Messages:
    1,199
    Location:
    Gold Coast
    Hey all, I'm having trouble getting my keyboard to stay paired to my system between operating systems, I don't care if it works in bios as I've a usb keyboard hidden for selecting grub entries so it's all good.

    The problem I am having is ubuntu sets up the keyboard with a passkey, when I boot into windows 7, windows wants me to pair the keyboard again to get it to work and uses a different passkey. Back to ubuntu and now I have to pair again because windows has changed the passkey.

    I think I can get windows to pair to the keyboard without a passkey (use the checkbox in the pairing options) which is unsecure (does not matter at home) however I cannot find a way to get ubuntu to pair to the keyboard without a passkey.

    I am thinking I must use something like what is described in the Manual connection section of this link. https://help.ubuntu.com/community/BluetoothSetup as it seems like it will connect using the hardware id itself (like i'm going to do in windows) rather than using a passkey and encrypting the connection.

    If anyone has any info it would be greatly appreciated, I know I'm a pain with all these questions, when I know what to do though I'll be posting the solution far and wide so others don't have to search so hard for the info!:Pirate:
     
  2. OP
    OP
    IPW

    IPW Member

    Joined:
    Dec 3, 2002
    Messages:
    1,199
    Location:
    Gold Coast
    Ubuntu Keyboard without passkey

    Ok so I'm half way there, I have it working in windows, and I can also connect for a session in ubuntu. The problem I have is making it connect at startup because I cannot find /etc/default/bluetooth so I can edit it. Have they removed it in lucid?

    EDIT: Ok so i've made no more progress on the reconnecting at startup issue. Here is what i've done so far.

    Running Ubuntu 10.04 and Windows 7 using a Razer Orochi mouse and a microsoft bluetooth keyboard 6000.

    The mouse connects fine in both operating systems because it requires no passkey. This (and the internet) gave me the idea to connect the keyboard without a passkey.
    Easy enough to do in windows, seemingly harder in Ubuntu because I lack the skills.

    Windows:
    This is taken directly from a post by Todd Schiele at this link http://social.technet.microsoft.com...e/thread/af801c54-a410-4079-bda7-884d2129e84f

    It works for me. No problems at all.

    Ubuntu:
    First step was to go here https://help.ubuntu.com/community/BluetoothSetup and start following the instructions. I did the first part

    Which I didn't need to do but you might if you are reading this as a fix.

    IMPORTANT: Later in the guide it says to use the hidd command. I could not get this to work until I followed the instructions from the last post here https://answers.launchpad.net/ubuntu/+source/bluez-utils/+question/24516

    I can then skip down to the SETUP DEVICES section and run the commands there.
    This connects my keyboard for the session, however the connection will not persist through a reboot (understandably) and the next section of the guide Connect Devices at Startup requires the editing of /etc/default/bluetooth which no longer exists.

    I read that one can create this file with the lines you need and the program will use it, however I cannot get this to work, and when I add the required lines, it stops my mouse from working after a restart (until I delete the file and restart) and the keyboard doesn't work either. Here is the link to the info, the last post by Mevos says to just create the file (/etc/default/bluetooth) with the appropriate lines and the program will use it.
    http://ubuntuforums.org/showthread.php?t=1316959

    I hope I haven't confused anybody, and I'm hoping this will work in a system which still has a /etc/default/bluetooth file but I'm still looking for a solution in lucid.

    Thanks for any help

    EDIT3: Just found /etc/bluetooth which has a bunch of files one of which is /etc/bluetooth/rfcomm.conf
    The contents of this file are
    #
    # RFCOMM configuration file.
    #

    #rfcomm0 {
    # # Automatically bind the device at startup
    # bind no;
    #
    # # Bluetooth address of the device
    # device 11:22:33:44:55:66;
    #
    # # RFCOMM channel for the connection
    # channel 1;
    #
    # # Description of the connection
    # comment "Example Bluetooth device";
    #}

    This looks to me like I'm getting closer to what I need to know and I will report back when I have researched this file more.
     
    Last edited: May 27, 2010
  3. OP
    OP
    IPW

    IPW Member

    Joined:
    Dec 3, 2002
    Messages:
    1,199
    Location:
    Gold Coast
    WARNING: I SUSPECT THIS WAS CAUSING MY SYSTEM TO LOCK UP, TRY IT BUT IT'S A ROUGH SOLUTION!

    For future reference, this seems to be the way to go about fixing this issue for now.

    Make sure you have already done sudo apt-get install bluez-compat

    Then follow the instructions here: http://blog.projectnibble.org/2010/...buntu-9-04-jaunty-and-9-10-karmic-workaround/

    This should work, why didn't I just do this earlier?
     
    Last edited: Jul 7, 2010
  4. cleary

    cleary Mental in the Face

    Joined:
    Apr 25, 2003
    Messages:
    4,243
    Location:
    Griffith NSW
    Just saw your post in the ubuntu thread, figured I'd follow it up here since it's easier to read ;)


    Did you end up following the /etc/bluetooth/rfcomm.conf route? I've used it in the past for tethering my phone as a modem, so I can try and impart what I learnt from that...
     
  5. OP
    OP
    IPW

    IPW Member

    Joined:
    Dec 3, 2002
    Messages:
    1,199
    Location:
    Gold Coast
    No, I decided that was for phone stuff, I guess I should try it, but I couldn't work out what had to go where.

    For now, I've installed the blueman stack, as Hyrax1 suggested, and am still just using the terminal and command sudo hidd --search to reconnect when my keyboard drops out. It's a bit annoying, but I have a usb keyboard connected to the pc for using the boot menu (it was just easier to hide one there rather than hope the bluetooth stuff worked in bios) so I just jump up and hit cntrl + alt + T for a terminal, throw in the commands and sit back down while it connects.

    Still would be nice to have it work automatically though. Everything works fine once I connect it, until the keyboard sleeps and it drops. Same thing happens if I pair it properly with the blueman applet. Keyboard sleeps and wont connect when it wakes up.
     

Share This Page

Advertisement: