Bluetooth mouse

Maksim Yevmenkin maksim.yevmenkin at savvis.net
Fri Dec 17 10:26:27 PST 2004


Vladimir,

> I have found your message:
> ======================================
> you need to have Bluetooth HID (Human Interface Device) support. someone
> wrote me an e-mail a while ago asking the same question. i tried to
> explain Bluetooth HID and how it works. its not a rocket science - you
> just need write a daemon that opens a couple of L2CAP connection to the
> mouse and read bytes from it. then you feed these bytes
> into /dev/console via ioctl(2) to move actual mouse pointer. i'm not
> sure if this person working on this.
> ======================================
> 
> So I am ready to try it, Can you resend me your explanations ? 

good :)

> Also, I think, it is better to provide usual /dev/*msX interface for
> moused ? 

why?

> It looks like I need to write ng node which will connect to l2cap node
> one side and create /dev/btmsX on another side ? 

well, actually its much simpler :) most of the work already was done. 
take a look at /usr/src/usr.sbin/bluetooth/{bthidcontrol,bthidd}. these 
are not yet connected to the build, but you should be able to compile 
and run them.

bthidcontrol(8) is a utility that can query bluetooth hid devices and 
create configuration for bthidd(8).

% nroff -man bthidcontrol.8 | less -- for more information

bthidd(8) is a bluetooth hid daemon (incomplete but mouse should work). 
it will read configuration created by bthidcontrol(8) and talk to 
bluetooth hid devices.

whats needs to be done:

1) finish and test bthidd(8) and vkbd(4) integration (bluetooth keyboard 
support). i've done most of it, but was never able to finish and test it :(

2) better handling of bluetooth mouse events, i.e. detect double clicks 
etc. and send appropriate ioctl(2) to /dev/console. double clicks etc. 
will work in X, but not in the text mode.

thanks,
max


More information about the freebsd-bluetooth mailing list