From owner-freebsd-bluetooth@FreeBSD.ORG Sat Dec 3 18:25:49 2005 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36FC716A41F for ; Sat, 3 Dec 2005 18:25:49 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from mta11.adelphia.net (mta11.adelphia.net [68.168.78.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB9D243D64 for ; Sat, 3 Dec 2005 18:25:48 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [192.168.1.254] (really [70.32.199.60]) by mta11.adelphia.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20051203182547.VCSG26058.mta11.adelphia.net@[192.168.1.254]>; Sat, 3 Dec 2005 13:25:47 -0500 Message-ID: <4391E320.2090006@savvis.net> Date: Sat, 03 Dec 2005 10:25:36 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "P. Durante" References: <9307f5f20512030807x6eadc73cq9d9acc9dd5503a5b@mail.gmail.com> In-Reply-To: <9307f5f20512030807x6eadc73cq9d9acc9dd5503a5b@mail.gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: Automatic bluetooth device initialization X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2005 18:25:49 -0000 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