Date: Sat, 03 Dec 2005 10:25:36 -0800 From: Maksim Yevmenkin <maksim.yevmenkin@savvis.net> To: "P. Durante" <shackan@gmail.com> Cc: freebsd-bluetooth@freebsd.org Subject: Re: Automatic bluetooth device initialization Message-ID: <4391E320.2090006@savvis.net> In-Reply-To: <9307f5f20512030807x6eadc73cq9d9acc9dd5503a5b@mail.gmail.com> References: <9307f5f20512030807x6eadc73cq9d9acc9dd5503a5b@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4391E320.2090006>