Linux bluetooth development
 help / color / mirror / Atom feed
From: Michal Lowas-Rzechonek <michal.lowas-rzechonek@silvair.com>
To: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: Plans for meshd
Date: Tue, 18 Dec 2018 20:29:09 +0100	[thread overview]
Message-ID: <20181218192909.27htxh3glfgjmial@kynes> (raw)
In-Reply-To: <DEBB0CAA2616974FAE35E4B560B9A4375D8E0B35@ORSMSX101.amr.corp.intel.com>

Hi Brian,

On 12/18, Gix, Brian wrote:
> Maybe we should start with what you actually need.
> * Do you need GATT support only for the Provisioning procedure?
Primarily, but not only this. As Danielle mentioned, there are cases
where we would like to "fall back" to GATT in order to exchange large
amounts of data with a selected node. This is going to happen only
occassionally, so it won't affect the "steady state" performance of a
mesh network. Spec even mentions that particular use case, via Node
Identity procedure.

> * or also as a GATT proxy Server?
No, at the moment we don't need GATT Proxy Server support in Linux,
althouth long-term I think it would be beneficial for bluez to have
this.

> * I do not think we should try to support Proxy Client *at all*.
Agreed.

> The Proxy Client assumes a single Node, which defeats the purpose of
> having a daemon at all.
>
> * Only a single node (or unprovisioned GATT server) can use GATT at a
> time.  The protocol does not allow for the multi-node architecture of
> the daemon.
I do not think this is true. The spec doesn't seem to put any
limitations on the Network PDUs you can exchange with the GATT Proxy
Server, so I think it is entirely possible to have multiple Mesh nodes
share a single GATT connection to a proxy.

Noone does that, though, because performance of such a setup would
probably be abysmal :) In the end, I don't consider this a "real" use
case.

> *  If we do try to put a GATT Proxy Server on a single controller
> implementation, we may need a special node that loops back data
> received from the Mesh to the Gatt Client.
Well, I was wondering if it would be feasible to implement another
flavour of mesh-io layer, that would talk to Bluetooth Daemon (possibly
via API extensions) instead of opening the hci user channel on its own.

For that to work, the main Bluetooth Daemon would need to expose D-Bus
signals to retrieve "raw" advertising indications, and a method to send
a single advertising packet.

Alternatively (and this is just me thinking out loud), maybe it would be
possible to dup() the HCI socket and pass it to the Mesh Daemon,
assuming it gets spawneby by fork()ing Bluetooth Daemon? Not sure if the
kernel interface allows such sheganigans.

> * We may want to make this a build-time option, because ADV handling
> will probably be affected whether an existing GATT connection is
> established or not, if it is possible that a GATT connection could be
> requested.
> 
> * This affects the times when we can use Randomized, ever changing BD
> ADDRs, and requires us to interleave connectable advertisements and
> "be connectable", which is not technically allowed with mesh network
> ADV packets.
In our experience, /just enabling/ Proxy Server on a node (thus making
it advertise with connectables) does not seem affect delivery rate of
mesh packets, at least not meaningfully (0.1%, maybe). The performance
drop is observable only after an actual connection is established, and
is in 10-20% range, if I recall correctly.

regards
-- 
Michał Lowas-Rzechonek <michal.lowas-rzechonek@silvair.com>
Silvair http://silvair.com
Jasnogórska 44, 31-358 Krakow, POLAND

      parent reply	other threads:[~2018-12-18 19:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17 21:09 Plans for meshd Michał Lowas-Rzechonek
2018-12-17 21:48 ` Gix, Brian
2018-12-18 11:08   ` Michał Lowas-Rzechonek
2018-12-18 16:27     ` Gix, Brian
2018-12-18 17:07       ` Danielle Costantino
2018-12-18 17:24         ` Gix, Brian
2018-12-18 19:29       ` Michal Lowas-Rzechonek [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=20181218192909.27htxh3glfgjmial@kynes \
    --to=michal.lowas-rzechonek@silvair.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /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