Losing bluetooth mouse connection (11.2)

I have installed OpenSuse 11.2 on my laptop. My configuration includes a usb dongle to which I connect a Microsoft Bluetooth Notbook Mouse 5000. Bluetooth Framework finds the mouse initially and everything works fine. However, when I switch off the mouse and back on again the mouse is not automatically reconnected and, moreover, Bluetooth Framework cannot be reliably configured to rediscover the mouse. i.e. ‘remove’, ‘new’, ‘search’ etc produces a very patchy result: mostly the mouse is found but remains disconnected, sometimes the mouse is periodically (ca. 5 secs) connected and disconnected, rarely it actually works. Bluetooth Framework also tends to crash on occasions, but I have not (yet) been able to recreate this behaviour repeatably to provide a useful crash report.

I have no reason to suspect the hardware, since it worked perfectly on OpenSuse 11.1 with KDE3.5 last week.

Can anyone help find a solution?

Many thanks…11.2/KDE4 makes a very good impression…

hn
:\

Have you tried securing the connection ? (i.e.: pairing the device while using a PIN-code, usually “0000” for mice)

The solved my problems, but I use a Logitech diNovo desktop (Mouse + Keyboard + Keypad).

You might also be interested in installing “blueman”, which seems to me being slightly more mature as KDE’s current bluetooth applet and being able to handle more varied bluetooth peripherals and scenarii.

Thanks, dr-yak!

I am not quite sure what you mean by ‘securing the connection’ in this case. Whereas I was able to do that with KDE3.5, the possibility is apparently not offered with KDE4.

Where would I get ‘blueman’ from?

Cheers
hn

  • The slow way : you could compile it yourself from the sources
  • The lazy way : use this website’s Search function to find a pre-compiled version.

Inside Blueman, use “Bond” to pair the device using a pin (keypad-less devices like Mice often use “0000” as their pin.

You can also use the “Trust” feature of Blueman (when this flag is enabled, the various services can be configured to automatically accept incoming connection - although I don’t think this is necessary for a mouse).

Of, course, thanks. I had not expected to find it here.

Bluemann is installed, but how is it to be started? There is no application and Blueman in the terminal (also as root) is ‘command not found’.

I also notice that there is also a python-blueman on this site. When I try to install that, however, there is a collision with other bluethooth standard installations.

“blueman-applet” will start a nice icon in the tray. From there on, you can use the applet’s menu to access various functions. The “Devices…” menu item will bring you the “blueman-manager” from where you can admin your devices.

Note: Seems like it doesn’t restart automatically in the next session under KDE. You’ll have to add a “.destktop” entry under “~/.kde4/Autostart/” to have it started on the next reboot. As I’m lazy I did it by copying and editing the “blueman-manager.desktop” to suit my needs.

These are all descriptions of what it should do. I know what it should do, I’ve been there with OpenSuse 11.1/KDE 3.5. But neither Kbluetooth4 nor blueman are behaving as I expect them to. Kbluetooth4 crashes with a Signal: 11 (Segmentation fault) if I quit the tray icon after having tried to make a connection with the mouse. Unfortunately there is no useful debug information to pass on to the developers. Blueman is installed, according to Yast, but there is no way to ‘start’ it even to get the tray icon.

Hum, strange. What are the error messages you get when you try starting “blueman-applet” in a konsole ?

‘command not found’. I may be mistaken, but an executable is nowhere to be found

sorry…my mistake…you said ‘blueman-applet’
I get the error message:

Traceback (most recent call last):
File “/usr/bin/blueman-applet”, line 25, in <module>
import pynotify
ImportError: No module named pynotify

Cheers

Most of the modules called “py{something}” in python are available in packages called “python-{something}” in openSUSE.

So :

sudo zypper install python-notify python-gtk

If you try to compile it from source (that’s what I did), you’ll also need the corresponding -devel packages and pyrex.

Note that the RPM dependencies should have required python-notify. You should drop a small e-mail notice to the repository’s maintainer the he/she forget it from the package dependencies.

Oh ! And a small note regarding battery usage : It seems that the Linux bluetooth stack doesn’t auto-disconnect unused devices. So if the hardware in your mouse doesn’t do it on its own, the connection will be kept forever, the devices will keep listening and talking over bluetooth, and this will drain the batteries faster (well sort of. Bluetooth Class 2 emitting power is only 2.5mW anyway)

So it might be a good idea to either keep the mouse on it’s charging craddle or use a wired device to disconnect it using blueman.

Good work, dr-yak!

I installed pynotify with Yast and started the applet again with the result below:

Loading configuration plugins


<module> (/usr/lib/python2.6/site-packages/blueman/main/Config.py:20)
Skipping plugin Gconf
No module named gconf
Deprecated use of dbus signaltracker
File “/usr/bin/blueman-applet”, line 290, in <module>
BluemanApplet()
File “/usr/bin/blueman-applet”, line 227, in init
self.Plugins = BluemanApplet.Plugins(self)
File “/usr/bin/blueman-applet”, line 67, in init
self.__config = Config()
File “/usr/lib/python2.6/site-packages/blueman/main/Config.py”, line 52, in new
inst = cls(section)
File “/usr/lib/python2.6/site-packages/blueman/plugins/ConfigPlugin.py”, line 48, in init
self.on_load(section)
File “/usr/lib/python2.6/site-packages/blueman/plugins/config/File.py”, line 121, in on_load
self.Monitor = Monitor(weakref.ref(self))
File “/usr/lib/python2.6/site-packages/blueman/plugins/config/File.py”, line 54, in init
self.sigs.Handle(“dbus”, self, self.on_value_changed, “ValueChanged”, “org.blueman.Config”)
File “/usr/lib/python2.6/site-packages/blueman/main/SignalTracker.py”, line 61, in Handle
traceback.print_stack()
Using file config backend
Traceback (most recent call last):
File “/usr/bin/blueman-applet”, line 290, in <module>
BluemanApplet()
File “/usr/bin/blueman-applet”, line 227, in init
self.Plugins = BluemanApplet.Plugins(self)
File “/usr/bin/blueman-applet”, line 70, in init
self.__config.props.applet_plugins = ]
File “/usr/lib/python2.6/site-packages/blueman/plugins/ConfigPlugin.py”, line 38, in setattr
self.dict"Config"]().set(key, value)
File “/usr/lib/python2.6/site-packages/blueman/plugins/config/File.py”, line 141, in set
self.Monitor.ValueChanged(self.section, key, value)
File “/usr/lib/python2.6/site-packages/dbus/decorators.py”, line 309, in emit_signal
message.append(signature=signature, *args)
ValueError: Unable to guess signature from an empty list


save (/usr/lib/python2.6/site-packages/blueman/plugins/config/File.py:123)
Saving config

After googling this one I only found that DBus has to be restarted.

sudo /etc/init.d/dbus restart

Strange, my home compiled Blueman started without any problem :-/

I think I am going to have to give up on this one. Many thanks for your help anyway.

In fact, I have now got it working perfectly. I discovered that the ‘kbluetooth’ package had not been installed properly, but only ‘kdebluetooth4’ package (‘KDE bluetooth framework’). I was not warned about missing/conflicting dependencies at the time.

Thanks again