Re: Disabling Relay feature of a node of bluetooth mesh


Johan Hedberg
 

Hi Ashish,

On Fri, Dec 08, 2017, ashish.shukla@corvi.com wrote:
Here is brief about my experimental setup :

1. NODE1 : Proxy enabled, Relay disabled
2. NODE2 : Proxy disabled, Relay disabled

Now, both nodes belong to same group, which means they are subscribed to
same group address. When I published data on the same group address over
GATT bearer using android app, NODE1 relays data, while NODE2 doesn't. This
is as it was expected.

NODE2 is programmed for a button interrupt, which submits a task to system
thread with callback function as below

static void pub_presence(struct k_work *work)
{
static unsigned char led = 0;
static unsigned char trans_id = 0;

int err;

bt_mesh_model_msg_init(root_models[2].pub->msg, OP_GEN_ONOFF_SET);
net_buf_simple_add_u8(root_models[2].pub->msg,led=led^1);
net_buf_simple_add_u8(root_models[2].pub->msg,trans_id++);

err = bt_mesh_model_publish(&root_models[2]);
if (err) {
printk("Error in publishing message ");
}

}

What I understand is this publishing is over advertising bearer,
Publishing is not tied to any specific bearer, rather the message is
expected to be delivered to all network interfaces the network layer is
connected to, including GATT.

and NODE1 should not be relaying this packet. But NODE1 relays this
packet as well.
What exactly do you mean by relaying? If NODE2 publishes the message
over advertising and NODE1 receives it over advertising, then NODE1
should at least process the message (since it's subscribed to the group
address). However upon receiving the message NODE1 should not forward
the message to any of its GATT clients or relay it back to the
advertising bearer. If you're seeing any of these last two things
happening, then I'd like to see the debug logs with ADV and NET debugs
enabled.

Also note that since NODE2 is subscribed to the same group address the
message will also be delivered locally to NODE2.

Johan

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