This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

reply_status vs publish_state

Hi
I have tried the light demo example, where I do not understand the difference between "reply_Status" and "publish_State" on the server, then someone can explain the difference between the two

  • If you take a look at the nordic infocenter, you can find this paragraph:

    "Additonally, as defined in section 3.7.5.2 of the Mesh Profile Specification v1.0, an acknowledged message is transmitted and acknowledged by each receiving element by responding to that message. The response is typically a status message. The status message usually contains the current value of the state set by the SET message. Therefore, the model uses the set_cb() callback to fetch the current OnOff state value from the user application and sends this value using the reply_status() function. The server model also publishes its state in response to any received message, using the publish_state() function, if its publish address is set by the provisioner."

    Basically, whenever a node in the mesh network receives an acknowledged message, the model inside the node sends the OnOff state value back using the reply_status() function (i.e. what state is the model in, on or off).

    The server model publishes it's state using publish_state() if the provisioner has set the publish address.

Related