From owner-freebsd-bluetooth@FreeBSD.ORG Mon Feb 6 18:17:54 2006 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 3AE5216A423 for ; Mon, 6 Feb 2006 18:17:54 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from mta13.adelphia.net (mta13.adelphia.net [68.168.78.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 994A743D48 for ; Mon, 6 Feb 2006 18:17:53 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [192.168.1.254] (really [70.32.199.60]) by mta13.adelphia.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20060206181752.VBID25152.mta13.adelphia.net@[192.168.1.254]>; Mon, 6 Feb 2006 13:17:52 -0500 Message-ID: <43E792C7.7070502@savvis.net> Date: Mon, 06 Feb 2006 10:17:43 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Markus Brueffer References: <200601211748.00824.markus@brueffer.de> <200601231245.35687.markus@brueffer.de> <43D98DF2.1060507@savvis.net> <200602060147.03384.markus@brueffer.de> In-Reply-To: <200602060147.03384.markus@brueffer.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: Missing HCI events 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: Mon, 06 Feb 2006 18:17:54 -0000 Markus, >>> In the meanwhile I have most of libkbluetooth compiling and >>> noticed, that a libhci would be very helpful and could ease >>> future user space developments/porting dramatically (I bet the >>> GNOME guys will come up with a bluetooth framework sooner or >>> later as well). How about incorporating such a lib in the >>> basesystem along with libsdp and libbluetooth (similar to lib_hci >>> of bluez)? >> >> funny you should mention that. someone actually asked me about this >> a while ago and even promised to start the work. >> >> there was a short thread in freebsd-bluetooth >> >> http://lists.freebsd.org/mailman/htdig/freebsd-bluetooth/2005-September/000 >> 410.html >> >> and i also have few email addressed directly to me. you might want >> to contact this person and ask about the progress. > > Nice, I'll contact him about his progress. In the meanwhile I have > made good progress on libhci. I have some questions, though: this is great! could you please publish it somewhere so we all can take a look? its ok if this is still work in progress, just curious what direction are you moving. > > 1. Is there a way to retrieve all hci node names? I know the way that > ngctl(8) uses, but that way requires root access. Is there another > way to retrieve all nodes with type "hci" which works with user level > privileges? no. you are right, there should be a way to enumerate all bluetooth nodes in the system. we should add this to hci (and possibly l2cap) raw sockets. it would be nice if you could share you thoughts on this. > 2. I have some Belkin BT dongles and they return the same devices on > inquiry multiple times. While this is allowed by the spec (Vol 2, > Chapter 7.1.1 of the BT 1.2 spec) the spec states the following: "It > is recommended that the Controller tries to report a particular > device only once during an inquiry or inquiry period.". Should the > removal of duplicates happen in libhci, later on by the user or on a > lower level? i have belkin device based on broadcom chip myself. it has exactly the same behavior. i think that removal of duplicates (if required at all) should happen in libhci. also each hci node caches inquiry results. cache inside hci node will remove duplicates automatically. while it is not the best solution (imo), libhci can take advantage of this and do something like - flush cache in the hci node - run inquiry (and do _not_ process any inquiry results, just wait for inquiry complete event) - get cache content from the hci node thanks, max