I doubt, the data is getting updated wrongly in the application.
You can go through the mesh demo sensor_motion application, compare and check if you are missing inn your application. It uses WICED_BT_MESH_PROPERTY_PRESENCE_DETECTED.
Could you please share your modified code as well so that I can also go through it to identify the issue?
From our understanding I believe the Cypress provisioner MeshApp assigns the AppKey and unicast/ group address to the sensor server and sensor client. How ever it does not seem like the client is communicating with the server to receive the status. Is my understanding correct that the provisioner app creates and handles the AppKey and addresses that the two models are subscribed to, or do I need to assign those in the code?
1 of 1 people found this helpful
The Provisioner is responsible for generating and distributing AppKeys, netkeys, etc.
"How ever it does not seem like the client is communicating with the server to receive the status"
When sensor server is provisioned, it is configured to publish data to a group, if current group was configured. Or it is configured to publish data to "all-nodes", if there were no group. The sensor publication configuration can be modified using the provisioner application (android/ios app, meshclienit, clientcontrol).
If sensor_client app is also provisioned to the same group then it should also receive the status message. Otherwise, after provisioning and configuring the two devices (sensor, client and server), please configure the sensor server to publish the data to "all the nodes", and check whether you are getting the status message.
WICED_BT_MESH_SENSOR_GET event calls wiced_bt_mesh_model_sensor_server_data() which will create a mesh reply event from the received mesh event (wiced_bt_mesh_create_reply_event). This function doesn't create but just updates received mesh event to be used to send message back to the originator.