public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@codecoup.pl>
To: Ordit Gross <ordit.gross@orcam.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: recommended way to register on bluetooth event
Date: Wed, 02 Oct 2019 13:24:16 +0200	[thread overview]
Message-ID: <1580531.MKZco2byVY@ix> (raw)
In-Reply-To: <CAB+bgRaH+Vw1xDNQdOuG26v=QPvnporuo9waBeoxi7NTUE+8YA@mail.gmail.com>

Hi,

On Tuesday, 1 October 2019 15:36:19 CEST Ordit Gross wrote:
> hi all,
> I would like to register on encryption changed event.
> As far as I could tell mgmt-api does not consist of such capability.
> I think that reading from an HCI socket may enable me to read all
> events (and the needed one as well).
> is there a better way of registering on encryption changed event?
> 
> The reason I need this capability in the first place is that I want to
> enable repairing if BLE Peripheral Removes Pairing keys.
> currently, when the peripheral deletes his side of keys and attempt to
> connect to master, the master will get  encryption changed event with
> error  "PIN or Key Missing".
> that's why I want to be notified on application that we got this
> event, so I can delete my side of keys as well..
> 
> any suggestions?
> thanks in advance!!
> Ordit

Ha, I was working on that few years back but unfortunatelly it never got in... 
mostly due to objections about dropping old keys before new pairing (which I 
don't think is necessary with proposed Agent consent-based approach but others 
were not sharing my view on this ;-).

Kernel part with reporting proper error to userspace is done so userspace has 
all the information it needs. For bluetoothd I've sent RFC [1] which might 
give you a bit of headstart while working on this. In short, it extends Agent 
API with new call used to consent re-bond of remote device.

[1] https://marc.info/?l=linux-bluetooth&m=147031736607899&w=2

-- 
pozdrawiam
Szymon Janc



      parent reply	other threads:[~2019-10-02 11:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-01 13:36 recommended way to register on bluetooth event Ordit Gross
2019-10-02 11:05 ` Johan Hedberg
2019-10-02 11:24 ` Szymon Janc [this message]

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=1580531.MKZco2byVY@ix \
    --to=szymon.janc@codecoup.pl \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=ordit.gross@orcam.com \
    /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