Re: About publish & subscribe mechanism in Bluetooth Mesh


Johan Hedberg
 

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.