Page 1 of 1

Magic Byte bin file

Posted: Mon Oct 09, 2017 12:19 pm
by llewellyn
Hi,

Does the esp32 bin file always start with 0xe9?

Regards

Re: Magic Byte bin file

Posted: Tue Oct 10, 2017 1:40 am
by ESP_Sprite
Yes. Take care, however: ESP8266 apps starts with the same byte.

Re: Magic Byte bin file

Posted: Tue Oct 10, 2017 7:19 am
by llewellyn
Hi ,

So is it safe to use this byte as the start of the bin to detect the end of http headers for OTA update?

Regards

Re: Magic Byte bin file

Posted: Tue Oct 10, 2017 7:56 am
by ESP_Sprite
As long as you don't mind people also being able to accidentally chuck an esp8266 firmware image into the OTA thing, sure. If you want more verification, you can check components/bootloader_support/src/esp_image_format.c which does some validation of images in the bootloader.

Re: Magic Byte bin file

Posted: Tue Oct 10, 2017 11:14 am
by llewellyn
Hi,

Thank You.
I will check it out.

Regards