linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mesh: org.bluez.mesh.Element.MessageReceived method does not provide destination address
@ 2019-08-30 18:43 Michał Lowas-Rzechonek
  2019-09-04 19:25 ` Michał Lowas-Rzechonek
  2019-09-18  8:52 ` Michał Lowas-Rzechonek
  0 siblings, 2 replies; 22+ messages in thread
From: Michał Lowas-Rzechonek @ 2019-08-30 18:43 UTC (permalink / raw)
  To: linux-bluetooth

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2019-09-30 21:21 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-30 18:43 mesh: org.bluez.mesh.Element.MessageReceived method does not provide destination address Michał Lowas-Rzechonek
2019-09-04 19:25 ` 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

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