ESP8266 Developer Zone The Official ESP8266 Forum 2017-06-02T01:30:23+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=3872 2017-06-02T01:30:23+08:00 2017-06-02T01:30:23+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3872&p=13633#p13633 <![CDATA[Re: FOTA example with custom Server]]>
pratik wrote:
In OpenSDK, you can check out the makefile of projects like libesphttpd. That's a great example, and generates user1 and user2, both.
In Lubuntu environment, you can use the gen_misc.sh script to generate exactly the file that you need.


Thanks Pratik! Ill jump into that this week and see if I can figure this the heck out.
I appreciate it.
Stay tuned.

Statistics: Posted by AgentSmithers — Fri Jun 02, 2017 1:30 am


]]>
2017-06-01T16:56:00+08:00 2017-06-01T16:56:00+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3872&p=13616#p13616 <![CDATA[Re: FOTA example with custom Server]]> In Lubuntu environment, you can use the gen_misc.sh script to generate exactly the file that you need.

Statistics: Posted by Guest — Thu Jun 01, 2017 4:56 pm


]]>
2017-05-30T23:34:05+08:00 2017-05-30T23:34:05+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3872&p=13548#p13548 <![CDATA[Re: FOTA example with custom Server]]> Thank you for chiming in.

Statistics: Posted by AgentSmithers — Tue May 30, 2017 11:34 pm


]]>
2017-05-22T02:50:30+08:00 2017-05-22T02:50:30+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3872&p=13318#p13318 <![CDATA[Re: FOTA example with custom Server]]>
pratik wrote:
Not that, I was refering to firmware version number.
You can also follow a nomenclature that helps determine version on server and if it is different from current firmware running on your ESP, such as user_x.bin


Thanks Pratik!
When I say Version=2 it seems that it does something within the makefile commands to spit out the FOTA firmware in LU of the original. I guess the main issue I am having is locating a Makefile that will work properly and generate both User_x.bin firmware. The makefile I have right now only gives the NON-FOTA firmware.
Thanks again for Chiming in!

Statistics: Posted by AgentSmithers — Mon May 22, 2017 2:50 am


]]>
2017-05-21T00:17:47+08:00 2017-05-21T00:17:47+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3872&p=13293#p13293 <![CDATA[Re: FOTA example with custom Server]]> You can also follow a nomenclature that helps determine version on server and if it is different from current firmware running on your ESP, such as user_x.bin

Statistics: Posted by Guest — Sun May 21, 2017 12:17 am


]]>
2017-05-20T00:42:24+08:00 2017-05-20T00:42:24+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3872&p=13269#p13269 <![CDATA[Re: FOTA example with custom Server]]>
pratik wrote:
Yes, without the version information, there is no way of knowing whether to update or not.
However, it all depends on your update server implementation.


Thank you Pratik for responding to this. I am not sure we are talking about the same "version". I am the latest NONOS SDK with open-esp-sdk. Does that help with the version information you need to answer my question or is there some other version information you are asking for?

Thanks again for chiming in!!

Statistics: Posted by AgentSmithers — Sat May 20, 2017 12:42 am


]]>
2017-05-19T17:44:01+08:00 2017-05-19T17:44:01+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3872&p=13257#p13257 <![CDATA[Re: FOTA example with custom Server]]> However, it all depends on your update server implementation.

Statistics: Posted by Guest — Fri May 19, 2017 5:44 pm


]]>
2017-05-15T05:30:17+08:00 2017-05-15T05:30:17+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3872&p=13119#p13119 <![CDATA[Re: FOTA example with custom Server]]>
pratik wrote:
I can summarize the FOTA process for you.

The FOTA flash map specifies 2 copies of the firmware that can be executed. The boot.bin is responsible for deciding, at the time of booting, which copy of firmware will run. The info on which copy of firmware, user1.bin or user2.bin is latest and good is stored in system flash param area.

Now if you need to update the firmware, say when you are running user1.bin, you just need to download and write the area where user2.bin is stored. Then after verifying that the firmware is good, you can change the system param area to point to the updated bin file.

When the ESP8266 boots next the boot.bin will jump to the updated BIN!
user1.bin and user2.bin are the same thing. Just that you can modify user2.bin when running user1.bin and vice versa.

Hope this helps! How you download the new BIN does not matter. Could be over UART, or from a memory card or from a server - anywhere.


Yes sir, I am tottally aware of that process. Thank you Kindly for responding. The Part I cant see ANY documentation on is how to make the FOTA firmware with the Blinky.C example.. I think I need an updated make file. Again, I've gone through document after document and google search after google search for this information and I can not locate anything solid. I am referring to the NONSDK Blinky.c example.
Thanks again for chiming in!

Post Script: I think there is a Version=2 argument that needs to be passed to the makefile?

Statistics: Posted by AgentSmithers — Mon May 15, 2017 5:30 am


]]>
2017-05-14T20:53:07+08:00 2017-05-14T20:53:07+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3872&p=13103#p13103 <![CDATA[Re: FOTA example with custom Server]]>
The FOTA flash map specifies 2 copies of the firmware that can be executed. The boot.bin is responsible for deciding, at the time of booting, which copy of firmware will run. The info on which copy of firmware, user1.bin or user2.bin is latest and good is stored in system flash param area.

Now if you need to update the firmware, say when you are running user1.bin, you just need to download and write the area where user2.bin is stored. Then after verifying that the firmware is good, you can change the system param area to point to the updated bin file.

When the ESP8266 boots next the boot.bin will jump to the updated BIN!
user1.bin and user2.bin are the same thing. Just that you can modify user2.bin when running user1.bin and vice versa.

Hope this helps! How you download the new BIN does not matter. Could be over UART, or from a memory card or from a server - anywhere.

Statistics: Posted by Guest — Sun May 14, 2017 8:53 pm


]]>
2017-05-01T14:10:54+08:00 2017-05-01T14:10:54+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3872&p=12706#p12706 <![CDATA[Re: FOTA example with custom Server]]>
DomalysAlexis wrote:
Hello,

I have some difficulties to found example code for FOTA with custom server (without using espressif cloud). The application note is not enough clear for using with custom server.

Could you provide me some example code (esp side and server side)?



Domaly,
I am having the very same issue. If you like we can try to tackle the problem together, Maybe Via Skype if you like?
From my understanding the firmware has to be made using a MAKEFILE setting known as "Version 2". I went through the full documentation and there are points that are not totally clear. From my understanding is you call an API to see which BOOT file you are currently working out of then you write to the sector your not booted on, However I do not know which sector to really target. Judging by some of the doc's it seems that a FOTA layout is different then a normal layout and that isent really described well in the document from what I recall reading. One the Firmware is written you then reboot and call the same API again to see it swapped to the other boot partition then write to the other one.. Again, I am not clear on this at all. I am unable to find the answers I am looking for but I did go through some source code to try and identify a logic to the FOTA. I am using Blinky.c as an example and in my case I write my firmware to 0x10000, However the moment I try and write that during run time my chip crashes which is obviously a no no.
If anyone has ANY ticks on this process It would be greatly appreciated! Even point me to a place that has the answers on how the chip boots vs FOTA booting I will be glad to reach, But searching ALL over google I failed to find something that indicates a clear line being drawn on this topic.

Statistics: Posted by AgentSmithers — Mon May 01, 2017 2:10 pm


]]>
2017-04-26T13:45:21+08:00 2017-04-26T13:45:21+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3872&p=12602#p12602 <![CDATA[Re: FOTA example with custom Server]]> We do not have a generic code for all this because the server architecture might be of any type of form. You can update ESP flash from anything... memory card, UART, server - just about anything! This makes creating an useful app note difficult. Just refer to the APIs, you should get the logic from there.

A suggestion - develop the server end first and program the ESP8266 accordingly using SDK APIs. Other way round will be more complex.

Statistics: Posted by Guest — Wed Apr 26, 2017 1:45 pm


]]>
2017-04-13T23:11:43+08:00 2017-04-13T23:11:43+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3872&p=12284#p12284 <![CDATA[FOTA example with custom Server]]>
I have some difficulties to found example code for FOTA with custom server (without using espressif cloud). The application note is not enough clear for using with custom server.

Could you provide me some example code (esp side and server side)?

Statistics: Posted by DomalysAlexis — Thu Apr 13, 2017 11:11 pm


]]>