-
Notifications
You must be signed in to change notification settings - Fork 88
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
OTA Upgrade: Respect that CurrentFileVersion attribute is optional #1091
OTA Upgrade: Respect that CurrentFileVersion attribute is optional #1091
Conversation
Thanks @triller-telekom - this looks good. I assume that you tested this with a successful completion. Did you also test the |
No I did not test this so far. the problem is that the device that had the problem ran into #1088 which is why the request failed :( I can try to find a different device where our firmware infrastructure is offering an update too... |
In addition: I just realized that my eclipse did not report me any compilation errors, but the maven build fails with some error that i would have expected already on your PR when you introduced the new
|
I didn't spot this - I'll update these tests now. |
I have the fixes in a branch and can create a PR, give me 2mins... |
PR is here: #1093 |
Thanks I missed your mail - I also provided a similar PR in #1094. Any preferences? |
d3172db
to
8ea6349
Compare
@triller-telekom now that #1094 is fixed, please can you confirm once you've had the chance to test that this at least works fine with a standard OTA transfer where the version attribute is supported - so that at least we don't introduce a regression. Thanks. |
I just did some testing with the changes. A firmware update with an osram bulb that was successful previously is now failing. I don't know why, yet. Still investigating. |
@cdjackson : Here is what I found out, but I think I need some help to explain why this is happening: Up until We then tell the device that the update was finished:
This transaction becomes marked as
However, after the device has restarted, the transaction is STILL queued:
In theory we should block the thread on the
The newly introduced request for the
Also the
Some node changes are noticed here...
Then I see the output of the newly introduced debug logging about a received DefaultResponse 10 times are its printed in the for loop:
And since its a failure and not
Unfortunately the logger I was using swallows the message of exceptions, but this one is thrown directly afterwards:
Where
So for now I cannot explain why the wrong cluster is used and also why the Attached is the "full" log of the end of the firmware update process. I "grep"ed the log case-insensitively for everything with F5B3, 8418260000DA9DB6, and ZclOtaUpgradeServer to scale it down to the relevant parts. Do you have an idea what might go wrong here? |
So, there's a lot going on here ;)
The message is marked as ACKED not because of this message, but because of this message ->
This is the acknowledgement that the command was sent to the device. This is fine. ACKED just means that the remote device acknowledged that it received the command. The transaction doesn't complete until here - and it has failed -:
Agreed - this should still be blocking I think.
This is fixed now in #1098
This just shows that the transaction is still running - this is a retry since the transaction didn't complete (even if we think it did as it does seem it passed by the
As above, this is fixed now in #1098 - this was simply that the cluster ID is not set for the general commands - it wasn't required when we were only sending specific commands.
You mean why it IS treated as finished? Right? Ie it didn't seem to stop at the I'm a bit curious if there's something happening before this log starts though, as I also see this attribute being requested at So... I do agree that this |
8ea6349
to
1b3f1bb
Compare
Fixes zsmartsystems#1087 Signed-off-by: Stefan Triller <[email protected]>
1b3f1bb
to
7b27abc
Compare
Codecov Report
@@ Coverage Diff @@
## master #1091 +/- ##
============================================
- Coverage 30.21% 30.20% -0.02%
- Complexity 4019 4020 +1
============================================
Files 1440 1440
Lines 56161 56179 +18
Branches 2484 2489 +5
============================================
- Hits 16970 16969 -1
- Misses 38450 38470 +20
+ Partials 741 740 -1
Continue to review full report at Codecov.
|
Thank you for your detailed analysis and fixing the bug with the wrong cluster so quickly. I think it would have taken me a lot longer to find it there. I have now rebased the PR against the latest master and tested 2 cases:
So I really hope that with a device that does not support the CurrentFileVersion attribute, the update should succeed with this PR. I still don't know why the @cdjackson Please have a look at PR again, so we can merge it soon, thanks. I guess finding a solution for #1088 is up next, to make the firmware update work for even more devices. |
Thanks Stefan,
I’ll take a look at this over the next few days. I’ll probably also look at #1088 myself - I don’t think it is too hard to resolve, but of course completely changing the device may have other consequences, so let’s see…
Cheers
Chris
|
Thanks for this @triller-telekom - looks good so merging. |
Fixes #1087
Signed-off-by: Stefan Triller [email protected]