Dear Nordic-Support,
I have implemented some functionality with user defined models on the Mesh2.0.0-SDK. I had implemented both sides (server-client) and i,plemented the provisioning. All the implemnetation seems to work fine (some data loss in the communication occured occasionaly). Now I wanted to switch to the new SDK(2.2.0) I wanted to check if the reliability would be better on the newest SDK, but I have no communication on the 2.2.0-SDK. I have just taken my application and coiped it over, so there is no change in the models. Also the node_setup.c in the provisioner is taken from the old 2.0.0 SDK. After provisoning with the SDK 2.2.0 there is no error during the provisioning itself. I made some debugging, there are no errors on the 'sending' side, on the receiving side the data could be seen, here my debug add in the function access_incoming_handle:
/* ********** Private API ********** */ void access_incoming_handle(const access_message_rx_t * p_message) { const nrf_mesh_address_t * p_dst = &p_message->meta_data.dst; __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "RxED opcode: 0x%04x\n", p_message->opcode); if (dsm_address_is_rx(p_dst)) { uint16_t element_index; dsm_handle_t address_handle = DSM_HANDLE_INVALID; bool is_element_message = is_element_rx_address(p_dst, &element_index); if (!is_element_message) { /* If it's not one of the element addresses, it has to be a subscription address. */ NRF_MESH_ERROR_CHECK(dsm_address_handle_get(p_dst, &address_handle)); } for (int i = 0; i < ACCESS_MODEL_COUNT; ++i) { access_common_t * p_model = &m_model_pool[i]; uint32_t opcode_index; bool address_match = (is_element_message ? (p_model->model_info.element_index == element_index) : (model_subscribes_to_addr(p_model, address_handle))); if (ACCESS_INTERNAL_STATE_IS_ALLOCATED(p_model->internal_state) && address_match && bitfield_get(p_model->model_info.application_keys_bitfield, p_message->meta_data.appkey_handle) && is_opcode_of_model(p_model, p_message->opcode, &opcode_index)) { __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Rx found\n"); if (p_dst->type == NRF_MESH_ADDRESS_TYPE_UNICAST) { access_reliable_message_rx_cb(i, p_message, p_model->p_args); } p_model->p_opcode_handlers[opcode_index].handler(i, p_message, p_model->p_args); } else { __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "No Acc, match %u model opcode %u bitfield get %u is element msg %u manuf: 0x%04x, modelid 0x%04x\n", address_match, is_opcode_of_model(p_model, p_message->opcode, &opcode_index), bitfield_get(p_model->model_info.application_keys_bitfield, p_message->meta_data.appkey_handle), is_element_message, p_model->model_info.model_id.company_id, p_model->model_info.model_id.model_id); } } } }
Here my output corresponding to the printf in the code above:
<t: 973811>, access.c, 940, RxED opcode: 0xFFFF0052 <t: 973814>, access.c, 983, No Acc, match 0 model opcode 0 bitfield get 0 is element msg 0 manuf: 0xFFFF, modelid 0x0000 <t: 973819>, access.c, 983, No Acc, match 0 model opcode 0 bitfield get 0 is element msg 0 manuf: 0xFFFF, modelid 0x0002 <t: 973824>, access.c, 983, No Acc, match 0 model opcode 0 bitfield get 0 is element msg 0 manuf: 0xFFFF, modelid 0x1000 <t: 973829>, access.c, 983, No Acc, match 0 model opcode 0 bitfield get 0 is element msg 0 manuf: 0xFFFF, modelid 0x1002 <t: 973834>, access.c, 983, No Acc, match 1 model opcode 0 bitfield get 0 is element msg 0 manuf: 0xFFFF, modelid 0x1100 <t: 973838>, access.c, 983, No Acc, match 0 model opcode 1 bitfield get 1 is element msg 0 manuf: 0xFFFF, modelid 0x1102 <t: 973843>, access.c, 983, No Acc, match 0 model opcode 0 bitfield get 0 is element msg 0 manuf: 0xFFFF, modelid 0x1013
It looks like the adress match occour on the wrong model. As I said it was working on the SDK 2.0.0. What has changed between them?
Tell me please if I should send more details.
Best regards:
Roland