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

How to send data to all node over mesh

I want to send data to all node by mesh 2.1.1.

From the Mesh profile(3.4.2.4 Group address),the dst_addr = 0xFFFF is send to all node .

I try to setting "packet_tx()"funtion as follows(The red part is add):

nrf_mesh_address_t dst_address;
dsm_handle_t appkey_handle;
dsm_handle_t subnet_handle = DSM_HANDLE_INVALID;
if (p_rx_message != NULL)
{
appkey_handle = p_rx_message->meta_data.appkey_handle;
subnet_handle = p_rx_message->meta_data.subnet_handle;
dst_address = p_rx_message->meta_data.src;
}
else
{
appkey_handle = m_model_pool[handle].model_info.publish_appkey_handle;
if (dsm_address_get(m_model_pool[handle].model_info.publish_address_handle, &dst_address) != NRF_SUCCESS)
{
return NRF_ERROR_NOT_FOUND;
}
if (dst_address.value == NRF_MESH_ADDR_UNASSIGNED)
{
return NRF_ERROR_INVALID_ADDR;
}
}
dst_address.type = NRF_MESH_ADDRESS_TYPE_GROUP;
dst_address.value = 0xFFFF;
dst_address.p_virtual_uuid = NULL;

But other node Can't receiv data.

Related