From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [Bluez-devel] Reading RSSI of non-connected devices From: Marcel Holtmann To: bluez-devel@lists.sourceforge.net In-Reply-To: <43970C1E.6020602@rumms.uni-mannheim.de> References: <4396F911.40705@rumms.uni-mannheim.de> <1133968124.3752.35.camel@blade> <43970C1E.6020602@rumms.uni-mannheim.de> Content-Type: text/plain Message-Id: <1133973783.3752.47.camel@blade> Mime-Version: 1.0 Sender: bluez-devel-admin@lists.sourceforge.net Errors-To: bluez-devel-admin@lists.sourceforge.net Reply-To: bluez-devel@lists.sourceforge.net List-Unsubscribe: , List-Id: BlueZ development List-Post: List-Help: List-Subscribe: , List-Archive: Date: Wed, 07 Dec 2005 17:43:03 +0100 Hi Andreas, > >the ioctl() is very old and number updated it to support Inquiry with > >RSSI or Extended Inquiry. The main reason for this is, because you can't > >update it without breaking backward-compatibility with older versions of > >the library and the tools. > > > >However you can program the HCI socket interface directly and read the > >inquiry result directly. Example code for this is already available in > >the mailing list archives. > > > > > Some posts say ioctl was bad because it's old, some posts say raw HCI > sockets were bad because the messed with BlueZ. Your hcitool apparently > is using ioctl for "hcitool scan" in its most recent version > downloadable from your site... you should avoid interfacing with the kernel, but listening for events on the HCI socket was and will be always safe. > Our software is a Java framework that shall continuously check the RSSI > of devices around in a background thread (test code for this is in C). > Another thread might be continuously using GPS data via BT and apart > from that we don't want to keep the user from using the BlueZ stack in a > "normal" way while our software is running. In this context is it safe > to use HCI sockets in the way you have suggested? In this case you should use periodic inquiry and listen for inquiry result events on the HCI raw socket. This is a safe way of doing it. You might wanna check out the D-Bus interface, but this new API might be still changed at lot. > I'm having a hard time finding the example you're mentioning over and > over... Do you have any search words for me? > Not having found it I would assume you mean hci_open_dev and > hci_send_cmd? Examples for the latter would be in the kernel driver > which I already have. Try to look for EVT_INQUIRY_RESULT_WITH_RSSI. Regards Marcel ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel