linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michał Lowas-Rzechonek" <michal.lowas-rzechonek@silvair.com>
To: linux-bluetooth@vger.kernel.org
Subject: mesh: org.bluez.mesh.Element.MessageReceived method does not provide destination address
Date: Fri, 30 Aug 2019 20:43:01 +0200	[thread overview]
Message-ID: <20190830184301.zd3zaqrw7mv6r252@kynes> (raw)

Hi,

When trying to use subscriptions in meshd, I've noticed that
MessageReceived API does not provide the application with destination
address of the deceived message - instead, it only sends a boolean flag
saying if the message was part of a model subscription, or not.

I think this is problematic. There are use cases where a model is
interested in the destination address of a group subscription. For
example:

Imagine a dot-matrix, where each pixel is a mesh node.

Each of these pixels implements two models:
    on element 0, a GenericOnOffServer controlling the light output
    on element 1, a Blinkenlights Server model

Blinkenlights Server extends GenericOnOff Server and GenericOnOff
Client, and on top of that contains a translation table mapping group
address to either 'ON' or 'OFF'.

Now, when Blinkenlights Server receives a GenericOnOff Set message, it
looks up the destination address at the translation table, and sends a
*different* GenericOnOff Set to *its own* element 0, with target value
determined by the translation entry.

This allows users to configure each node in such a way, that sending a
*single* message to a group address causes all pixels to switch to a
preconfigured pattern *at the same time*.

Moreover, at the moment the application can't receive the label of a
virtual address the message is targeted to.


I'd like to discuss the API change, from the current:

	void MessageReceived(uint16 source, uint16 key_index,
					boolean subscription, array{byte} data)

to something like:

	void MessageReceived(uint16 source, uint16 destination,
                    uint16 key_index, array{byte} data)

	void VirtMessageReceived(uint16 source, array{byte}[16] label,
                    uint16 key_index, array{byte} data)

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

             reply	other threads:[~2019-08-30 18:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30 18:43 Michał Lowas-Rzechonek [this message]
2019-09-04 19:25 ` mesh: org.bluez.mesh.Element.MessageReceived method does not provide destination address Michał Lowas-Rzechonek
2019-09-04 19:48   ` Michał Lowas-Rzechonek
2019-09-04 20:26     ` Gix, Brian
2019-09-04 22:39       ` Stotland, Inga
2019-09-05  7:29         ` michal.lowas-rzechonek
2019-09-05  7:34       ` michal.lowas-rzechonek
2019-09-18  8:52 ` Michał Lowas-Rzechonek
2019-09-18 12:36   ` Michał Lowas-Rzechonek
2019-09-25 19:02   ` Stotland, Inga
2019-09-26 15:18     ` Gix, Brian
2019-09-26 20:41       ` Stotland, Inga
2019-09-26 23:48         ` Gix, Brian
2019-09-27  2:54           ` Stotland, Inga
2019-09-27  8:52         ` michal.lowas-rzechonek
2019-09-27 15:01           ` Gix, Brian
2019-09-27 15:50           ` Gix, Brian
2019-09-27 17:25             ` Stotland, Inga
2019-09-27 19:25               ` Gix, Brian
2019-09-30  7:18                 ` michal.lowas-rzechonek
2019-09-30 16:34                   ` Stotland, Inga
2019-09-30 17:57                   ` Gix, Brian

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=20190830184301.zd3zaqrw7mv6r252@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;
as well as URLs for NNTP newsgroup(s).