ratgdo / homekit-ratgdo

A native HomeKit implementation of a Security+ 2.0 garage door controller based on ratgdo hardware
https://ratgdo.github.io/homekit-ratgdo/
GNU General Public License v3.0
214 stars 21 forks source link

"checkFlashCRC() failed, reboot and/or flash new firmware" after updating to 1.4.x #189

Closed clajiness closed 5 months ago

clajiness commented 5 months ago

Hello,

After updating to 1.4.1, I received the warning checkFlashCRC() failed, reboot and/or flash new firmware. I rolled back to 1.3.5 without issue. I tried 1.4.3, but saw the same warning and decided to roll back again.

I did not grab logs, but would be happy to upgrade and collect them if they would help.

Thanks much!

dkerr64 commented 5 months ago

Version 1.3.5 did not report flash CRC state, it was something we added after that. If 1.4.3 is constantly reporting failure, then that is concerning and I would advise updating firmware from USB. If you still get the error after that, then repeat and this time select the erase option.

clajiness commented 5 months ago

Thank you for the info. I'll give the update a try via USB and see how it goes. Appreciate it!

dkerr64 commented 5 months ago

We have found a bug that was overwriting flash memory that we shouldn't have been. We're working on a fix. I suspect that the "OTA bricked my ratgdo" is not quite accurate... the flash had already been corrupted and a reboot even without an OTA upgrade would have failed.

The reason that everything seemed to be fine is because the part of the flash that was written over is in the first 4KB which is reserved for the bootloader... and of course it only ever runs at boot. But it was in the HomeKit server, so it was writing (actually erasing) a part of memory that it shouldn't... and the part that should have been erased was not. This likely led to problems with HomeKit server operations.

Time will tell if we have finally found the root cause of our stability problems.

jgstroud commented 5 months ago

Fixed in 1.5.0. please reopen if you see this again.