# Bluetooth Mouse and kernel 2.6.0

## gurke

Hi, does anyone know if i need the bthid, to get a bluetooth mouse to work with kernel 2.6.0? I already tried, but the fake.o module doesnt compile. is there any workaround.

thanks a lot.

----------

## cbueche

I asked the same question to Peter Klausler, the author of bthid. Here is his response. Until the stuff is ported to 2.6, I switched back to kernel 2.4 (for other reasons as well, eg vmware works without unofficial patch)

 *Quote:*   

> For 2.6 the fake.o driver shouldn't be needed; I'm told that there's a legitimate driver in 2.6 that can be used to inject input events from user-land.  But I've been way too busy porting 2.6 to a new architecture to spend muchtime playing with it on i386, so I can't tell you how hard it would be to adjust bthid to use the new driver.

 

I have a logitech MX900, and I'm preparing a MX900 on linux web page, should be online within a few days.

Charles

----------

## gurke

yay, thanks for the information.

----------

## ColeSlaw

I got a MX900 for Christmas, and I am anxiously awaiting your webpage!  Please post a link ASAP!  (Must... Have... Bluetooth... Mouse...)   :Very Happy: 

----------

## gurke

the webpage is online   :Wink:  got my microsoft mouse to work.

http://www.bueche.ch/comp/mx900/mx900.html

----------

## cbueche

Hi again,

yes, the page went online, and I forgot to announce it here. BTW : I'm now running on 2.6.0, as I have found a vmware ebuild for gentoo that works fine with kernel 2.6.

Feedback about my page are welcome (even english enhancements  :Smile: 

Charles

----------

## iwasbiggs

I don't want to sound annoying, but did you ever try setting up that logitech wireless base?

I understand you have your own bluetooth built in, but I was curious if the station would still work (for us desktop users). I noticed that the BlueZ supported hardware is still out on the case as well.

You could always send it here for me to test it out  :Smile: .

On second thought, if you could find the chipset it uses (via unscrewing, the label, or the manual), that'd be just as good.

----------

## cbueche

Hi again,

as I understand, the device can do two things : hid or hci. To use it from bluez, you need to know how to switch it to hci and back. Marcel Holtman, the bluez maintainer, is working on the issue (understand bashing Logitech and/or reverse-engineering the docking). I am watching his work. As soon as some test code is available, I will try it and update my web page.

With the current official code, all my attempts resulted in a jerky mouse. As Marcel as explicitely stated that the CVS code isn't yet OK for this docking, I just wait. Sorry, too many other things to do  :Smile: 

Regs,

Charles

----------

## iwasbiggs

That's exactly what I had wondered. Thanks for the info!

----------

## oybed78

Really great page, I got almost the same configuration, Inspiron 600m with Truemobile 300 Bluetooth. 

One question:

How do you perform the CVS checkout and update?

```

mkdir /data/util/bluez-cvs (or any other dir)

cd /data/util/bluez-cvs

cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/bluez checkout . (1st time)

cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/bluez update . (later)

```

What do you replace the ' . (1st time) ' and ' . (later)' with ?? ... or am I completely lost ??

I probably have this problem because of my little knowledge about CVS...   :Embarassed: 

Thank you

----------

## cbueche

I'm not much more knowledgeable about CVS. The idea is to first go into an empty dir, then checkout in it, hence the dot (current dir).

If you execute the commands as listed, you should get it working. You may need to "emerge cvs" first.

Charles

----------

## gurke

just stop after the "." (dot). you dont need to replace anything.

----------

## cbueche

sorry, I updated the page to be a bit more consistent. The instructions are now always preceded by #

----------

## gurke

you should add a update, that you need to connect the mouse every time on boot, in case it is a MS-mouse. i got stuck on this one the first time. or is there any way to avoid this?

----------

## cbueche

Hi,

no idea, I have no MS mouse to test. Could it be that it happen if you switch to Windows (using another Bluetooth hub) and then back ?

If this is the case, I have been a victim as well, see this thread :

http://sourceforge.net/mailarchive/forum.php?thread_id=3687964&forum_id=1883

You may want to discuss this problem in the bluez-users mailing list. I'm not much more knowledgeable in bluetooth, but list members are real good geeks and very quick to help.

If you find more info, let me know so I can adapt my page for other MS users.

Charles

----------

## gurke

id really like to, but i finally managed to wreck it all. the mouse works only sporadically atm, after i installed my usb scanner (no idea what that has to do with it). i am using gentoo only. and im also using a dell inspiron 8600 (but not the integrated bluetooth, but ms wireless transciever)  :Wink: 

EDIT:

2 hours later and working again, without having anything done (didnt even restart,...).

EDIT 2:

It stoped working again, then started again, and now randomly continues this, im confused   :Confused:   batterys are pretty new.

EDIT 3:

Sorry for confusion -> batterys were low.   :Rolling Eyes: 

----------

## Strips

Hi..   great page cbueche  :Very Happy: 

I have tried to follow the howto but I seem to be missing the bthid command. Is there some elemental info I've missed? Which package contains bthid ?

I have emerged ALL the bluez-* packages in portage. Even made myself ebuilds of the latest bluez-utils and bluez-lib.

When I try to compile the CVS version like stated in the howto it stops during

```
./configure --prefix=/opt/bluetooth --with-bluetooth=/opt/bluetooth
```

 with this error: 

```
checking for bluetooth/bluetooth.h... no

configure: error: Bluetooth header files not found
```

I have successfully compiled libs first, and its there, I've checked.

Help   :Crying or Very sad:  ... I want my MX900 ...

Regards

Stian H. Larssen

----------

## cbueche

what do you have in /opt/bluetooth/include ?

Did you execute the "make install" from the "build and install libs2" step ?

Charles

----------

## Strips

I have:

```
# ls /opt/bluetooth/include/

bluetooth  bluez
```

I have done copy paste with the commands and manually written the commands several times. Stops at the same place every time   :Sad: 

Retried it one more time, and the same problem.

----------

## cbueche

I persist to think that your "make install" failed in some way. Did you do it under root, and do you have the /opt/bluetooth/include/bluetooth/bluetooth.h include file ? Mine is 4053 bytes.

I adapted my page to reflect the "root" need for make install, and added some infos on the uinput device.

Charles

----------

## gurke

 *Strips wrote:*   

> Even made myself ebuilds of the latest bluez-utils and bluez-lib.

 

you dont need bluez-lib and bluez-util from the bluez cvs, but you need libs2 and utils2. maybe you got the wrong ones.

----------

## Strips

 *cbueche wrote:*   

> I persist to think that your "make install" failed in some way. Did you do it under root, and do you have the /opt/bluetooth/include/bluetooth/bluetooth.h include file ? Mine is 4053 bytes.

 

I did it under root and the file is the same size.

Full command and output dump here (directory list of files in the end):

http://www.hlarssen.com/div/bluezdump.html

Stian

----------

## Strips

 *gurke wrote:*   

>  *Strips wrote:*   Even made myself ebuilds of the latest bluez-utils and bluez-lib. 
> 
> you dont need bluez-lib and bluez-util from the bluez cvs, but you need libs2 and utils2. maybe you got the wrong ones.

 

I found out that none of the official releases has bthid. But the next full release will. Though the CVS has bthid.

So I do believe CVS is needed here. Correct me if I'm wrong.

Would someone be so kind to create an CVS ebuild?.. that would be swell   :Wink: 

Stian

----------

## Strips

After some tinkering with the help and mental support of Charles Bueche I finally got it working. 

Thanks Charles.

But I had to compile the CVS with default paths and not --prefix=xxx and --with-bluetooth=xxx.

It looked like the .configure script didn't read the --with-bluetooth= parameter somehow.

And REMEMBER, uinput support in the kernel   :Wink: 

Regards

Stian

----------

## amigadave

According to http://sourceforge.net/mailarchive/forum.php?thread_id=3690705&forum_id=1881 it should be possible to use the MX900 USB Bluetooth charger/dongle in HCI mode with the latest CVS hid2hci. Am I understanding correctly and has anyone tried this?

----------

## markandrew

i just managed to get my new mx900 working with an IBM T41 (built-in bluetooth) but it wasn't very straightforward - eventually i changed my kernel (from mm-sources to gentoo-dev-sources) as i couldn't get the device node working properly under mm-, not sure if that was just me or that kernel but after changing it seemed much easier.

my setup:

gentoo running gentoo-dev-sources-2.6.5 with udev

latest bluez packages from portage

bthid-0.10 built under /usr/local

uinput and evdev enabled in kernel (as modules)

i found that i didn't actually need the latest cvs stuff from bluez - at least, i installed it but don't actually use anything from it now; i had to put in a line to /etc/conf.d/local.start to create the /dev/input/uinput node on startup, then just start a couple of rc scripts: 

bluetooth

bluetooth-hid (which calls /usr/local/bin/bthid, see above)

and wait for my mouse to be detected automatically.

only problem i have is that after using the mouse like this, turning off the bluetooth device (with FN-F5) hangs my machine; in general unloading usb stuff still seems quite unstable for me

EDIT: ah, i DID need the cvs stuff, just tried it without and it didn't work. oops  :Smile: 

note also that kernel 2.6.7 seems to fix the usb-unload hang problem!Last edited by markandrew on Fri Jul 02, 2004 10:46 am; edited 1 time in total

----------

## val

 *gurke wrote:*   

> you should add a update, that you need to connect the mouse every time on boot, in case it is a MS-mouse. i got stuck on this one the first time. or is there any way to avoid this?

 

This page: http://dev.gentoo.org/~puggy/btmouse-howto/btmousehowto.html  explains how to set up an script under /etc/init.d and have it automatically probe the mouse on every start up.

Thanks to cbueche I got my mouse working too!  Yay!

----------

## JSylvia007

I have tried EVERY guide to get my MX900 to work.  I know bluetooth works, and I KNOW that it detects my mouse, but i cant seem to get the bluetooth to turn into an "input" device...  Please let me know what I should post so someone can help diagnose my probmem.

I am using kernel 2.6.8-rc2-love3

and bluez-2.7 libs and utils.

~Jake

----------

## markandrew

i'd try a different kernel; i used to use mm-sources but had to switch to ck-sources as i couldn't get my MX900 to work with mm. i believe that love-sources are based on mm-, so this could be your problem.

----------

## idunno246

i have the ms mouse/keyboard.  In that kernel, my multimedia keys stopped working, i think there's problems with it.  2.6.7-love7 worked best for me, but you needed to patch that.  Also, try emerge libs/utils 2.9.  Just rename the ebuild and do a ebuil digest.

----------

