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

Multiple properties in status message

I am testing the Sensor example in the Mesh SDK.

For my implementation I need three properties that are given by the BT Mesh specification. (Properties 0x004F, 0x0057, 0x0059)

I know how to add these properties and I can publish them individually and they can be accessed from other nodes.

How can I publish all three states as one combined message? As far as I've seen, status messages always only contain one property.

Parents
  • Hi Domij, 

    It's actually possible to send multiple properties in one message. If you have a look at section 4.2.14 in the mesh profile spec, you can find the Marshalled Sensor Data format at table 4.30.

    In our example we don't send marshalled and I haven't tried myself. But it seems that you need to increase property_array to match with the number of propeties and you need to modify the sensor_status_publish() to publish the marshalled sensor data as defined in the spec. 

    To get the  status for all properties, Sensor get message should be sent to the server without any parameters. 

  • Thanks for the explanation, it really helps!

    Another question: I want to use periodic publishing. How do I determine what property is published (only the marshalled one)?

    My triesh showed that all properties in property array get periodically published when I set it up in the mesh app.

Reply Children
  • Hi, 

    I'm not 100% sure if you allowed to do that because that would require a new configuration in the config client/server. 
    Seems that you need to locally modify sensor_publication_schedule_cb() to choose which property you want to publish. But I'm not sure it's allowed by spec. 

    I will check this with the Mesh team, but it's most likely not allowed. 

Related