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

How can I increase the number of servers (from 4 to 8 for example) in the light_switch_server / client sample in the ble mesh network



Hello,
I'm using the example package
Nordik_Mesh_V2_0_1 \ nrf5_SDK_for_Mesh_v2.0.1_src \ examples \ light_switch, and I would like to extend the number of servers from 4 to 8.


Also I realized that in the example, the provisioner, correctly configures the first 2 servers, however for the next 2 servers it does not configure the publish address (leave it FFFF). These last 2 servers receive the command on / off from the client, but can not answer their state.

Please can you help me with both questions?
Thank you

  • Hi,

    There is a known issue with the light switch provisioner, that it does not use CLIENT_NODE_COUNT and SERVER_NODE_COUNT correctly. In particular there are two comparisons in main.c of the provisioner example, "m_nw_state.provisioned_devices < SERVER_NODE_COUNT" and "m_nw_state.configured_devices < SERVER_NODE_COUNT", where you can fix an issue by replacing "SERVER_NODE_COUNT" with "(SERVER_NODE_COUNT + CLIENT_NODE_COUNT)".

    With the above fix, the provisioner should provision and configure up to SERVER_NODE_COUNT servers, as defined in examples/light_switch/include/light_switch_example_common.h

    Regards,
    Terje

  • Hi Terie
    Thank you for your answer, but I do not think this is the solution.
    I remind you that the definition SERVER_NODE_COUNT is already = 30

    My request was how to extend the client's m_model_pool to 8 servers instead of 4.

    In my previous request, I also had the second point:
    I also have the problem that servers 1 and 2 are configured correctly, while 3 and 4 do not have the publication address.

    I tried to solve problems in this way with this 2 solutions:
    1) To configure the 4 servers:
        in the node_setup.c file of the provisioner:
        in the setup_select_steps ()
        else if (addr <= (MIO_UNPROV_START_ADDRESS +
        CLIENT_NODE_ONOFF_CLIENT_MODEL_INSTANCES + 4))

        in the config_step_execute ()
        case NODE_SETUP_CONFIG_PUBLICATION_ONOFF_CLIENT3:
           client_pub_state_set (& pubstate, m_current_node_addr +
           ELEMENT_IDX_ONOFF_CLIENT3,
           MIO_UNPROV_START_ADDRESS +
          CLIENT_NODE_ONOFF_CLIENT_MODEL_INSTANCES +
          ELEMENT_IDX_ONOFF_CLIENT3);
       in the config_step_execute ()
      case NODE_SETUP_CONFIG_PUBLICATION_ONOFF_CLIENT4:
        client_pub_state_set (& pubstate, m_current_node_addr +
        ELEMENT_IDX_ONOFF_CLIENT4,
        MIO_UNPROV_START_ADDRESS +
       CLIENT_NODE_ONOFF_CLIENT_MODEL_INSTANCES +
       ELEMENT_IDX_ONOFF_CLIENT4);

    So all 4 servers receive commands from the client, answer individually to commands and can autonomously send their status to the client (like the first 2) and change the status of their led


    2) To extend number of servers in (client m_model_pool) from 4 to 8:
        In the nrf_mesh_config_app.h file
        #define ACCESS_MODEL_COUNT (1 + / * Configuration server * / \
                                1 + / * Health server * / \
                                4 + / * Simple OnOff client (4 groups) * / \
                                4 / * Simple OnOff client (4 unicast) * /)
          In the file: light_switch_example_common.h
          #define CLIENT_MODEL_INSTANCE_COUNT (8)

    now I see the m_model_pool structure increased from 4 to 8 (+ the first 2), but the provisioner configure only the first 4 server.

    I have to modify the provisioner to complete the configuration of the last 4 rows of the client

    Are these 2 solutions correct or is there another way?

    Thank you
    Marco

  • Hi,

    Sorry for the misunderstanding.

    I have been out-of-office over the past weeks, but I see that you started a new thread (How can I extend the maximum number of servers per client?) Are the issues solved now?

    Regards,
    Terje

Related