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 for W800 + "Simple OTA" w/o httpd #1471

Merged
merged 6 commits into from
Dec 30, 2024

Conversation

MaxineMuster
Copy link
Contributor

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.

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.
@divadiow
Copy link
Contributor

This PR fixes #1227

Make file selector accepting images on extension for platform
For Beken: Check magic "RBL" and future Platform name in header
#elif PLATFORM_BEKEN
"accept='.rbl'"
#else
""
Copy link
Contributor

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.

Copy link
Contributor Author

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.

MaxineMuster and others added 4 commits December 22, 2024 20:30
…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 ...)
@openshwprojects openshwprojects merged commit 1f51f65 into openshwprojects:main Dec 30, 2024
17 checks passed
Copy link

🎉 This PR is included in version 1.17.818 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

4 participants