Dear community,
I would like to retrieve all publish address using this command :
ERROR_CHECK(access_model_publish_address_get(m_dev_handles.m_generic_client_instance[0].model_handle, &address_handle));
__LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Publish addresses: 0x%04x \n", address_handle);
Then address_handle is returning 0x0000... but my I can communicate with the LPN and send onoff message to switch light. The LPN has subscribe address 0xC404 and the friend has publish address which is same address than subscribe address of LPN as logical. To do this I used :
access_model_publish_address_set(m_dev_handles.m_generic_client_instance[0].model_handle, m_dev_handles.m_server_handles[0]);
and before that in case it helps, I do:
dsm_address_publish_add(p_evt->params.complete.p_prov_data->address, &m_dev_handles.m_server_handles[0]));
This code is inspired from light switch example in nrf5_SDK_for_Mesh_v1.0.1.
What am I doing wrong ?