Re: About publish & subscribe mechanism in Bluetooth Mesh


Vikrant More <vikrant8051@...>
 

How to send simple one byte of data from one node to another node which are provisioned using meshctl using unicast addresses ?

>>For subscribing you don't need anything >>special, except that a
>>provisioner configures one or more >>subscription addresses to your
>>models. 

How to achieve this using available meshctl commands ?

On Mon, Nov 27, 2017 at 12:41 AM, Vikrant More <vikrant8051@...> wrote:
How to send simple one byte of data from one node to another node which are provisioned using meshctl using unicast addresses ?

>>For subscribing you don't need anything >>special, except that a
>>provisioner configures one or more >>subscription addresses to your
>>models. 

How to achieve this using available meshctl commands ?


On Nov 26, 2017 7:22 PM, "Johan Hedberg" <johan.hedberg@...> wrote:
Hi Vikrant,

On Sun, Nov 26, 2017, Vikrant More wrote:
> Is publish & subscribe mechanism only related with Group addresses ?
>
> Or we can add even unicast and virtual addresses in whitelist of Publish &
> Subscription list ?

You can find the answer in the Mesh Profile Specification. E.g. section
4.2.2.1 states: "The publish address shall be the unassigned address, a
unicast address, a Label UUID, or a group address".

> How to use these two structure:
>
> static struct bt_mesh_model_pub gen_level_pub;
> static struct bt_mesh_model_pub gen_onoff_pub;
>
> to create publish & subscribe model for testing ?

To make a model capable of publishing you need to give a reference to a
structure like that to the BT_MESH_MODEL() macro (the third parameter).
For subscribing you don't need anything special, except that a
provisioner configures one or more subscription addresses to your
models.

Johan


Join users@lists.zephyrproject.org to automatically receive all group messages.