Hi all,
Recently, I have concentrated on a mesh project using nrf52840 board programmed sdk_mesh_v_3.1.0. There is a situation that the board needs to send two different long segment messages to another device in a very short interval. According to the Mesh Profile Specification v1.0 Section 3.6.4.1, we know that we should only ever send one transport SAR packet at the same time between a given source and destination. So, when the board did the operation above, the result was that the first SAR packet could be sent successfully, but second one failed to send out because the first one hasn't been completed yet.Here is the code where the error occurs.
for (uint32_t i = 0; i < TRANSPORT_SAR_SESSIONS_MAX; ++i) { if (m_trs_sar_sessions[i].session.session_type == TRS_SAR_SESSION_TX && m_trs_sar_sessions[i].metadata.net.src == p_metadata->net.src && m_trs_sar_sessions[i].metadata.net.dst.value == p_metadata->net.dst.value) { return NRF_ERROR_INVALID_STATE; } }
So, I think the mesh_sdk should use a correct way (e.g. putting message in a queue) to support this situation rather than discard it. And if anybody has useful suggestions, please contact me! Thank you!
Jiurifei