Hi,
This is a project using nrf5 SDK for Mesh v5.0.0. We are using a machine to machine interface with the serial example. I am seeing this issue here:
Sending appkey_get_all request... TX Data Buf: 03 9a 00 00 RX Length: 7 RX Data Buf: 84 9a 00 00 00 03 00 Opcode 9a => ble_mesh_appkey_get_all_req; Status: 0x00=> Success; Data: 00 00 03 00 Subnet handle: 0x0000; Appkey Indexes: 0x0003 Sending appkey delete request... TX Data Buf: 03 99 03 00 RX Length: 4 RX Data Buf: 84 99 8e Opcode 99 => ble_mesh_appkey_delete_req; Status: 0x8e=> ERROR_REJECTED
In summary:
We can see that appkey handle 3 is bound to netkey handle 0 in the serial example. When we try to delete appkey handle 3 on that subnet, we get the status SERIAL_ERROR_REJECTED. When we run appkey_get_all for that subnet once again, appkey 3 is still there.
In the device state manager, this handles the deletion:
uint32_t dsm_appkey_delete(dsm_handle_t app_handle) { if (app_handle >= DSM_APP_MAX || !bitfield_get(m_appkey_allocated, app_handle)) { return NRF_ERROR_NOT_FOUND; } else { dsm_entry_invalidate(MESH_OPT_DSM_APPKEYS_RECORD, app_handle, m_appkey_allocated); return NRF_SUCCESS; } }
Where DSM_APP_MAX = 8 and the size of m_appkey_allocated is 1. I can't see a reason why the program thinks the appkey handle is invalid when it returns the same handle when we query it. Any ideas?