-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Add UpdateHub.io support lib #13039
Add UpdateHub.io support lib #13039
Conversation
All checks are passing now. Review history of this comment for details about previous failed status. |
This looks pretty cool, but I doubt it belongs to subsys/ . Rather, lib/ . I also would suggest to join initiative of #12129 and put headers under include/zephyr/ right away. But don't haste with these changes, until others provided feedback too. But you definitely would need to act on @zephyrbot's comments ;-). |
Also, please consider how would we ensure that this works over time. We'd need a sample, tests, etc. |
Thank you for this contribution!
Also please include a buildable test (a simple application that uses the library) in Finally we would need a bit of documentation in |
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.
Hi @chtavares592 and @otavio, thanks for this PR. My review is only limited to the use of nvs; as my knowledge on the other (most important part) is limited:
You are using NVS to store the id, in the creation of the nvs filesystem you are using a very short (64 bytes) sector size. The sector size should be a multiple of the flash_erase_page size, so probably 64 is to small. You are also using FLASH_AREA_STORAGE as the offset of the nvs file system, this would make it impossible for other modules to use it.
My advice would be to use the settings module to store the id, this will allow other modules to use the same storage area. If you need advice/help on how to do this, let me know.
We can do the inclusion of the headers on the new location for sure; we also are in process of moving it to
We are looking at this and hope to have something to share soon (or questions, hehe)... |
OK, a example on how it is used can be found in: |
We did get the settings integrated by then we found a problem: we lose the information when upgrade is done. Essentially, what seems to be happening is:
@Laczen any suggestion how to approach this? |
@otavio Thank you for the PR. Overall I agree with the others in several regards (location in lib/, PR quality is good and the need for a sample / test). I notice you are using device_identity.c which has some hard-coded values per SoC for reading device unique values. There is a Zephyr-generic solution mostly in place here: https://github.com/zephyrproject-rtos/zephyr/tree/master/drivers/hwinfo And I believe NXP support is nearly approved. You might consider using that API for getting the initial seed for your unique identifier. RE: the settings values going away after update, make sure the partition sizes aren't overlapping between MCUboot, slot0, slot1, mcuboot's scratch area, the NVS settings, etc. If they do overlap it could explain why those settings go away during OTA. |
I agree with @mike-scott , probably there is some problem with the flash partitions. If you can put your sample somewhere I can have a look (please don't forget to mention your board). |
@otavio could provide a diff of the previous commit vs. the new one pushed a few days ago? |
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.
Please review my clarity edits that I didn't introduce a technical error.
I am afraid we can't. We amended the changes and we later dropped those branches. We are now working on fixing the |
1b48c1c
to
8af6082
Compare
9911615
to
21bca3c
Compare
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
7ed404f
to
cd170eb
Compare
22da262
to
c1d8206
Compare
This extends the UpdateHub library code to allow the use of CoAPS/DTLS for communication. Refs: zephyrproject-rtos#13039. Signed-off-by: Christian Tavares <christian.tavares@ossystems.com.br>
UpdateHub is an enterprise-grade solution which makes simple to remotely update all your embedded devices in the field. It handles all aspects related to sending Firmware Over-the-Air(FOTA) updates with maximum security and efficiency, while you focus in adding value to your product. Signed-off-by: Christian Tavares <christian.tavares@ossystems.com.br> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
This extends the UpdateHub library code to allow the use of CoAPS/DTLS for communication. Refs: zephyrproject-rtos#13039. Signed-off-by: Christian Tavares <christian.tavares@ossystems.com.br>
This extends the UpdateHub library code to allow the use of CoAPS/DTLS for communication. Refs: zephyrproject-rtos#13039. Signed-off-by: Christian Tavares <christian.tavares@ossystems.com.br>
This extends the UpdateHub library code to allow the use of IPV6 for communication. Signed-off-by: Christian Tavares <christian.tavares@ossystems.com.br>
Hello everyone. We believe it is ready to go and we addressed all issues. Is it possible for you guys to check it? |
Looked through this and the only real unresolved question is where the updatehub.h header belongs. Since @nashif is doing a cleanup of headers anyway, I suggest we discuss where to place it after the fact in order to prevent this PR from bitrotting. It could be in |
This extends the UpdateHub library code to allow the use of CoAPS/DTLS for communication. Refs: #13039. Signed-off-by: Christian Tavares <christian.tavares@ossystems.com.br>
UpdateHub provides an end-to-end solution for Over-The-Air update
of embedded devices.
Signed-off-by: Christian Tavares christian.tavares@ossystems.com.br
Reviewed-by: Otavio Salvador otavio@ossystems.com.br