how do the BT mesh nodes report the status changes to provisioner

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
mawu_4270096
Level 5
Level 5
50 replies posted 25 replies posted 10 replies posted

Hi  all:

     I  have not found the API to notify the status changes of a node to the app, this question  will cause the  app status is out of  sync with device status

    the status is light  lightness, color temperature value, and so on !

thanks!

mandy

0 Likes
1 Solution

Is the question about the lightness and color temperature or a step motor :-). For the Light CTL model, See apps/snip/mesh/mesh_light_ctl_server.c, the call is

    wiced_bt_mesh_model_light_ctl_server_state_changed(...);

Note that your device needs to be configured for Publication to send unsolicited messages.

For the step motor, unfortunately there is no standard model. You can use Vendor Specific model and send whatever messages you need.

Note that you should be pretty careful with mesh messages, because the bandwidth is very limited. If your application does not need to send messages, do not send them. If phone UI does not require update more than once per second, configure your step motor to publish data once per second. You can also configure for publication when entering the screen and unconfigure when exiting the screen.

View solution in original post

3 Replies
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

"this question will cause the  app status is out of  sync with device status" -> On what condition it goes out of sync? Could you  please explain the steps?

If you are talking about the mesh mobile application (android/ios), then I believe WICED version of the application is stateless, which means it won't automatically update the status of the device if the user close and reopen the app. But the mesh device remember it's last state properly. I believe this issue has been solved in the latest version of mesh mobile app which comes with ModusToolbox.

Thanks,

-Dheeraj

mawu_4270096
Level 5
Level 5
50 replies posted 25 replies posted 10 replies posted

Hi  DheerajP_41:

    in  some  special  applications,  for example the motor control, as we know, the step motor move from a position to other position

   , the process need a longer time than the light is turned on/off .I  think  the node should report the position  to app after the motor

    has stopped

thanks!

mandy

0 Likes

Is the question about the lightness and color temperature or a step motor :-). For the Light CTL model, See apps/snip/mesh/mesh_light_ctl_server.c, the call is

    wiced_bt_mesh_model_light_ctl_server_state_changed(...);

Note that your device needs to be configured for Publication to send unsolicited messages.

For the step motor, unfortunately there is no standard model. You can use Vendor Specific model and send whatever messages you need.

Note that you should be pretty careful with mesh messages, because the bandwidth is very limited. If your application does not need to send messages, do not send them. If phone UI does not require update more than once per second, configure your step motor to publish data once per second. You can also configure for publication when entering the screen and unconfigure when exiting the screen.