itead / Sonoff_Devices_DIY_Tools

BSD 3-Clause "New" or "Revised" License
558 stars 166 forks source link

File size changed #66

Open Aryankids opened 4 years ago

Aryankids commented 4 years ago

These days Tasmota major changes take place and the hardcoded 508k act as a showstopper to upgrade to a new version. Such a change will remove the obstacle whilst it does not require the code to change substantially.

dzek69 commented 4 years ago

The limit there is for a reason - flash memory size of Sonoff devices is 1MB.

To upgrade via OTA/WIFI you should fit your existing firmware on a device plus new firmware. Then new one can replace old. Putting a limit of firmware size to 50% of available memory seems right.

If you want to install bigger firmwares you should use cables connection using "USB-TTL converter", as described here: https://rutg3r.com/sonoff-firmware-tutorial-to-esp-easy/

I don't know the original firmware size (at this moment of time), but if it is or grows on new devices to for example 480 KB increasing the limit to 608 KB (so total is 1088 KB) would cause new firmware not to upload correctly. I suspect this change works for you now but may hit you back in the future.