Chat freely about anything...

User avatar
By rith87
#32278 I'm doing a firmware update with the sample code at https://harizanov.com/2015/06/firmware-over-the-air-fota-for-esp8266-soc/. On the server end, I am using flask to serve the firmware update.

Here's what the esp8266 spits out:

Code: Select all[OTA]Server 192.168.30.134:5000. Path: /firmware/latest/user2.bin
system_upgrade_start
upgrade_connect
[OTA]Upgrading...
upgrade_connect_cb
GET /firmware/latest/user2.bin HTTP/1.1
Host: 192.168.30.134:5000
Connection: close

HEAD /firmware/latest/user2.bin HTTP/1.1
Host: 192.168.30.134:5000
Connection: close


On the flask end, I see the HEAD HTTP request only:

Code: Select all192.168.30.24 - - [26/Oct/2015 11:26:46] "HEAD /firmware/latest/user2.bin HTTP/1.1" 200 -


So, I have two questions:

1. What happened to the GET request?
2. I see other folks doing FOTA receiving a "Connection: Keep Alive" in their HTTP header but I get a "Connection: Closed". Is this the root cause? I guess I can switch to another HTTP server to serve this request but I thought I would try to see what the folks here think.
User avatar
By rith87
#32282 Well, it looks like the ESP8266 is just echoing the url:

Code: Select all    os_sprintf((char*)update->url,
    "GET %s%s HTTP/1.1\r\n"
    "Host: "IPSTR":%d\r\n"
    "Connection: close\r\n"
    "\r\n",


Let's see what happens when I switch to keep-alive...
User avatar
By rith87
#32290 After switching from "Connection: close" to "Connection: keep-alive", the firmware update begins but still fails eventually:

Code: Select all...
totallen = 265737
totallen = 267197
totallen = 268657
totallen = 270117
totallen = 271577
totallen = 273037
totallen = 273723
upgrade_check
[OTA]failed!