-
Notifications
You must be signed in to change notification settings - Fork 2
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
Implement OTA Updates #62
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Jonas Remmert <[email protected]>
LwM2M defines Execute Operations. Execute operations do not have a payload and are send to Leshan via POST request instead of PUT request. The LwM2M specification (Appendix C. Data Types) states that "none" "it exclusively concerns Executable Resource". Therefore to distinguish between execute operation and write operation the data type can be used. Signed-off-by: Jonas Remmert <[email protected]>
Resource types are added through an initial database list. This list had an issue and was not compliant with the LwM2M Specification. Signed-off-by: Jonas Remmert <[email protected]>
jonas-rem
force-pushed
the
WIP/jonas-rem/fota
branch
2 times, most recently
from
August 1, 2024 14:23
287035a
to
3e9a9e4
Compare
This was referenced Aug 2, 2024
Open
Enable firmware update by: - adding a FirmwareUpdate list to the database model. The FirmwareUpdate list is keeping track of the execution of firmware updates for each endpoint. It adds references to the two required resources from server to endpoint (Send URI, execute Update). Furthermore it adds a field for the State and the Result of an update. - minor formatting improvements in models.py - Implement business logic that initiates an OTA (send PackageURI). - Implement remaining business logic in the base serializer. Django reacts on incoming Status/Result updates of the Update Object and updates the FirmwareUpdate representation. In addition it executes the update by default once the endpoint has downloaded the binary and notified django. Signed-off-by: Jonas Remmert <[email protected]>
Signed-off-by: Jonas Remmert <[email protected]>
Signed-off-by: Jonas Remmert <[email protected]>
jonas-rem
force-pushed
the
WIP/jonas-rem/fota
branch
from
August 3, 2024 08:13
3e9a9e4
to
5268f30
Compare
Signed-off-by: Jonas Remmert <[email protected]>
jonas-rem
force-pushed
the
WIP/jonas-rem/fota
branch
from
August 3, 2024 17:51
eb05fca
to
9572620
Compare
Kappuccino111
approved these changes
Aug 4, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds OTA Updates. I will open a second PR in the next days that adds simulated nodes for testing.
TODO: