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

nrf5_SDK_for_Mesh_v420\examples\light_switch\client, how to add a node?

I use nrf5_SDK_for_Mesh_v420 on four nRF52 DK board, one is client, the other is server. But I fond, the light_switch_client example is used to control two server board, now I want to control three or more and more, how can I modify the code?

Thanks and best regards!

John

Parents
  • Hi,

    The example already control multiple servers, as all odd numbered servers are controlled (on and off) using two buttons, and all even numbered servers are controlled (on and off) using the remaining two buttons. For this, the light switch client has two generic on/off client models.

    If you want to add more generic on/off client models to the light switch client, you can increase the CLIENT_MODEL_INSTANCE_COUNT setting in light_switch_example_common.h.

    In addition to that, you must decide how those new models should be controlled, for instance change the code in main.c so that each button toggles a model between on and off (which lets you control four models instead of two).

    Regards,
    Terje

Reply
  • Hi,

    The example already control multiple servers, as all odd numbered servers are controlled (on and off) using two buttons, and all even numbered servers are controlled (on and off) using the remaining two buttons. For this, the light switch client has two generic on/off client models.

    If you want to add more generic on/off client models to the light switch client, you can increase the CLIENT_MODEL_INSTANCE_COUNT setting in light_switch_example_common.h.

    In addition to that, you must decide how those new models should be controlled, for instance change the code in main.c so that each button toggles a model between on and off (which lets you control four models instead of two).

    Regards,
    Terje

Children
Related