Re: Communication between onoff-app Zephyr sample and light switch example of NRF52 Mesh SDK

Johan Hedberg

Hi Martin,

On Fri, Nov 02, 2018, Martin wrote:
There are two ways used to send STATUS messages in
samples\boards\nrf52\mesh\onoff-app: One is by using
bt_mesh_model_send (line 319 ff.), and the other one is by using
bt_mesh_model_publish (line 352 ff.). When I run Zephyr on both of my
boards, everything works fine. But when I run Zephyr on one of the
boards and install the light switch client example of NRF52 Mesh SDK
on the other, only STATUS messages that are sent by using
bt_mesh_model_send appear on the board powered by the NRF52 Mesh SDK.
I am kind of stuck here and wondering why I get these differring
results. Does anyone have an idea on what is the reason for it might
be (e.g. difference in behavior of _publish and _send)?
The bt_mesh_model_publish() API depends on the model publication state.
So if that state hasn't been set correctly (e.g. the publish address)
then you wont get the results that you expect. The bt_mesh_model_send()
API on the other hand is more explicit and intended for any
non-publishing messaging (e.g. a server model's responses or client
model messages which aren't part of model publication).


Join to automatically receive all group messages.