Re: Disabling Relay feature of a node of bluetooth mesh <ashish.shukla@...>

Hi Johan,

NODE1 does receives the messages and process it. But it relay/forward the same message to network by reducing TTL value by 1.

In my case, GATT client is mobile phone so it isn't possible to know whether it receives something or not, for now.

I'm attaching snapshot of terminal of NODE1, when it receives messages from NODE2 on pressing the button.

Warm regards,
Ashish Shukla
Jr. Embedded Engineer
Research & Development

Please consider the environment before printing this e-mail or its attachments.

Disclaimer: The information contained herein (including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Corvi

On Fri, Dec 8, 2017 at 12:23 PM, Johan Hedberg <johan.hedberg@...> wrote:
Hi Ashish,

On Fri, Dec 08, 2017, ashish.shukla@... 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

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


Join to automatically receive all group messages.