OTA Upgrade fail - CRC mismatch in ESP8266 using RTOS SDK 1.5

Cherry
Posts: 4
Joined: Tue Jun 06, 2017 11:46 am

OTA Upgrade fail - CRC mismatch in ESP8266 using RTOS SDK 1.5

Postby Cherry » Tue Jun 06, 2017 12:23 pm

Hi Team,

I am using ESP8266 latest RTOS SDK version 1.5. I do OTA upgrade using custom server.
Sometimes OTA upgrade is successful and sometimes OTA upgrade is not successsful even though correct image is flashed.
I see Image CRC and Flash CRC does not match. I expected printing to the serial console i.e. debug prints affecting CRC.
How to solve this problem. How image CRC and flash CRC is calculated? Do I need to change any settings in make file for generating correct checksum.
Do I need to remove debug prints to serial console, in order to not affect checksum?
what is IROM checksum?
Can any one kindly explain in detail.

Thanks,Regards,
Cherry.

Her Mary
Posts: 537
Joined: Mon Oct 27, 2014 11:09 am

Re: OTA Upgrade fail - CRC mismatch in ESP8266 using RTOS SDK 1.5

Postby Her Mary » Tue Jun 06, 2017 3:16 pm

Maybe you can dump your flash to check if "bin in flash" == "bin download from server".

Cherry
Posts: 4
Joined: Tue Jun 06, 2017 11:46 am

Re: OTA Upgrade fail - CRC mismatch in ESP8266 using RTOS SDK 1.5

Postby Cherry » Wed Jun 07, 2017 3:35 am

Hi Team,

Thanks for your immediate reply.

But I have dumped the flash @0x81000 to PC via esptool.py, and compared it with my original user2.bin, it's the same.
The image crc (image downloaded from server) and the flash crc (image written into flash) are not equal.
if I take out this function upgrade_crc_check(), fimrware upgrade is successful, but this is not right way of doing as I am by passing CRC check.
sometimes image CRC and flash CRC matches and some times do not match. Most of the times it does not match.

As I asked earlier does debug prints to console causing any problem? I tried taking them out and still no luck, but not sure if I have taken it out completely though.

Is there any fundamental problem in the RTOS SDK 1.5 which is failing CRC check? what is the solution for this, as this is a serious problem.

For sure there is some hidden issue in the RTOS SDK 1.5 or I am missing some setting related to IROM checksum

Any urgent help or suggestion or solution will be highly appreciated.

Thanks,Regards,

Min
Posts: 2
Joined: Mon Feb 26, 2018 4:40 am

Re: OTA Upgrade fail - CRC mismatch in ESP8266 using RTOS SDK 1.5

Postby Min » Sun Mar 04, 2018 8:18 pm

Hi Cherry,
I met the same problem as you did.
some bin files work but some files have CRC check problem when upgrade.
I found when the highest bit of uint32 result of CRC checking is 1, the CRC value saved inside flash is the complement code of result. when the highest bit is 0, these 2 are equal.
I don't know why this happens, but may give you a solution of upgrade.
regards
Min

Who is online

Users browsing this forum: No registered users and 164 guests