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

Provisioner from light switch example to provision and configure himself as a client

Hello,

I am currently working on the nRF SDK for Mesh v3.1 and I am using a static provisioner as in the light switch example. I have merged the client and server functionality into one node, and my server-client nodes are perfectly able to be provisioned and configured by the static provisioner. However, I want to be able to use the provisioner as one of my server-clients as well, but it will not start the provisioning nor the configuration procedure for himself - even though I initialize him in a similar way as my other server-clients.

I am not sure how to do this. I have looked at the code from nRF SDK for Mesh v1.1 and in particular the access_setup function, but it is still not obvious for me how to adapt this example into my code. For instance, can I rewrite and use the prover_helper_provision_self() function to achieve this from SDK v3.1?

Parents
  • Hi again. 

    Sorry about the delay. 

    Some feedback from our Mesh developers: 

    For self-provisioning of a node, you need to consider the following points:
    1. Node basically needs a unicast address, device key, and a network key to be configured. This will make it behave as a provisioned node. Additionally, you can also provide custom IV index if you don't want to start at the default IV index of `0`.
    2. Do you want to use config client on this node to be able to configure itself using local loopback (such as configuring publication settings for self)? If yes, you will have to bind the config server to the device key handle as shown in `mesh_stack_provisioning_data_store()` function. Note that, for self-configuration to work properly, the config client must not be instantiated on Element 0 of the device. You can instantiate it on any other element on the node and this will work. If you don't want to do implement self-configuration using config client, you can directly use mesh stack's internal API to configure the node (e.g. model publication/subscriptions/default TTL/ etc.), refer to `config_server.c` to see how this can be implemented. 

Reply
  • Hi again. 

    Sorry about the delay. 

    Some feedback from our Mesh developers: 

    For self-provisioning of a node, you need to consider the following points:
    1. Node basically needs a unicast address, device key, and a network key to be configured. This will make it behave as a provisioned node. Additionally, you can also provide custom IV index if you don't want to start at the default IV index of `0`.
    2. Do you want to use config client on this node to be able to configure itself using local loopback (such as configuring publication settings for self)? If yes, you will have to bind the config server to the device key handle as shown in `mesh_stack_provisioning_data_store()` function. Note that, for self-configuration to work properly, the config client must not be instantiated on Element 0 of the device. You can instantiate it on any other element on the node and this will work. If you don't want to do implement self-configuration using config client, you can directly use mesh stack's internal API to configure the node (e.g. model publication/subscriptions/default TTL/ etc.), refer to `config_server.c` to see how this can be implemented. 

Children
Related