I'm doing a firmware update with the sample code at https://harizanov.com/2015/06/firmware-over-the-air-fota-for-esp8266-soc/. The only change I made was to do a keep-alive instead of a close
os_sprintf((char*)update->url,
"GET %s%s HTTP/1.1\r\n"
"Host: "IPSTR":%d\r\n"
"Connection: keep-alive\r\n"
"\r\n",
path, file, IP2STR(update->ip), update->port);
The sectors get erased fine and the updates are pulled:
erase 145 ok
errase sector=147 ok
erase sector=148 ok
erase sector=149 ok
erase sector=150 ok
erase sector=151 ok
erase sector=152 ok
erase sector=153 ok
erase sector=154 ok
erase sector=155 ok
erase sector=156 ok
erase sector=157 ok
erase sector=158 ok
erase sector=159 ok
erase sector=160 ok
erase sector=161 ok
erase sector=162 ok
erase sector=163 ok
erase sector=164 ok
erase sector=165 ok
erase sector=166 ok
erase sector=167 ok
erase sector=168 ok
erase sector=169 ok
erase sector=170 ok
erase sector=171 ok
erase sector=172 ok
erase sector=173 ok
erase sector=174 ok
erase sector=175 ok
erase sector=176 ok
erase sector=177 ok
erase sector=178 ok
erase sector=179 ok
erase sector=180 ok
erase sector=181 ok
erase sector=182 ok
erase sector=183 ok
erase sector=184 ok
erase sector=185 ok
erase sector=186 ok
erase sector=187 ok
erase sector=188 ok
erase sector=189 ok
erase sector=190 ok
erase sector=191 ok
erase sector=192 ok
erase sector=193 ok
erase sector=194 ok
erase sector=195 ok
ALL=67 sectors erase ok!
upgrade_connect_cb
GET /firmware/latest/user2.bin HTTP/1.1
Host: 192.168.30.134:5000
Connection: keep-alive
HEAD /firmware/latest/user2.bin HTTP/1.1
Host: 192.168.30.134:5000
Connection: close
totallen = 17
totallen = 1477
totallen = 2937
totallen = 4397
totallen = 5857
totallen = 7317
totallen = 8777
totallen = 10237
totallen = 11697
totallen = 13157
totallen = 14617
totallen = 16077
totallen = 17537
totallen = 18997
totallen = 20457
totallen = 21917
totallen = 23377
totallen = 24837
totallen = 26297
totallen = 27757
totallen = 29217
totallen = 30677
totallen = 32137
totallen = 33597
totallen = 35057
totallen = 36517
totallen = 37977
totallen = 39437
totallen = 40897
totallen = 42357
totallen = 43817
totallen = 45277
totallen = 46737
totallen = 48197
totallen = 49657
totallen = 51117
totallen = 52577
totallen = 54037
totallen = 55497
totallen = 56957
totallen = 58417
totallen = 59877
totallen = 61337
totallen = 62797
totallen = 64257
totallen = 65717
totallen = 67177
totallen = 68637
totallen = 70097
totallen = 71557
totallen = 73017
totallen = 74477
totallen = 75937
totallen = 77397
totallen = 78857
totallen = 80317
totallen = 81777
totallen = 83237
totallen = 84697
totallen = 86157
totallen = 87617
totallen = 89077
totallen = 90537
totallen = 91997
totallen = 93457
totallen = 94917
totallen = 96377
totallen = 97837
totallen = 99297
totallen = 100757
totallen = 102217
totallen = 103677
totallen = 105137
totallen = 106597
totallen = 108057
totallen = 109517
totallen = 110977
totallen = 112437
totallen = 113897
totallen = 115357
totallen = 116817
totallen = 118277
totallen = 119737
totallen = 121197
totallen = 122657
totallen = 124117
totallen = 125577
totallen = 127037
totallen = 128497
totallen = 129957
totallen = 131417
totallen = 132877
totallen = 134337
totallen = 135797
totallen = 137257
totallen = 138717
totallen = 140177
totallen = 141637
totallen = 143097
totallen = 144557
totallen = 146017
totallen = 147477
totallen = 148937
totallen = 150397
totallen = 151857
totallen = 153317
totallen = 154777
totallen = 156237
totallen = 157697
totallen = 159157
totallen = 160617
totallen = 162077
totallen = 163537
totallen = 164997
totallen = 166457
totallen = 167917
totallen = 169377
totallen = 170837
totallen = 172297
totallen = 173757
totallen = 175217
totallen = 176677
totallen = 178137
totallen = 179597
totallen = 181057
totallen = 182517
totallen = 183977
totallen = 185437
totallen = 186897
totallen = 188357
totallen = 189817
totallen = 191277
totallen = 192737
totallen = 194197
totallen = 195657
totallen = 197117
totallen = 198577
totallen = 200037
totallen = 201497
totallen = 202957
totallen = 204417
totallen = 205877
totallen = 207337
totallen = 208797
totallen = 210257
totallen = 211717
totallen = 213177
totallen = 214637
totallen = 216097
totallen = 217557
totallen = 219017
totallen = 220477
totallen = 221937
totallen = 223397
totallen = 224857
totallen = 226317
totallen = 227777
totallen = 229237
totallen = 230697
totallen = 232157
totallen = 233617
totallen = 235077
totallen = 236537
totallen = 237997
totallen = 239457
totallen = 240917
totallen = 242377
totallen = 243837
totallen = 245297
totallen = 246757
totallen = 248217
totallen = 249677
totallen = 251137
totallen = 252597
totallen = 254057
totallen = 255517
totallen = 256977
totallen = 258437
totallen = 259897
totallen = 261357
totallen = 262817
totallen = 264277
totallen = 265737
totallen = 267197
totallen = 268657
totallen = 270117
totallen = 271577
totallen = 273037
totallen = 273723
upgrade_check
[OTA]failed!
And then it times out and fails. Any idea why this is happening? Any idea how to root cause the timeout?