-
Notifications
You must be signed in to change notification settings - Fork 296
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 for W800 + "Simple OTA" w/o httpd #1471
Conversation
Removed unnecessary (and wasting resources) fetching of "index?status=1" on pages not using "state" div Added simple "internal OTA" (just POST-ing a file) Basic tests done - try avoiding other TCP connections to save memory Somtimes there are memory related messages in log like "Thread create HTTP Client - errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY". OTA working in most cases, somtimes device crashes during update. Device will immediatly reboot after OTA completion, even printfs after writing last bytes was not visible in console.
This PR fixes #1227 |
Make file selector accepting images on extension for platform For Beken: Check magic "RBL" and future Platform name in header
src/httpserver/http_fns.c
Outdated
#elif PLATFORM_BEKEN | ||
"accept='.rbl'" | ||
#else | ||
"" |
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.
Maybe use .img as default for everything else, and add/define something like NO_PLATFORM_OTA in obk_config.h for those that doesn't support it.
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.
Thanks for your suggestions! I especially like the "NO_PLATFORM_OTA" idea.
Regarding the default: Since I changed the code again, I think it's clearer/better readable if I put the entries per platform together, even if e.g. ".img" is repeated for some platforms.
Since I took your idea with the new define, there should be only "known" platforms, so a default value should cover no devices.
…or the platform As suggested by @NonPIayerCharacter added "NO_PLATFORM_OTA" in obk_config.h For platforms w/o OTA the page will be only showing a hint.
moved platform dependent #define for OTA extension to obk_config.h
Only show hint for ".rbl" file on Beken platforms Added a #define OBK_OTA_NAME_EXTENSION, actually only for LN882H (here UART and OTA file are identicaly except an "_OTA" in the file name). Otherwise the UART file would also match the template (this file would not be flashed because of additional checks, but if we can prevent this ...)
🎉 This PR is included in version 1.17.818 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Removed unnecessary (and wasting resources) fetching of "index?status=1" on pages not using "state" div
Added simple "internal OTA" (just POST-ing a file)
Basic tests done - try avoiding other TCP connections to save memory
Sometimes there are memory related messages in log like "Thread create HTTP Client - errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY".
W800s OTA working in most cases, sometimes device crashes during update.
Device will immediately reboot after OTA completion, even printfs after writing last bytes to flash was not visible in console.