9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Nathaniel W Filardo <nwf@cs.jhu.edu>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] bluetooth
Date: Thu, 24 Sep 2009 07:03:10 -0400	[thread overview]
Message-ID: <20090924110310.GC22220@gradx.cs.jhu.edu> (raw)
In-Reply-To: <2be43af8bc6609589374bd4a7c625a7a@hamnavoe.com>

[-- Attachment #1: Type: text/plain, Size: 2227 bytes --]

On Thu, Sep 24, 2009 at 09:22:17AM +0100, Richard Miller wrote:
> 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

Shouldn't factotum be in charge of storing keys?  Or do you mean just
keys that happen to be resident in the stack right now?

> 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?

How about exposing things as an ndb db so that we can add fields as the
need arises?
  mac=00112233445566 name="Friendly Name" !secret=0x... lastseen=timestamp
  active=rfcomm3, sdp=pan,rfcomm,...,...
(that might be a bad example, if sdp is done by a separate daemon, e.g.;
am just musing).

What about letting me set a stored key by writing a line into this as a
single write of "mac=... !secret=0x..." ala factotum's ctl file?

Oh hey... why not make the file also act like the sound mixers and jccfs
journals?  That is, just stream events out to readers, starting with a full
enumeration and then updates, then the "you are about to block" empty read,
then block until the next scan or timeout which changes something.

You can give an advisory signal (mac=... gone= or somesuch) that a device
should be considered gone (and purge it from the list you'd report to a
fresh client) after some small time interval... something between 5 and 30
seconds seems reasonable to me?  People watching the event stream are free
to do their own thing.

Does that seem reasonable?
--nwf;

[-- Attachment #2: Type: application/pgp-signature, Size: 204 bytes --]

  reply	other threads:[~2009-09-24 11:03 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-22 19:34 Skip Tavakkolian
2009-09-22 22:33 ` Patrick Kelly
2009-09-23  0:53 ` dave.l
2009-09-23 14:48   ` Richard Miller
2009-09-24 20:40     ` dave.l
2009-09-25 10:48       ` Richard Miller
2009-09-23 14:37 ` Richard Miller
2009-09-23 16:10   ` Skip Tavakkolian
2009-09-23 17:54   ` Skip Tavakkolian
2009-09-23 17:57     ` Francisco J Ballesteros
2009-09-23 18:11     ` Richard Miller
2009-09-23 20:57       ` Skip Tavakkolian
2009-09-24  4:33         ` lucio
2009-09-24  8:22         ` Richard Miller
2009-09-24 11:03           ` Nathaniel W Filardo [this message]
2009-09-24 13:59             ` Richard Miller
2009-09-24 20:05               ` Steve Simon
2009-09-25 10:23                 ` Richard Miller
2009-09-24 15:30           ` rsc
2009-09-24 15:57             ` Richard Miller
2009-09-24 19:06           ` Skip Tavakkolian
2009-09-25 10:11             ` Richard Miller
2009-09-25 11:30               ` matt
2010-04-26 18:09           ` Skip Tavakkolian
2022-03-19 19:05 [9fans] Perhaps someone can give me an advice Lyndon Nerenberg (VE7TFX/VE6BBM)
2022-03-19 19:52 ` [9fans] bluetooth Richard Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090924110310.GC22220@gradx.cs.jhu.edu \
    --to=nwf@cs.jhu.edu \
    --cc=9fans@9fans.net \
    --subject='Re: [9fans] bluetooth' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).