-
Notifications
You must be signed in to change notification settings - Fork 0
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
Can we find a way to apply new firmware over the air #241
Comments
https://www.kevsrobots.com/blog/micropython-ota.html This guy wrote an OTA module for micropython. |
Basically urequest the raw github content and write to file, rename to main file and reboot. Actually as simple as we hoped, shouldn't be hard to write a module that works in smibhid (uses our wifi module and async requests etc). Also have something iterate through all the files in the smibhid lib folder + main.py. Should be very achievable. |
Would we also want a way to manually push a file(s) to the picos remotley? or use the web UI allow you to specify a branch and/or tag/revision to pull files from |
Yes I have a number of ideas in my head still crystalising around identifying files changed, updating to a branch, pushing an individual file or files, checking config, recovering from a failed update etc. I will list them out here as I start writing components. Probably have some smaller enhancement records for each piece. |
Looks like the answer right now is no we can't. I have confirmed the code works to download a small text file from a URL and the commit already made confirms the process works from there. But trying to execute a download request in our running system even with gc right before the request leads to out of memory and that's with a small 20 line file. There is simply not enough memory on the pico to do this while running the SMIBHID loop. Also I would need to use async requests and I don't know how to do that in the tinyweb API builder. A few ideas that come to mind:
I will explore whether a cut down mode can pull the sort of file sizes we have for individual smibhid py files and then develop this if it works. |
Latest commit on this branch is a working PoC of an update mode successfully downloading the 17kb space_state.py lib file. Web UI to populate this file needs building and some further error handling and testing needed in the update code. I will implement a backup directory of files changed (cleared before new download processing to ensure disk space is managed) and a main.py hid wrapper for catching errors and attempting restore from backup in #252 |
Is it possible to load new files into littlefs over an API/web page and save them and reset or are they locked?
The text was updated successfully, but these errors were encountered: