-
Notifications
You must be signed in to change notification settings - Fork 41
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
fix read timeout for split message responses #75
Conversation
Checking. Give me a minute. But thanks for the submission! |
@Fabbi I don't think this is a proper fix - the culprit, following your PR, has to be the guard statement in McuMgrBleTransportWriteState's received(), which is the one triggering the 'open'. So, this is the function not properly detecting that the chunked response has been received. Furthermore, the McuMgrResponse.getExpectedLength(scheme: .ble, responseData: data) call is returning a bad result? Meaning we're expecting more or less bytes and that's why the validation state does not continue? |
In my case the
I agree, that I was able to upgrade my firmware with this code active. |
Let me think about it a bit better. By the way - would you be able to provide me with a firmware file to flash so that I may test and see this happening myself? |
@Fabbi do you see something like "OOD Packet: Received Seq No. 4 instead of expected Seq No. 2" in the logs when sendTimeout happens? |
I'm afraid not, as it's a proprietary bin of a client.
No, the timeout doesn't happen on upload but on receiving data from the That's the log I get on the current version.
the |
@Fabbi thanks for the feedback. I was able to reproduce the issue, I think. So I've been working on properly understanding the cause. I have an idea that might help, but I'm not sure. In any case, while I'm working on it - you have your own fix that works for you, so at least your customer doesn't have the issue. Let me see if I can make good progress today. |
Hi @Fabbi - can you check out the master branch and see if the issue keeps happening ? Thanks. |
Implemented here #84 |
This fixes an sendTimeout issue caused by split responses.
When the second part of a message was >= 8 bytes (so almost always I would assume) it would be handled as new message and potentially thrown away.
Should fix #71 and #52