How to increase the number of elements for Provisioner example in Mesh v4.2.0?

In the Provisioner example (unmodified) given in nRF5_SDK_for_Mesh v4.2.0, they provide only 2 elements, even and odd. I've got 3 or more servers and I would like to control them individually using the light_lightness example from Mesh v4.2.0, how would I go about doing that?

  • Hi,

    The provisioner example is hard coded to expect a certain number of client/server models for a given example. The identification of the example is done through the Uniform Resource Identifier (URI) included in the beacons from the supported examples. The configuration steps for nodes of each example are defined through macros in the file config_scenarios.h. You can modify those by adding additional config steps. The mapping from URI to configuration steps is found in node_setup.c. You can also use the same patterns and add URIs, steps, etc. in those files and change the URI used by the modified lightness devices.

    Regards,
    Terje

  • Hi, thank you for your reply.

    I have added a new line under config_scenarios.h to increase the number of clients to 3, but there are still only 2 groups. Is there anything else I need to change/add in other folders?

  • Hi,

    CONFIG_LL_CLIENT is itself a list of steps:

    #define CONFIG_LL_CLIENT                      \
        NODE_SETUP_GET_NEXT_ELEMENT,              \
        NODE_SETUP_CONFIG_APPKEY_BIND_LL_CLIENT,  \
        NODE_SETUP_CONFIG_PUBLICATION_LL_CLIENT,  \
        NODE_SETUP_CONFIG_SUBSCRIPTION_LL_CLIENT

    What happens on those steps is controlled by config_step_execute() in node_setup.c. There, under case NODE_SETUP_CONFIG_PUBLICATION_LL_CLIENT: and under case NODE_SETUP_CONFIG_SUBSCRIPTION_LL_CLIENT:, you will find the actual code performed for the relevant steps.

    Through use of the function client_pub_address_get(), also in node_setup.c, the address of the node is checked and the group addresses for either the even or the odd group is returned, and used for the subscription. In order to change the group setup, config_step_execute() and/or other functions in node_setup.c is what you need to change.

    Regards,
    Terje

  • Hi, thank you, Mr Terje. You have solved my issue.

    Best regards,

    Eugene

Related