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

Magic Home LED Controller OTA upload failed #274

Closed
xoseperez opened this issue Nov 10, 2017 · 6 comments
Closed

Magic Home LED Controller OTA upload failed #274

xoseperez opened this issue Nov 10, 2017 · 6 comments

Comments

@xoseperez
Copy link
Owner

Originally reported by: gimi87 (Bitbucket: gimi87, GitHub: gimi87)


I have a problem with the upload via OTA. Here is the message: "There was an error trying to upload the new image, please try again (ERROR 4).". I can upload only via serial, but it is a cumbersome. Any ideas what is going on?

I tried to update from 1.9.7 to 1.9.8 and from 1.9.8 to 1.9.9. In both cases there was an error.

@xoseperez
Copy link
Owner Author

Error 4 is UPDATE_ERROR_SPACE which means there is not enough space for OTA. Can you check the "Free space" value in the status tab (at the bottom)?
Are you flashing a prebuild binary or compiling it yourself? How did you flash the version running on the device? Arduino IDE or PlatformIO?

@xoseperez
Copy link
Owner Author

Original comment by gimi87 (Bitbucket: gimi87, GitHub: gimi87):


I am flashing by compiling it myself, because of custom functionality. I am compiling it via PlatformIO, but i don't know why this firmware can't be updated. Those are mine spaces from the device:
Free heap: 15600 bytes
Firmware size: 519376 bytes
Free space: 507904 bytes
Firmware which I want to upload has 505 296 bytes.

Notice that pre-compiled firmware has more than 500KB. Two slots for firmware (normal + OTA) with EEPROM will have more bytes than chip. So the original firmware will not be updated either.

@xoseperez
Copy link
Owner Author

Original comment by gimi87 (Bitbucket: gimi87, GitHub: gimi87):


OTA updater let me go with the firmware size <500KB. Current weights:

Free heap: 19816 bytes
Firmware size: 498336 bytes
Free space: 528384 bytes

@xoseperez
Copy link
Owner Author

The binary images since 1.9.7 (I think) have been built against Core 2.4.0 RC2 and that increases the size in aprox 40Kb making it non-OTA compatible... my fault. Building it against 2.3.0 should let you flash it again. From now on will create binaries agains stable again, at least until I find another way to make the file shrink under 500Kb for all devices.

@xoseperez
Copy link
Owner Author

Images for 1.10.0 are all less than 468Kb

@xoseperez
Copy link
Owner Author

Removing milestone: 1.9.10 (automated comment)

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

No branches or pull requests

1 participant