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

Update Process for 1MB Versions #708

Closed
florian-asche opened this issue Jan 12, 2018 · 22 comments
Closed

Update Process for 1MB Versions #708

florian-asche opened this issue Jan 12, 2018 · 22 comments
Labels
Category: Frontend Related to web-interface
Milestone

Comments

@florian-asche
Copy link

I did upgrade my devices to the newest version and the update failed. The device needs to be hard wired for an upgrade.

I did then read the notice on the wiki, that it no longer work with that small flash chips.

How about checking the flash size before the flash process destroys the esp firmware. It should be solved with one small if function. Or disable the flash process from the beginning, instead show some info...

@Grovkillen Grovkillen added the Type: Enhancement Improve something already present label Jan 12, 2018
@Grovkillen Grovkillen added this to the 2.0.0 milestone Jan 12, 2018
@psy0rz
Copy link
Member

psy0rz commented Jan 13, 2018

Yeah, but that old firmware would have do the check. There is no way we can influence that.

Only thing we can do it add better documentation. Did you read anything anywhere, were we might add a warning? Perhaps the notes on the release page on github?

The warnings for upgrading from an old Rxxx version to ESPEasy v2.0:

  • Only devices with 1Mb or more flash are supported.
  • To use OTA you need more then 1Mb of flash. (otherwise your device will get unreachable via wireless and you need to fix it via serial)
  • You lose all your config settings if you upgrade from an Rxxx version. (from before ESPEasy v2.0)

@psy0rz psy0rz added Type: Documentation and removed Type: Enhancement Improve something already present labels Jan 13, 2018
@Grovkillen
Copy link
Member

I'm planning on doing a netscanner app with OTA mass deploy tool where I'll add more info regarding this. Only windows though...

@psy0rz
Copy link
Member

psy0rz commented Feb 26, 2018

@Grovkillen could you document my above comment on the proper places on the wiki?

@Grovkillen
Copy link
Member

Sure, will do

@Grovkillen
Copy link
Member

@florian-asche
Copy link
Author

no. wont do it.

@florian-asche
Copy link
Author

The upgrade programm should have a
if (memory => 1MB) { message "This upgrade progress cannot be used for upgrading device, Please use programming by cable." }
This can be very usefull to help people avoid breaking their devices in future versions.

@uzi18
Copy link
Contributor

uzi18 commented Feb 27, 2018 via email

@florian-asche
Copy link
Author

yes. but still, the standard upgrade process is not working for 1mb and should show a warning message, instead of break the device.
If that project is able to upload also 1mb OTA then we could add an override attribute.

@Grovkillen
Copy link
Member

Sure for now and future releases, but older releases don't have a check like that so it would still break those units.

@TD-er
Copy link
Member

TD-er commented Feb 27, 2018

Still adding a warning wouldn't hurt.
Will add it as suggestion to this issue: #882

@Grovkillen
Copy link
Member

Sure, but lets think about it. A generic warning that we could use for the day 4096 bytes aren't enough? We need to think ahead as well.

@TD-er
Copy link
Member

TD-er commented Feb 27, 2018

Just use some factor between free space and current sketch size. We'll think of something.
And I guess we're already past the 4096 bytes limit ;)

@Grovkillen
Copy link
Member

Haha yes.

@uzi18
Copy link
Contributor

uzi18 commented Feb 27, 2018

Maybe it is possible to slit flash for OTA with 3/4 to 1/4 hah?
Where last part 1/4 is minimal ota image to update real 3/4 flash.

@TD-er
Copy link
Member

TD-er commented Feb 27, 2018

Hmm that would be a bit tricky.
At least you should split it on multiples of flash pages (e.g. 512k and the rest)
And you have to indicate on upload what part of it to use.
Is it stored in SPIFF or on the final destination by the intermediate flash?

@florian-asche
Copy link
Author

i think adding a warning is a good start. But isnt your idea way to complicated?

I whould add some function that calculate the size that the ota file need. and then a second function that return the free space size. and then simply check if it fit or not.

@TD-er
Copy link
Member

TD-er commented Feb 27, 2018

@florian-asche Depends on how the intermediate flash firmware operates.
Does it write the file to SPIFF and then copy it to the final destination, or does it write it to the final sectors immediately?
I assume the first, since a lot can go wrong during transfer via WiFi.
So you have to know the free space of the intermediate file and the space of your own settings (don't want to overwrite those)

@florian-asche
Copy link
Author

I could live with lost settings. Add a pre warning step. Add a direct download link with settings backup for later upload. Maybe add some function to the upload process where the settings are written before the system reboots. Only some ideas, dont know if it works.

A complete other idea: Split the base system and all the sensor / actor files. The base system is very small and first time installed by serial. can be upgraded with ota because its size without all the sensors and actors is very small. All the sensors / actors come in packages and are opional installed by file upload or some download function. What packages are in use are saved in some config that will be redownloaded after 1mb ota update.

@Grovkillen
Copy link
Member

Lets reopen this?

@Grovkillen Grovkillen reopened this Mar 5, 2018
@Grovkillen Grovkillen added Category: Frontend Related to web-interface and removed Type: Documentation labels Mar 5, 2018
@Grovkillen
Copy link
Member

Should we provide an official OTA bin file for this two stage update? I mean which is then maintained and released together with the rest of the bin files? Today we only have this one which will not be maintained.

@ghost ghost modified the milestones: 2.0.0, future Mar 22, 2018
@tonhuisman
Copy link
Contributor

This seems to be solved, so can be closed.

@TD-er TD-er closed this as completed Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Frontend Related to web-interface
Projects
None yet
Development

No branches or pull requests

6 participants