Logitech dinovo BT dongle switch to HCI mode

I recently migrated from Gentoo Linux to openSuSE because I no longer have that much time to maintain the sane state of my system, and want my computer to just work when I need it… So far openSuSE surprised me and I was able to configure my system almost completely without even touching the shell where I almost lived in the Gentoo days…

However, I’m not able to make openSuSE automatically detect my logitech BT dongle (as part of a dinovo keyboard and mouse set) and switch it from HID to HCI mode so I’m able to use bluetooth.

What does work is this:

# /usr/sbin/hid2hci --method=logitech --vendor=046d --product=c70c

Then the dongle is switched to HCI mode, a bluetooth applet appears in gnome and I was able to pair with the keyboard, keypad, mouse and mobile phone

But I don’t want to manually run that command each time, so I figured the best way is to let udev handle that (?)…
As I didn’t find any udev rules to perform such an action I tried creating one myself, however, I’m not sure that I’m doing it right
/etc/udev/rules.d/70-hid2hci:

ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", RUN+="/usr/sbin/hid2hci --method=logitech --vendor=$attr{idVendor} --product=$attr{idProduct}"

But that doesn’t seem to work…(yes I reloaded the udev rules using udevadm)

What am I doing wrong?.. Or how do I make this work? And shouldn’t it already work out-of-the-box?

Why not create a bash script to do this? I could not tell if this works without being root, but here goes. Copy and paste the following text into a text editor and save it into the hidden /home folder /home/username/.config/autostart (or ~/.config/autostart) as the text file mymouse:

#!/bin/bash

#: Title       : mymouse
#: Date Created: Sat Jul 23 09:18:19 CDT 2011
#: Last Edit   : Sat Jul 23 09:18:19 CDT 2011
#: Author      : chojineke
#: Version     : 1.00
#: Description : 
#: Options     : 

/usr/sbin/hid2hci --method=logitech --vendor=046d --product=c70c

exit 0

# End Of Script

You must mark it executable with the command:


chmode +x ~/.config/autostart/mymouse

Now restart your PC and see if it works automatically for you.

Thank You,

Thanks for the suggestion, but I don’t really like that kind of solution as it is a user dependent solution and not system wide (as is the device). Also, it indeed doesn’t work if the user is not root.

I really would like to see it work with udev, but I don’t know what I do wrong. How do I debug udev rules?, maybe I can find out what goes wrong that way. (tried udevadm monitor, but that only show me the devices it sees coming up and down)

Simple solutions are the best solutions. You can try to fix the underling code of Linux of just run a script on startup. I would try placing it in /etc/rc.d/rc5.d and see if that works for everyone if there is more than one user here.

Thank You,

A script in rc.d would indeed do the trick, but then there is another catch: I often pull out that USB-receiver to put it into another PC to control that PC with keyboard and mouse. When I then plug the stick back in my desktop PC, I don’t have bluetooth anymore…And will have to manually restart that script, as root.

Therefore it is really udev’s job to do this… as udev is the system that sees devices getting pulled out and plugged in and udev can react on that…It has worked before when I was still using Gentoo. unfortunally I didn’t keep that udev rule when I migrated to openSuSE… I assume I do something wrong in that rule, but I can’t seem to find out what…

Simple solutions may work some times, but most of the time only on simple cases. In this case, the udev sub-system is especially designed to do things like this, so I should be able to get this to work. If it can’t, and it is suspected that’s because of a bug in udev, then that should be reported in a bug-report, so that it can be fixed. So I’m not trying to fix underlying linux code (myself), but trying to detect if this problem is caused by myself or by udev (thus needs reporting, so it can be fixed by somebody with knowledge about it).