-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send message await forever #599
Comments
Thank you for reporting the issue. I'll look into it and come back to you. |
For Acknowledged messages there's a timer on Access Layer that should try to retransmit the message and time out eventually. |
OK. I see where the issue may occur. AccessLayer sets the repeat & timeout timer only for acknowledge messages sent to a Unicast Address: IOS-nRF-Mesh-Library/nRFMeshProvision/Layers/Access Layer/AccessLayer.swift Lines 239 to 244 in 293210d
That means, that acknowledged messages sent to a Group Address (or Virtual Address) don't get that timer set. Such messages may be sent to 0+ nodes and the transmitter can receive 0+ responses. In that case, it is the underlying layer that should notify the network manager, just like for unacknowledged messages. However, as you pointed out, when the Acknowledged Mesh Message is unsegmented, like IOS-nRF-Mesh-Library/nRFMeshProvision/Layers/Lower Transport Layer/LowerTransportLayer.swift Lines 257 to 260 in 293210d
I'll prepare a fix. |
Btw, for multicast addresses it is recommended not to use Acknowledged messages, but their Unacknowledged counterparts. This significantly decreases the traffic in the network. |
Hmm... I did some more digging and seems like the Network Layer doesn't throw IOS-nRF-Mesh-Library/nRFMeshProvision/Layers/Network Layer/NetworkLayer.swift Lines 156 to 167 in 293210d
This is the IOS-nRF-Mesh-Library/nRFMeshProvision/Layers/Network Layer/NetworkLayer.swift Lines 444 to 450 in 293210d
As you're getting that error, that means, that you're sending the message to a Unicast Address. In that case, the network manager should wait until the response is received from the target, which happens on Access Layer. |
Could you say what message are you trying to send exactly, what are your network parameters (default?) and what is the destination address of the message? |
Thank you for your help. I just send some GenericOnOffSet to a Unicast Address when not connected.In this case, a timeout will not be thrown? |
There will be a timeout. The timeout is set using: IOS-nRF-Mesh-Library/nRFMeshProvision/Layers/NetworkParameters.swift Lines 219 to 230 in 293210d
Documentatuion |
I found failedToSendMessage is no callback. Because Address change to MeshMessage. |
Where do you suspect the issue?
Issue in mesh library, e.g. packets being dropped
Version
4.1.0 (latest)
Describe the issue
I send an
AcknowledgedMeshMessage
but getbearerDidClose
error.this else isn't handled, so the library awaits forever. What should I do?
The text was updated successfully, but these errors were encountered: