Skip to content
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 example? #533

Closed
indexds opened this issue Dec 24, 2024 · 2 comments
Closed

OTA example? #533

indexds opened this issue Dec 24, 2024 · 2 comments

Comments

@indexds
Copy link
Contributor

indexds commented Dec 24, 2024

Hello,

Examples for this project don't include an OTA example. I'd like to do something like:

  1. Boot normally,
  2. Check if we're running the latest version of the firmware by getting a /latest API endpoint
  3. Update to the latest firmware if we're not up to date then reboot
  4. If something went wrong with the update process, revert to the previous version of the firmware.

I'm open to writing the example myself once I've figured it out, though a nudge in the right direction would be helpful.

(#258 related)

Thanks!

@indexds
Copy link
Contributor Author

indexds commented Dec 24, 2024

https://github.com/faern/esp-ota

This seems to do what I want but I'm not sure whether the example is too complicated or not. It doesn't directly use esp-idf-svc either, but creates its own wrappers from esp-idf-sys.

@ivmarkov
Copy link
Collaborator

ivmarkov commented Dec 24, 2024

The OTA API is one of the few which are quite well documented, including rough update steps in the ota.rs module, that you can locate and follow.

Here's a blog containing more sample code how to do it. If you google the internet, you can find more.

@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants