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

Add Basic Remote Server HTTP OTA Update #77

Closed

Conversation

t-jones14
Copy link

@t-jones14 t-jones14 commented Feb 12, 2022

UI Elements added. Successfully fetching .BIN file from remote location in VUE.JS

Probably not the "most-secure" method. Working on proof-of-concept. Need to figure out handling uploading retrieved BIN file to device.

Working off Main updateOTA function.

Any input much appreciated! I think this ability would be an excellent addition to this repo.

Successfully pulling .BIN file from remote location in VUE.JS

Need to figure out handling uploading retrieved BIN file to device.

Working off Main updateOTA function.
@t-jones14 t-jones14 changed the title Non-Working Commit for Basic Remote HTTP OTA Updating Non-Working Draft Pull for Basic Remote HTTP OTA Updating Feb 12, 2022
@t-jones14 t-jones14 marked this pull request as ready for review February 13, 2022 02:20
Successfully implemented working remote server OTA update.

ISSUES: Upon fetch, error is presented. Select back button then fetch again and file successfully uploads OTA.

File object is successfully loaded but not sent to upload once fetch is selected. Needs work.
@t-jones14
Copy link
Author

t-jones14 commented Feb 13, 2022

Successfully implemented working remote server OTA update.
ElegantRemoteOTA

ISSUES

  • FIXED - Upon fetch, error is presented. Select back button then fetch again and file successfully uploads OTA. File object is successfully loaded but not sent to upload once fetch is selected. Working on it.
  • [NO-FIX] CORS Policy will prevent GET request unless server allows Cross-Origin (aka not requesting from a FQDN). If fetching from Github or other provider, if their server(s) do not allow Cross-Origin the GET request will fail. Workaround to fetch from Github using this browser extension. Otherwise, only way around is using your own self-hosted webserver with "Access-Control-Allow-Origin: *" response headers or specifying the proper origin.

To-Do

  • Needs to be verified functional on ESP32. I do not have one on-hand to test.

Potential Additional Features

  • Implement ability to check if target device has enough available space to write update? (Will probably be future pull request). See this link.
  • Add ability to hardcode remote server in code? (IN PROGRESS: Will be future pull request)
  • Provide simple remote update server example with checks (security check, platform/device check, MAC verification, etc.)? (IN PROGRESS: Will be future pull request)

@t-jones14 t-jones14 changed the title Non-Working Draft Pull for Basic Remote HTTP OTA Updating Add Basic Remote Server HTTP OTA Update Feb 13, 2022
Fixed fetch error by validating URL (must end with .BIN file). If URL is verified, app will automatically fetch file and load object to variable. Otherwise will show user URL is not valid and not allow upload.

Changed button to 'Start Upload' since no need to fetch.
@playmiel
Copy link

playmiel commented Jul 6, 2022

hi I tested it works well with esp32 (wrover)

@doanerock
Copy link

That's really useful.

@ayushsharma82
Copy link
Owner

ayushsharma82 commented Jul 6, 2022

@t-jones14 I appreciate your work which has been done! but I had some other plans with ElegantOTA. As much as I would love to merge it, it will be counter productive for upcoming v3. You may create a fork for people who would like this functionality.

I'm almost finished with ElegantOTA IoT Device Management Cloud which was in the works for past 6 months and it will soon be integrated into ElegantOTA V3 library. This is mainly geared for businesses and there will also be a forever free individual plan for people who can take benefit of the platform for their own projects/hobby.

To be clear: ElegantOTA V3 library for uploading through UI will remain free as it is and it will also support more features. The new addition will be ElegantOTA Cloud.

If anybody would like to follow the V3 conversation, please check this link: #86 (comment)

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

Successfully merging this pull request may close these issues.

4 participants