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

how to set mesh model publish address to a client model which is on other mesh node

I have three mesh nodes in a mesh network, a provisioner, a vendor server model, and a vendor client model.

I know that a provisioner can set client model publish address to a server model address via access_model_publish_address_set(...) if the client model is on the same mesh node(provisioner).

But I need to set client model publish address on another mesh node.

Is there anybody can tell me how to do that?

Update: Sorry, I didn't describe my question clearly. I need to set publish address on a node which is not a provisioner, just a node with a vendor client model. There is another node with a vendor server model, and I have already implemented a configuration server on both client and server model node. I know how to set publish address on a provisioner node, but I don't know how to get the server model address on a non-provisioner node for access_model_publish_address_set(…). Or publish address assignment has only to be done once, all client models will be assigned the same publish address?

  • Hi Hung Bui,

    In my project, i will have more than on Group of device.

    Say i have Group 0xCAFE, 0xCAFF, 0xCB00

    So, it is understand that if i put a server into a specific group, i can use config_client_model_subscription_add()

    But, if i later, i would like to reassign the device to the other Group, say Gp 0xCb00 - > 0xCafe, i will use the function config_client_model_subscription_overwrite

    so, config_client_model_subscription_overwrite->subscription_add_del_owr_send->send_reliable

    while the send_reliable handle is m_client.model_handle;

    And this m_client.model_handle, will always pointed to the last provision device in the stack. Does it make sense to you, or i have overlook anything?

  • Should i call ERROR_CHECK(config_client_server_set(m_devkey_handles[client_idx],m_server_handles[client_idx]));

    for each client, before i call config_client_model_subscription_overwrite??

  • Yes, if you are planning to change the publication address of a server remotely, you should call config_client_server_set() for each node. This basically change the publication address of the config client. 


    If you want to change the publication address of a model on a node locally, you can call access_model_publish_address_set()

Related