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

[New Feature] OTA support #27

Open
3 of 5 tasks
DusKing1 opened this issue Feb 15, 2022 · 2 comments
Open
3 of 5 tasks

[New Feature] OTA support #27

DusKing1 opened this issue Feb 15, 2022 · 2 comments

Comments

@DusKing1
Copy link
Member

DusKing1 commented Feb 15, 2022

There should be an "Update via OTA" option in the firmware, so for ppl who don't wanna mess with the code environment can just update the firmware in an easier way.

The whole workload around this feature is too heavy that I think I can't finish it in one day or two, so just try to set up a simple road map for OTA feature here.

@DusKing1 DusKing1 pinned this issue Apr 4, 2022
@DusKing1
Copy link
Member Author

DusKing1 commented Apr 10, 2022

Below is my proposed OTA mechanism/process:

  • When the user set "check update", ESP32 firstly download a sha.json from the repo and store it as tmp_sha.json
  • diff the MD5 result of sha.json (in the ESP32) and tmp_sha.json
  • If the same then no change, else look into the content:
    • If there are fields with the same file name in the two jsons, check the corresponding sha1.
      • If they are the same, they do not need to be updated.
      • Else if they are different, they need to be updated (overwritten), add to them to the delete list and download list.
    • Else if there is a file name that does not exist in tmp_sha.json, the corresponding file needs to be deleted, add it to the delete list.
    • Else if there is a new file in tmp_sha.json, the file needs to be downloaded, add it to the download list.
    • Then download files in the download list and store them in /tmp directory
    • After the download is finished, OLED tells the user "please reboot to update".
    • During update, delete files in the delete list, move all files in the /tmp to .

@oddwatcher
Copy link

Hello! I've Working on a similar porject as yours using esp32-c3 , i saw your code is written in python, Should the framework of this project micropython?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants