9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Richard Miller <9fans@hamnavoe.com>
To: 9fans@9fans.net
Subject: Re: [9fans] bluetooth
Date: Thu, 24 Sep 2009 14:59:50 +0100	[thread overview]
Message-ID: <cfa8a60de625c8af37d06871c3c8fa00@hamnavoe.com> (raw)
In-Reply-To: <20090924110310.GC22220@gradx.cs.jhu.edu>

>> ... or because you paired with the device at some time in
>> the past and have a stored link key for it.
>
> 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?

No, I mean keys which are kept in non-volatile store inside the
bluetooth chip.  The BT firmware kindly does this for you.

This means when you buy a secondhand phone, put a new SIM card
in it, and wipe its memory, it may still be paired with random
devices from its previous life.

> 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).

I think this is mixing too many unrelated things together.  Sdp is another
layer (like dns), and if you want to see active connections you can
use netstat.  /net/bt/devices is simply for relating names to addresses,
like /net/arp.

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

Where would you get the key from?  Link keys are generated internally
during the pairing transaction between devices.  The PIN used for pairing
is supplied by the user with a command to /net/bt/ctl, but this will be
different each time so there's no point giving it to factotum.

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

I can't see a compelling application for this but maybe I'm unimaginative.
If you are connected to a device and it disappears you'll get a hangup.




  reply	other threads:[~2009-09-24 13:59 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
2009-09-24 13:59             ` Richard Miller [this message]
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=cfa8a60de625c8af37d06871c3c8fa00@hamnavoe.com \
    --to=9fans@hamnavoe.com \
    --cc=9fans@9fans.net \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).