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

server and client model in same element index

Can a server and a client of dimming example, have same element instead of different element ID.

I got worked for server and client model in single node, but they are in different element index.

When I combined in single element index, they worked, but I can't use unicast address to send data, I can only use Group address for it.

So, How can I use unicast address to send data from client to server and get data from server to client in response.

Thank You

Bivay



Parents
  • Hi,

    Which Mesh SDK are you using? I think your issue is related to this.

  • Mesh SDK: 3.2.0

    I also tried to use two element one for server with health and config server.

    and another for client.

    and used this function:

    static uint32_t set_model_publish_address(uint16_t publish_address, access_model_handle_t model_handle) {
      if (!m_device_provisioned) return;
      if(get_model_publish_address(model_handle)==publish_address) return;
      uint32_t status = NRF_SUCCESS;
      //publish_address=0xc000;
      dsm_handle_t publish_address_handle = DSM_HANDLE_INVALID;
      access_model_publish_address_get(model_handle, &publish_address_handle);
      NRF_MESH_ASSERT(dsm_address_publish_remove(publish_address_handle) == NRF_SUCCESS);
      status = dsm_address_publish_add(publish_address, &publish_address_handle);
      if (status != NRF_SUCCESS) {
        return status;
      } else {
        return access_model_publish_address_set(model_handle, publish_address_handle);
      }
    }

    when I use group address : 0xC000 and other this function works,

    but when I use unicast address it didn't work

Reply
  • Mesh SDK: 3.2.0

    I also tried to use two element one for server with health and config server.

    and another for client.

    and used this function:

    static uint32_t set_model_publish_address(uint16_t publish_address, access_model_handle_t model_handle) {
      if (!m_device_provisioned) return;
      if(get_model_publish_address(model_handle)==publish_address) return;
      uint32_t status = NRF_SUCCESS;
      //publish_address=0xc000;
      dsm_handle_t publish_address_handle = DSM_HANDLE_INVALID;
      access_model_publish_address_get(model_handle, &publish_address_handle);
      NRF_MESH_ASSERT(dsm_address_publish_remove(publish_address_handle) == NRF_SUCCESS);
      status = dsm_address_publish_add(publish_address, &publish_address_handle);
      if (status != NRF_SUCCESS) {
        return status;
      } else {
        return access_model_publish_address_set(model_handle, publish_address_handle);
      }
    }

    when I use group address : 0xC000 and other this function works,

    but when I use unicast address it didn't work

Children
No Data
Related