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

How to provision 2 clients nodes?

I am trying to provision 2 clients for the mesh so that i they all can send the message to a single server.

I will list what all i have tried

1.I took a server node and changed the URI of the node from "EX_URI_DM_CLIENT" to "EX_URI_DM_SERVER". This didnt work

2.inside main.c of provisioner code i changed "m_nw_state.provisioned_devices ==1" to "m_nw_state.provisioned_devices <2" amd also i increased the client node count to 2 

These methods didnt work out.

Please tell me where i am going wrong.I am able to send messges from 1 client to diffrent servers but for my application i want a single node collecting message from various nodes.

I am using segger platform and nrf52832 and nrf52840 boards

and the latest SDK for mesh that is v3.10.

Thankyou

Parents
  • Hi Brijesh, 

    The easiest way of doing this is to use a phone to do provisioning. If the node supports PB-GATT (which the light switch supports) you can use the nRFMesh app on the phone to do provisioning. 

    1. You need to increase the number of clients to be provisioned in the provisioner in addition.

    2. If in check_network_state() you change else if (m_nw_state.provisioned_devices == 0) to else if (m_nw_state.provisioned_devices <2) and  CLIENT_NODE_COUNT to 2 in the provisioner code , it should work. 

    Above is for provisioning phase, in configuration phase you would need to update setup_select_steps() so that mp_config_step = client_config_steps; will be assigned for the first 2 devices not just the first one. You can change    if (addr == UNPROV_START_ADDRESS) to    if (addr < UNPROV_START_ADDRESS+2) so first two device being provision will be configured as the client. 

  • I followed the steps and provisioning was success ful bt configuration was not.

    this is the terminal output

    <t: 1016259>, access_reliable.c, 438, ----- Success p_reliable->model_handle=2---
    <t: 1017062>, main.c, 353, Config client event
    <t: 1017064>, node_setup.c, 262, opcode status field: 0
    <t: 1017067>, node_setup.c, 387, App key bind: 0x1002 server
    <t: 1017077>, access_reliable.c, 438, ----- Success p_reliable->model_handle=2---
    <t: 1044031>, main.c, 353, Config client event
    <t: 1044033>, node_setup.c, 262, opcode status field: 2
    <t: 1044036>, main.c, 294, Configuration of device 1 failed. Press Button 1 to retry.

    Does it have anything to do with the client instance on my 2nd node?

  • There is something wrong in this check_expected_status()

  • Hi Brijesh, 

    Could you check which rx_opcode has status code 2  ? Just printout rx_opcode in the same "opcode status field:" log in check_expected_status()

  • Its fine now I provisioned using the app it was easy.But i wanna know can i publish to multiple addresses using a same model 

    the problem i am facing now is that i have 3 client nodes and 1 server

    i am separately able to send messages from each client bt when i wanna send message to a specific client that's an issue,I have to change publication address every time

  • the app allows only one publish address per mode. I can try to do it via the code but just wanna know wether its possible via the app

  • Hi Brijesh,

    By spec , there should be one publication address at a time. You can have multiple subscription address, but one publication address. 

    Note that you can choose destination address freely when you access the access layer. The publication /subscription is only applied for model. You can get rid of that by using the access layer directly , then you can send the message to any where you like. But of course with that you may lose interoperability to other vendor.  

Reply
  • Hi Brijesh,

    By spec , there should be one publication address at a time. You can have multiple subscription address, but one publication address. 

    Note that you can choose destination address freely when you access the access layer. The publication /subscription is only applied for model. You can get rid of that by using the access layer directly , then you can send the message to any where you like. But of course with that you may lose interoperability to other vendor.  

Children
Related