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

how does the Provisioner identify a device as client or server?

Hi,

1. I went through the document. I'm trying the example applications Light-Switch on PCA10040 DK and NRF5 SDK for Mesh V2.2.0. So it is like the Client will be provisioned first and then the servers one by one.  I want to know how does the provisioner will decide it's a client/server?

Parents
  • Hi.

    If you take a look at the light_switch_provisioner example in SDK for Mesh v.2.2.0, you can see that you have to press button 1 to start provisioning.
    When button 1 is pressed, check_network_state() is called.

    And from there, (main.c, line:343) you can see that:

     else if (m_nw_state.provisioned_devices == 0)
            {
                /* Start provisioning - First provision the client with known UUID */
                m_exp_uuid.p_uuid = m_client_uuid_filter;
                m_exp_uuid.length = COMMON_UUID_PREFIX_LEN;
                __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Waiting for Client node to be provisioned ...\n");
                prov_helper_provision_next_device(PROVISIONER_RETRY_COUNT, m_nw_state.next_device_address, &m_exp_uuid, &m_current_uuid[0]);
                prov_helper_scan_start();

                hal_led_pin_set(APP_PROVISIONING_LED, 1);
            }

    So the provisioner uses the known UUID to identify and provision the client.
    The CLIENT_NODE_UUID is defined in the light_switch_example_common.h file.
    The same method is used for the server nodes.

    Best regards,
    Joakim.

  • Thank you for taking your time 

    will the UUID of client be pre-configured wrt to particular client individually?

    is there any flow chart of the complete example?

  • No problem, happy to help!

    You can also take a look at Bjørn's answer in this thread, regarding the same.

    Best regards,
    Joakim

Reply Children
Related