Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

OTA updates suddenly stop working

I have a group of 10 prototypes based on the ESP WROOM-32 module, which can only be updated OTA. OTA works on all 10 of the boards, until it doesn't (i. e. at some point, a particular prototype will stop accepting new updates, and remain with the firmware that it has forever. ) Two boards are now stuck with a stable, but obsolete version (which works perfectly on both boards). RPC calls and HTTP work perfectly on both affected units. But they are essentially bricks unless the OTA update mechanism can be successfully re-achieved.

The OTA command used to update these boards is this:

C:\Mong\DACTest17>curl -v -F file=@build/fw.zip http://192.168.4.1/update

The response is always as follows (whether or not the firmware update is successful):

  • Trying 192.168.4.1...
  • TCP_NODELAY set
  • Connected to 192.168.4.1 (192.168.4.1) port 80 (#0)
    > POST /update HTTP/1.1
    > Host: 192.168.4.1
    > User-Agent: curl/7.55.1
    > Accept: /
    > Content-Length: 1276291
    > Expect: 100-continue
    > Content-Type: multipart/form-data; boundary=------------------------f3c8fea3103913c1
    >
  • Done waiting for 100-continue
    < HTTP/1.1 200 OK
    < Server: Mongoose/6.12
    < Content-Type: text/plain
    < Connection: close
    <
    Update applied, finalizing
  • Closing connection 0

What has happened?
How can I recover OTA update capability on the two affected units?

Please help!

Thanks all,

JSW

Comments

  • jstevewoodjstevewood California

    Hi Sergey

    Thanks for taking this up.

    After further study of the UDP logs given at each firmware update, I find the following line in the UDP log every time the update fails:

    04:36.7 192.168.4.1 49153 You 1993 UDP esp32_0CB14C 20 1514797174.316 2|mgos_upd_file_begin Skip writing app (digest matches)\n

    It looks like the something about the update process is thinking that the update version is identical to the previous version, and is rejecting it at the start. (The versions are very slightly different).

    I am able to get around this problem by going backwards to an ancient version, successfully updating it, and then immediately updating with the latest version. I will see what happens with additional new updates.

    JSW

Sign In or Register to comment.