Bluetooth Solution for openSUSE 11.1

After having great difficulty getting the new KDE graphical interface for Bluetooth running in the new 11.1, so I changed tracks and focused on the command line, instead. With a lot of help from “jhe” in freenode, we got the BT device registered and automatically detected in future reboots. I wanted to document these commands for everyone else struggling with their own bluetooth configuration. After reading through the forum posts here, it seems like I was not alone in having problems.

HOWTO Bluetooth Apple Keyboard (aluminum model):

All commands must be run as root.

First, determine the BT dongle is working correctly. This HOWTO assumes it is. Refer to other documents if you are having trouble here.

Next, determine the address of the BT device. In this case, the keyboard was 00:1E:52:FF:68:44

hcitool scan

Next, download the two developer scripts, simple-agent and test-device :
git.kernel.org - bluetooth/bluez.git/tree - test/

Configure these scripts on your system so they can be run as root, with the chmod command.

Turn on your BT device.

Pair your device with the bluetooth dongle using the following command :

./simple-agent hci0 00:1E:52:FF:68:44

Type a four digit code when prompted for a PIN, and type the same on the keyboard. You should get a device path, if it works correctly. For example:

New device (/org/bluez/6308/hci0/dev_00_1E_52_FF_68_44)

Lastly, connect to the device, using your device path :

dbus-send --system --dest=org.bluez --print-reply /org/bluez/6308/hci0/dev_00_1E_52_FF_68_44 org.bluez.Input.Connect

Your BT keyboard should now be functional. Do not be afraid to run these commands more than once, if they did not immediately succeed. Bluetooth works on cycles of many seconds. Personally, I ran the dbus-send command three times before a connection was established.

Finally, to keep from having to run these commands on every boot, run this command to establish a trust for the device:

./test-device.pl trusted 00:1E:52:FF:68:44 yes

Let me know if this helps you get up and running. Happy hacking.

Thanks, that helped me with my bluetooth mouse.
But I really hope there will be a patch or something, because I don’t want to manage my bluetooth devices with the console.

There was an outstanding bug regarding the lack of a working bluetooth gui before 11.1 was released. Honestly I’m very disappointed it was released before the issue was resolved. The best work around proposed was to install the gnome bluetooth package since kde3 bluetooth is broken on kde4. It’s an upstream issue, but hopefully an update to bluetooth will be released soon.

hi,

i hv problem when execute ./simple-agent

error as below
insp1420:~ # ./simple-agent hci0 00:07:61:9B:FF:A5
File “./simple-agent”, line 21
def Release(self):
^
IndentationError: unexpected indent

can someone tell me what is happen?

tks

The solution is working well with Logitech travel bluetooth mouse

worked fine for the MS mice 5000 'til the next reboot. :wink:
Even after the restart hcitool scan can’t find the mice again.
Any idea?
Best regards
Bernd

bluetooth works if using bluez packages from seifes repo and using gnome-bluetooth tools from within a gnome-session.
when using gnome-bluetooth tools from within a kde-session it doesn’t work.

Next, download the two developer scripts, simple-agent and test-device :
git.kernel.org - bluetooth/bluez.git/tree - test/

Configure these scripts on your system so they can be run as root, with the chmod command.

Could you please explain how to do this?

Thank you in advance

Nope doesn’t work for me in 11.0. My logitech cordless mediaboard pro still doesn’t work I only get errors.


linux-*:/home/*/Documents # ./simple-agent hci0 00:07:61:76:8F:A0
ERROR:dbus.connection:Unable to set arguments ('00:07:61:76:8F:A0', '/test/agent', 'DisplayYesNo') according to signature u'so': <type 'exceptions.TypeError'>: Fewer items found in D-Bus signature than in Python arguments
Traceback (most recent call last):
  File "/usr/lib64/python2.5/site-packages/dbus/connection.py", line 563, in msg_reply_handler
    reply_handler(*message.get_args_list(**get_args_opts))
  File "/usr/lib64/python2.5/site-packages/dbus/proxies.py", line 391, in _introspect_reply_handler
    self._introspect_execute_queue()
  File "/usr/lib64/python2.5/site-packages/dbus/proxies.py", line 378, in _introspect_execute_queue
    proxy_method(*args, **keywords)
  File "/usr/lib64/python2.5/site-packages/dbus/proxies.py", line 132, in __call__
    **keywords)
  File "/usr/lib64/python2.5/site-packages/dbus/connection.py", line 543, in call_async
    message.append(signature=signature, *args)
TypeError: Fewer items found in D-Bus signature than in Python arguments

^CTraceback (most recent call last):
  File "./simple-agent", line 109, in <module>
    mainloop.run()
KeyboardInterrupt
linux-*:/home/*/Documents # New device (/org/bluez/6308/hci0/dev_00_07_61_76_8F_A0)
bash: syntax error near unexpected token `('
linux-*:/home/*/Documents # New device /org/bluez/6308/hci0/dev_00_07_61_76_8F_A0
bash: New: command not found
linux-*:/home/*/Documents # dbus-send --system --dest=org.bluez --print-reply /org/bluez/6308/hci0/dev_00_07_61_76_8F_A0 org.bluez.Input.Connect
Error org.freedesktop.DBus.Error.UnknownMethod: Method "Connect" with signature "" on interface "org.bluez.Input" doesn't exist

Download them. Right mouse click on “raw” and use “Save link As” (probably you must rename it with the original name)
After downloading…
open a terminal or konsole and change to the directory where you have previously downloaded them. (cd /downloaded/directory)
then execute the command “chmod +x nameofthefile” without quotes and then execute “su” without quotes and
Then execute “python name_of_script” (I think this is a python script) and follow the rest of the manual

Good luck

Luis

Yes, to tell the truth, I cannot get the device to be trusted either. I have got to run the “dbus-send” command upon every reboot. I need to eventually put together a BASH script that will pull the device path from /var/log/messages and run the “dbus-send” command automatically, but I have been procrastinating, in hopes this issue will be resolved with an official openSUSE patch. For now, my wired keyboard remains connected in order to run the command every morning!

Arrghhh… this is too much pain for a tiny mouse…

This why I love linux 80% of the time and hate it the other 20%.

Simple hardware can be a pain in the arse!>:(

silalaval schrieb:
> Arrghhh… this is too much pain for a tiny mouse…
>
> This why I love linux 80% of the time and hate it the other 20%.
>
> Simple hardware can be a pain in the arse!>:(

Bluetooth is not “simple hardware”. It is extremely complex.
Small surprise it isn’t working every time. More of a surprise
it works as often as it does.

It may be complex, but it is not a new technology (formally specified in 1998), it is an open standard, and it is very popular. A functional Bluetooth implementation is a requirement for a modern desktop operating system.

matthewcraig schrieb:
> Tilman Schmidt;1918738 Wrote:
>> Bluetooth is not “simple hardware”. It is extremely complex
>
> It may be complex, but it is not a new technology (formally specified
> in 1998), it is an open standard, and it is very popular. A functional
> Bluetooth implementation is a requirement for a modern desktop operating
> system.

Absolutely agree. I was just responding to silalaval’s rant
about “simple hardware” not working.

Happy new year
T.

nelsonlye@linux-s0ab:~/Desktop> ./simple-agent hci0 00:07:61:D4:B4:DE
Creating device failed: org.bluez.Error.AlreadyExists: Bonding already exists

Hi I have this problem. After I had restart my PC…

I’d like to use the steps from “HOWTO Bluetooth Apple Keyboard (aluminum model)” with an other bluetooth device, i.e. with a mobile internet connection. With some older SuSe I used

pand --connect <address> --service NAP

to pair with my mobile and then was asked by kbluetooth (?) for the PIN. How can I do this with above descritption (or any other way with SuSe 11.1)?

I think at least the “org.bluez.Input.Connect” in the dbus-send command has to be changed?

openSUSE 10.x thru 11.0 never failed to detect and set up my Kensington Bluetooth Mouse on a Thinkpad T43. The combo worked so well I guess it is time to do a retrograde back to 11.0 or maybe try out that new shiny sidux 2008-4 DVD that’s working so well on my main box.

This is a big disappointment!

Hi all, I have some problem…is for the TRUST part…

linux-0wpl:/home/nelsonlye/Documents # ./test-device.pl trusted 00:07:61:D4:B4:DE yes
bash: ./test-device.pl: No such file or directory

Can someone guide me??? Thanks…

Hi,
I’m using the simple-agent script and it asks for a PIN. But what is it???
I’m trying to connect a Microsoft (sorry, please don’t ban me) Intellimouse Explorer for Bluetooth and it does not have any PIN’s or passkeys…
What am I supposed to enter? Please help… Thanks!