ESP8266-EVB Iot Firmware FOTA issue

Started by tomplus, September 23, 2015, 07:52:03 pm

Previous topic - Next topic


using " Firmware" and building with SDK 1.3.0 or 1.4.0 on the usual VM and flashing MOD-WIFI-ESP8266-DEV via serial interface works. Afterwards the REST interface and the WebSockets are working for most functions.
Trying to update user?.bin through Wifi connection fails! I've tested so far:
1. ESP-Sample-Application.html (WebSockets) which cause a Fatal exception (28):epc1=0x4000bf80, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000

2. Advanced REST Client from within Chrome: causes a "Meta value too long" error; increasing FLASH_STREAM_MAX_META to 500 causes the error message "Region not found" which is due to hieroglyphics in extracted FLASH name. Used:
-- URL:
-- Payload: {"Firmware":{"boot.bin":"FILE-DATA:0","user1.bin":"FILE-DATA:0","user2.bin":"FILE-DATA:300916"}}
-- attached "user2.bin" file

3. played with curl like:
curl -v --user olimex:olimex -F user2.bin=@";type=application/octet-stream" 
--> this leads also to the error message "Region not found" which is due to an invalid FLASH file name.
The problem seems to depend on the fact that when client is posting a file multipart/form-data with boundaries is needed which may not be supported.

What is the correct way/format? Any hints?
Thanks in advance


In reverse order of questions:

Q 2 and 3.
"Region not found" messages are issued because of unconventional format expected for firmware upload. It is described in

Basically the server expects POST request with JSON content describing the data terminated by <binary zero> followed with <region-name>:<data-size>:<binary-data>

For example:

    "Firmware" : {
        "boot.bin"  : "FILE-DATA:0",
        "user1.bin" : "FILE-DATA:278880",
        "user2.bin" : "FILE-DATA:0"
<0>user1.bin:278880:<278880 bytes data>

Q 1.
Can you try it when connected to another AP as station and use station IP for connection/upload.
This is the way I usually upload firmware and have no such issue.


September 30, 2015, 09:38:48 am #2 Last Edit: September 30, 2015, 09:42:02 am by PeteW
Update: I just did a test using Sample Application (WebSockets and REST) and connected to ESP8266 AP without problems


Thank's a lot for your reply!
Meanwhile I've implemented a binary update FOTA server and client.
The main reason for this decision were some additional requirements allowing an automatic build & deploy mechanism. The ESP8266 fetches now its new firmware if there is a newer version available on server...