Source code for firmware in FOTA_Demonstration_EN example

winzin311
Posts: 11
Joined: Tue Jul 12, 2016 2:01 pm

Source code for firmware in FOTA_Demonstration_EN example

Postby winzin311 » Wed Oct 11, 2017 5:49 am

Dear Espressif,

I'm looking for the firmware SOURCE CODE in your "FOTA_Demonstration_EN" example. Could you point me to this?
It would be helpful to be able to reference this for integration FOTA into my own firmware.

Thank you.

Her Mary
Posts: 537
Joined: Mon Oct 27, 2014 11:09 am

Re: Source code for firmware in FOTA_Demonstration_EN example

Postby Her Mary » Wed Oct 11, 2017 1:53 pm

There is a demo, but it was uploaded 2 years ago, not sure if it can still work now :? . But you can have a try.

winzin311
Posts: 11
Joined: Tue Jul 12, 2016 2:01 pm

Re: Source code for firmware in FOTA_Demonstration_EN example

Postby winzin311 » Thu Oct 19, 2017 1:18 pm

Thank you, I'll give it a try~~~ :)

winzin311
Posts: 11
Joined: Tue Jul 12, 2016 2:01 pm

Re: Source code for firmware in FOTA_Demonstration_EN example

Postby winzin311 » Sat Oct 21, 2017 10:26 am

Hi,

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.

Who is online

Users browsing this forum: No registered users and 120 guests