Automatic bluetooth device initialization
Maksim Yevmenkin
maksim.yevmenkin at savvis.net
Sat Dec 3 18:25:49 GMT 2005
Paul,
> I'm writing a daemon which takes advantage of dbus to manage bluetooth
> devices, until now I focused development mainly on linux but I'm
> keeping all the bluez-specific bits in a layer on its own and I'm
> investigating the possibility of a freebsd layer as well. From the
fine. if you could please tell us a little bit more and explain what is
wrong with the current way of doing things in linux and/or freebsd.
it was my understanding that linux has hcid daemon that takes care of
bluetooth device configuration.
in freebsd things where less flexible until recently. not so long ago i
have committed few bits and pieces to integrate bluetooth into freebsd
rc.d subsystem. i will update freebsd handbook bluetooth chapter shortly.
> source code of hccontrol and sdpcontrol it seems that the programming
> paradigm is not very different from the one used for linux (although
> your bt stack has nothing or little in common with bluez), but there's
correct. the concept of sockets in bluetooth domain is similar.
> a substantial difference I've stumbled upon today: in bluez it is
> possible to open a "control connection" with the bt stack and use this
> socket to asynchronously read stack internal events (like device
> added/removed), I used those events to trigger my daemon to send dbus
> signals and initialize some internal data structures which expose a
> bluetooth device over dbus, I'd like to know if something similar is
> available in the freebsd stack as well.
freebsd uses different approach. basically there is a devctl(4) driver
and devd(8) daemon. whenever a device is added to or removed from the
device tree, devd(8) will execute actions specified in its configuration
file.
devd(8) and devctl(4) man pages are available online at
http://www.freebsd.org/cgi/man.cgi?query=devd&apropos=0&sektion=0&manpath=FreeBSD+6.0-RELEASE+and+Ports&format=html
http://www.freebsd.org/cgi/man.cgi?query=devctl&sektion=4&apropos=0&manpath=FreeBSD+6.0-RELEASE+and+Ports
thanks,
max
More information about the freebsd-bluetooth
mailing list