0

there is some misunderstanding between my Dell laptop with ubuntu and microsoft keyboard. When using default bluetooth software, keyboard is found, but bluetooth manager's pairing finishes with 'Unable to connect' message.

Blueman detects keyboard, but unable to connect it too.

But, this sequence of commands connects it without any password:

hcitool scan
sudo hidd --connect 00:12:A1:63:34:6E

Howevere even in this case after 15 minutes idle, keyboard switches to sleep mode, and cannot be properly connected back.

On the other hand this keyboard successfully connects to all my android device. In this case I have this connecting flow:

  • choose keyboard device in list of found device
  • android device generates unique pass (like 6789)
  • after password input using keyboard keys devices are paired

In my opinion something like this should happend when connecting to laptop.

So, if you know any way to solve this issue without becoming bluetooth-hacker and patching bluetooth stack I'll be very appreciate.

1 Answer 1

1

You helped me in getting the keyboard working with your thread, wherefore I will share my quick (and probably dirty) workaround how to avoid the 15 min idle problem, maybe it is of use to anyone.

Basically I created a small script which will try every 5 seconds to establish a connection to the keyboard if the keyboard is not already connected.

Here is the script:

#!/bin/bash
DEVICE_ID=7C:1E:52:A9:B5:B6
SHOW_OUTPUT=$(hidd --show)
echo ${SHOW_OUTPUT}

if [[ $SHOW_OUTPUT == *connected* ]]
    then echo "MS Sculp Keyboard is already connected."
else
    # try to connect the device:
    CONNECT_OUTPUT=$(hidd --connect ${DEVICE_ID})
    if [[ $CONNECT_OUTPUT == *down* ]]
    then
        echo "Device cannot be reached, maybe it is deactivated."
    fi
    #
    # check if the device was connected successfully:
    #
    SHOW_OUTPUT=$(hidd --show)
    if [[ $SHOW_OUTPUT == *connected* ]]
    then
        echo "The device was connected successfully."
    fi
fi
sleep 5
exec $0

DEVICE_ID has to be replaced by the id obtained from hcitool -scan. I used a cronjob to start the script when booting the system. I opened the cron table in a text editor with

sudo crontab -e

and added the line:

@reboot /usr/local/bin/establishMSSculpKeyboard.sh

to the table, where establishMSSculpKeyboard.sh is the name of the script, which i copied into the folder

/usr/local/bin

Best regards, aUser

1
  • It is pleasant that this question helped to you, but in case of having connection problem consider upgrading to 14.04. It run pretty well and there is no any problems with waking up. The only exception - first connection (at least in my case) was done via terminal, gui tool still don't want to pair with keyboard.
    – Alex Povar
    Sep 2, 2014 at 9:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .