somakeit / smib

1 stars 0 forks source link

Can we find a way to apply new firmware over the air #241

Open sjefferson99 opened 1 week ago

sjefferson99 commented 1 week ago

Is it possible to load new files into littlefs over an API/web page and save them and reset or are they locked?

sam57719 commented 1 week ago

https://forums.raspberrypi.com/viewtopic.php?t=363923

sam57719 commented 1 week ago

https://www.kevsrobots.com/blog/micropython-ota.html

This guy wrote an OTA module for micropython. https://github.com/kevinmcaleer/ota/blob/main/ota.py

sjefferson99 commented 1 week ago

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.

sam57719 commented 1 week ago

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

sjefferson99 commented 1 week ago

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.