From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <2be43af8bc6609589374bd4a7c625a7a@hamnavoe.com> To: 9fans@9fans.net From: Richard Miller <9fans@hamnavoe.com> Date: Thu, 24 Sep 2009 09:22:17 +0100 In-Reply-To: <3e4833291ef0dcb43052d394aa5231e1@9netics.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Subject: Re: [9fans] bluetooth Topicbox-Message-UUID: 76e476e6-ead5-11e9-9d60-3106f5b1d025 >> cat /n/bt/devices >> (see what devices have been found) Typo - should be /net/bt/devices - currently gives you device address, class, and friendly name for all "known" devices (see below). First on list is self. term% cat /net/bt/devices 00025b0011bf 020104 'atom' 00236c9dd69f 38010c 'Richard Miller’s MacBook' > the application i have in mind inventories all device id's it sees > with a time stamp. What do you mean exactly by "sees"? A device may be known because it responded to an inquiry (probe for all devices) or a page (probe for specific device), or because it sent you an inquiry or a page, or because you paired with the device at some time in the past and have a stored link key for it. [A device may be set to respond to page but not inquiry. Or vice versa.] > while (sleep 1) { > echo `{ls /net/bt/ids}^'@'^`{date -n} > } The hardware can automatically do periodic inquiry scans in the background. I could add a command 'inquiry auto N' to enable this (but I guess you would still need a 'sleep' loop to look at the devices file). Advice sought: 1. Would it be helpful to have a timestamp in the devices record to give the time the device was last seen (for some value of "seen")? 2. When should a device disappear from the /net/bt/devices list?