Magic Byte bin file

llewellyn
Posts: 33
Joined: Fri May 05, 2017 8:22 am

Magic Byte bin file

Postby llewellyn » Mon Oct 09, 2017 12:19 pm

Hi,

Does the esp32 bin file always start with 0xe9?

Regards

ESP_Sprite
Posts: 9020
Joined: Thu Nov 26, 2015 4:08 am

Re: Magic Byte bin file

Postby ESP_Sprite » Tue Oct 10, 2017 1:40 am

Yes. Take care, however: ESP8266 apps starts with the same byte.

llewellyn
Posts: 33
Joined: Fri May 05, 2017 8:22 am

Re: Magic Byte bin file

Postby llewellyn » Tue Oct 10, 2017 7:19 am

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

ESP_Sprite
Posts: 9020
Joined: Thu Nov 26, 2015 4:08 am

Re: Magic Byte bin file

Postby ESP_Sprite » Tue Oct 10, 2017 7:56 am

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.

llewellyn
Posts: 33
Joined: Fri May 05, 2017 8:22 am

Re: Magic Byte bin file

Postby llewellyn » Tue Oct 10, 2017 11:14 am

Hi,

Thank You.
I will check it out.

Regards

Who is online

Users browsing this forum: Baidu [Spider], greycon and 144 guests