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

combine light switch and remore mesh don't control light

Hi all,

After I combile light switch example and remote example for my client and server board . Function Remote run fine . But when I push button for send unicast message . 2 board seem dont receiver correct .I define light switch and remote is different elements . I use Mesh SDK v2.0.1 . Show my picture : 

  

Please show me my mistake. Thank very much

Parents
  • Hi Giang, 

     

    Remote you mean remote provisioning client or server ? 

    I assume it's server. 

    If you have a look into the code (button_event_handler() ) you can find that  "Ignored. Node is not configured.\n" thrown when the light switch client is not configured. 

    You need to configure the client locally, in this case setting the publication address. It's similar to this case. Have a look at Mesh SDK v1.x to see how it works. 

  • Exactly what I do is : 

    1. Add provision remote client to light switch client.

    2. Add provision remote server to light switch server.

    I want client is gateway and servers is node , can remote and send data.

    But, I'm confused between choosing provisioner example is gateway.  Can you give me 1 correct model of mesh network ?

    And I have a question:

    1. When I use provisioner example + (light switch client + remote server - Node1) + (light switch server + remote server - Node 2) . Provisioner is provisioning and config for 2 node correct . But don't send data control light . If I delete code

     /* TODO: This should be handled by the configuration server model. */
        mesh_key_index_t net_key_index;
        uint32_t count = 1;
        ERROR_CHECK(dsm_subnet_get_all(&net_key_index, &count));
        m_netkey_handle = dsm_net_key_index_to_subnet_handle(net_key_index);
    
        uint8_t appkey[NRF_MESH_KEY_SIZE] = {0};
        ERROR_CHECK(dsm_appkey_add(0, m_netkey_handle, appkey, &m_appkey_handle));
        ERROR_CHECK(dsm_address_publish_add(PROVISIONER_ADDRESS, &m_provisioner_address_handle));
        ERROR_CHECK(access_model_application_bind(m_remote_server.model_handle, m_appkey_handle));
        ERROR_CHECK(access_model_publish_address_set(m_remote_server.model_handle, m_provisioner_address_handle));
        ERROR_CHECK(access_model_publish_application_set(m_remote_server.model_handle, m_appkey_handle));
        ERROR_CHECK(access_model_publish_ttl_set(m_remote_server.model_handle, 6));
        ERROR_CHECK(pb_remote_server_enable(&m_remote_server));
        ERROR_CHECK(pb_remote_server_prov_bearer_set(&m_remote_server, nrf_mesh_prov_bearer_adv_interface_get(&m_prov_bearer_adv)));
    

    in each Node . It send data control light correct . But remote function of each Node don't run if I use remote client example for provisioning . 

    How I can use both remote function and control light function ?

    Can you explain for me the meaning of the above code?

    2. Can I use provisioner example for config Node ?

    Thank very much !

Reply
  • Exactly what I do is : 

    1. Add provision remote client to light switch client.

    2. Add provision remote server to light switch server.

    I want client is gateway and servers is node , can remote and send data.

    But, I'm confused between choosing provisioner example is gateway.  Can you give me 1 correct model of mesh network ?

    And I have a question:

    1. When I use provisioner example + (light switch client + remote server - Node1) + (light switch server + remote server - Node 2) . Provisioner is provisioning and config for 2 node correct . But don't send data control light . If I delete code

     /* TODO: This should be handled by the configuration server model. */
        mesh_key_index_t net_key_index;
        uint32_t count = 1;
        ERROR_CHECK(dsm_subnet_get_all(&net_key_index, &count));
        m_netkey_handle = dsm_net_key_index_to_subnet_handle(net_key_index);
    
        uint8_t appkey[NRF_MESH_KEY_SIZE] = {0};
        ERROR_CHECK(dsm_appkey_add(0, m_netkey_handle, appkey, &m_appkey_handle));
        ERROR_CHECK(dsm_address_publish_add(PROVISIONER_ADDRESS, &m_provisioner_address_handle));
        ERROR_CHECK(access_model_application_bind(m_remote_server.model_handle, m_appkey_handle));
        ERROR_CHECK(access_model_publish_address_set(m_remote_server.model_handle, m_provisioner_address_handle));
        ERROR_CHECK(access_model_publish_application_set(m_remote_server.model_handle, m_appkey_handle));
        ERROR_CHECK(access_model_publish_ttl_set(m_remote_server.model_handle, 6));
        ERROR_CHECK(pb_remote_server_enable(&m_remote_server));
        ERROR_CHECK(pb_remote_server_prov_bearer_set(&m_remote_server, nrf_mesh_prov_bearer_adv_interface_get(&m_prov_bearer_adv)));
    

    in each Node . It send data control light correct . But remote function of each Node don't run if I use remote client example for provisioning . 

    How I can use both remote function and control light function ?

    Can you explain for me the meaning of the above code?

    2. Can I use provisioner example for config Node ?

    Thank very much !

Children
No Data
Related