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

  • Hi, Brijesh singh  how to send the message from server to client ..which function i have to use ...( message mean like hi hello) .. string message i want to send '

  • 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 am sending a message packet which have a few sensor values.

  • 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?

  • you can take light switch example and in the client you can modify the message packet in the structure. Then do the same inside the server side, 

    try to do all this in a button event handler for understanding purpose. 

    ANd better open a new ticket with elaborate descrption of ur problem. FYI send a string is an easy task if u are beginning now there are way more bigger problems . In those cases nodic team wil help u

Related