esp8266-ci-ota icon indicating copy to clipboard operation
esp8266-ci-ota copied to clipboard

'Verify bin header failed' error

Open glynhudson opened this issue 8 years ago • 3 comments

Hi Dan, as you have probably have gathered I have been working towards re-creating your awesome continuous delivery project, and learning lots in the process. I think I'm almost there. I've got Travis and platformio setup to auto generating the compiled .bin on a release, see blog post. Today I setup the server php script and the ESP code. At first it seemed to work when the build number of the firmware matched the build number on the GitHub release I saw the following output from the ESP:

    Going to update firmware...
    Checking for Update. Current version: 0.0.1
    HTTP_UPDATE_NO_UPDATES

However when I released a point updated release on Github (0.0.1 > 0.0.2), I got the following update from the ESP:

    Going to update firmware...
    Checking for Update. Current version: 0.0.1
    HTTP_UPDATE_FAILD Error (-106): Verify bin header failedGoing to update firmwar. 

Have you any idea what could be causing the bin header failed error? The PHP script is obviously working to serve up the updated .bin, however the ESP http updater seem to be throwing an error.

Here is my ESP code with modified URL for the php scrip. The server code is unchanged ([appart from the repo URL])(https://github.com/openenergymonitor/EmonESP/blob/ota/ota/firmware.php#L3). My php script is served from here if you want to test it.

glynhudson avatar Jun 18 '16 00:06 glynhudson

Hi Glyn. I think I resolved your issue and I hope you're not gonna hate yourself for it: your php script starts with an empty line, actually with a new line character:

squix78 avatar Jun 26 '16 07:06 squix78

Doh indeed! Thanks so much, sometimes the simplest things cause so much pain! Now working beautifully 👍

Checking for Update. Current version: 0.0.3#

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1264, room 16 
tail 0
chksum 0x0f
csum 0x0f
@cp:0
     ld

emonESP Startup
BUILD_TAG: 0.0.4#
Connecting as Wifi Client to xxx epass:xxxx
Connected, IP Address: 192.168.0.75
HTTP server started
Going to update firmware...
Checking for Update. Current version: 0.0.4#

glynhudson avatar Jun 26 '16 22:06 glynhudson

Sweet! Happy that it works now!

Sent from my iPhone

On 27.06.2016, at 00:32, Glyn Hudson [email protected] wrote:

Doh indeed! Thanks so much, sometimes the simplest things cause so much pain! Now working beautifully 👍

Checking for Update. Current version: 0.0.3#

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1264, room 16 tail 0 chksum 0x0f csum 0x0f @cp:0 ld

emonESP Startup BUILD_TAG: 0.0.4# Connecting as Wifi Client to xxx epass:xxxx Connected, IP Address: 192.168.0.75 HTTP server started Going to update firmware... Checking for Update. Current version: 0.0.4# — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

squix78 avatar Jun 27 '16 05:06 squix78