Re: Disabling Relay feature of a node of bluetooth mesh


ashish.shukla@corvi.com <ashish.shukla@...>
 

Hi Johan,
I was not understanding meaning of *CONFIG_BT_MESH_RELAY=n*  correctly. Thanks for clarification.

However, when I enabled the proxy feature of a node, and disabled its relay feature, it relays messages from mesh network as well. I'm using latest version  zephyr-1.10.0-rc3.   


--
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 Thu, Dec 7, 2017 at 4:20 PM, Johan Hedberg <johan.hedberg@...> wrote:
Hi Ashish,

On Thu, Dec 07, 2017, ashish.shukla@... wrote:
> Hi everyone !!!
>
> I'm trying to disable relay feature of node by making these two changes
>
> 1. setting  *CONFIG_BT_MESH_RELAY=n* in the prj.conf file.
>
> 2. static struct bt_mesh_cfg_srv cfg_srv = {
>    * .relay = BT_MESH_RELAY_DISABLED,*

Setting CONFIG_BT_MESH_RELAY=n will actually force the value of
cfg.relay to BT_MESH_RELAY_NOT_SUPPORTED when you initialize mesh, so
trying to set it to disabled shouldn't have any effect. When the value
is NOT_SUPPORTED it can't be changed to any other value at runtime
(which is probably why your attempts with SiLabs don't succeed).

> #if defined(CONFIG_BT_MESH_GATT_PROXY)
>     .gatt_proxy = BT_MESH_GATT_PROXY_ENABLED,
> #else
>     .gatt_proxy = BT_MESH_GATT_PROXY_NOT_SUPPORTED,
> #endif
>     .default_ttl = 5,
>
>     /* network retransmissions with 20ms interval */
>     .net_transmit = BT_MESH_TRANSMIT(5, 20),
>         /* relay retransmissions with 20ms interval */
>     .relay_retransmit = BT_MESH_TRANSMIT(5, 20),
> };
>
> After these two changes, node relays all the messages it receives except
> ones intended for itself.
> What else needs to be done to disable relay feature?
>
> Even Android app by Silicon Labs for bluetooth mesh is not able to disable
> relay feature.

Are you using the latest master branch, since there were fixes for this
feature earlier this week?

Also note that since you're setting gatt_proxy to BT_MESH_GATT_PROXY_ENABLED
it means that the node *is* expected to relay packets between the mesh
network and the GATT Client (however *not* relay packets from the mesh
network back to the mesh network).

Johan

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