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

adding second element to a light control server node mesh example

Hi, I'm trying to add another element with a simple onoff model to control a second LED on the same server node. I get APP_ERROR. I try declaring m_server0, m_server1, generic_get0_cb, generic_get1_cb, etc.. but in that way I would have to call simple_on_off_server_init(&m_server0, 0) and simple_on_off_server_init(&m_server1, 1) in configuration_setup(), but in header function of simple_on_off_server_init its written we should only call it once. What am I missing to add another element with the same simple on off model into it. thanks a lot. Also changed ACCESS_ELEMENT_COUNT

Parents
  • Hi ms, Sorry for late response.

    It doesn't seem the current provisioner in the lighting example check for the number of elements (num_components or num_elements) in the capability sent by the provisionee. The number of element is reported back to the provisioner in NRF_MESH_EVT_PROV_CAPS_RECEIVED event (event.params.prov_oob_caps_received.oob_caps.num_elements = p_pdu->num_components;) but doesn't seem this value is used by the provisioner. Also the provisioner doesn't seems to assign the application key to the second server. I will report this issue internally.

Reply
  • Hi ms, Sorry for late response.

    It doesn't seem the current provisioner in the lighting example check for the number of elements (num_components or num_elements) in the capability sent by the provisionee. The number of element is reported back to the provisioner in NRF_MESH_EVT_PROV_CAPS_RECEIVED event (event.params.prov_oob_caps_received.oob_caps.num_elements = p_pdu->num_components;) but doesn't seem this value is used by the provisioner. Also the provisioner doesn't seems to assign the application key to the second server. I will report this issue internally.

Children
No Data
Related