Just wanted to report that the demo source is a great start, but it was missing a couple of things:
1) system_upgrade_reboot(); needs to be placed in the check for upgrade_flag==true in user_esp_platform_upgrade_cb.
2) I uncommented out the #if 0 block that switches between user1.bin and user2.bin and then changed the os_sprintf line to the following:
os_sprintf(server->url, "GET /%s HTTP/1.0\r\nHost: "IPSTR":%d\r\n"pheadbuffer"",
user_bin, IP2STR(server->ip),
80);
The path was hardcoded before so I just used the user_bin variable instead. I used the Mini-Webserver PC app that's mentioned in the appnote (ESP8266_FOTA_Demonstration__EN.pdf) to test it and it works.
Took me few hours to debug this even with the head start so I hope it can help someone.Statistics: Posted by winzin311 — Sat Oct 21, 2017 10:26 am
]]>