Hi,
I tried the on/off light server example provided with the Mesh 4.0 SDK, but it seems somehow always to fall into an NRF_ERROR_INVALID_PARAM, since the appkey_handle and address_handle are not set:
static bool check_tx_params(access_model_handle_t handle, const access_message_tx_t * p_tx_message, const access_message_rx_t * p_rx_message, uint32_t * p_status) { NRF_MESH_ASSERT(NULL != p_status); /* Various checks being done here to ensure that model does not publish a message if publication is disabled by setting - Unassigned publish address, or deleted app key */ if (p_tx_message->length >= ACCESS_MESSAGE_LENGTH_MAX) { *p_status = NRF_ERROR_INVALID_LENGTH; } else if (!model_handle_valid_and_allocated(handle) || m_model_pool[handle].model_info.element_index >= ACCESS_ELEMENT_COUNT) { *p_status = NRF_ERROR_NOT_FOUND; } else if ((p_rx_message == NULL && (m_model_pool[handle].model_info.publish_appkey_handle == DSM_HANDLE_INVALID || m_model_pool[handle].model_info.publish_address_handle == DSM_HANDLE_INVALID)) || !is_valid_opcode(p_tx_message->opcode)) { *p_status = NRF_ERROR_INVALID_PARAM; } else { *p_status = NRF_SUCCESS; } return (NRF_SUCCESS == *p_status); }
Any Idea what needs to be set, such that the appkey_handle and the address_handle are valid? The light message is sent correctly, but retransmissions seems to fail because of this.