-->
Page 1 of 2

Cloud update documentation

PostPosted: Wed Oct 29, 2014 1:07 am
by Fadi
Hi
I looked at the code and it seems that the cloud update reaches out to the iot.espressif.cn as we know, but I am wondering is there any documentation
to explain how that happens and what are the steps?
I did a quick search on the forums along side google and didn't find anything that much useful.

Thanks

Re: Cloud update documentation

PostPosted: Wed Oct 29, 2014 4:23 am
by 0ff
Well unfortunately I too wasn't able to come up with official english docs.
I think there may be some in the cinese docs, but well, code is english :)

Basically, what happens is this:
    1. Module calls out to iot.espresssif.cn ("Host") with a key and asks for available versions.
    2. Host tells the module which versions are available
    3. Module requests the newest (i.e. first) version. Depending on which user bin (1 or 2) is currently active, the *other* bin is requested from the server
    4. When receiving the binary, the module will flash it to either 0x40101000 (user bin 1) or 0x40141000
    5. When the transfer is finished, the module boots into the newly flashed bin

There are some prerequisites: You need the boot loader (boot_v1.1.bin) at 0x40100000, you need to use the eagle.app.v6.app1.ld/eagle.app.v6.app2.ld ldscripts to build the bins and you need to make sure that there are no user settings that might corrupt the boot loader (i.e. make sure you flash the blank.bin at 0x7E000.

Aside from the clunky setup, this is actually the fastest way to flash the module. I can flash a whole binary (~250kb) in < 5s, including transfer and reboot. This is awesome :)

Re: Cloud update documentation

PostPosted: Wed Oct 29, 2014 9:05 am
by Fadi
Thanks 0ff for the info.
Would you happen to have that documentation or a link to it? (i'd love to keep a copy and perhaps google translate can pinch in a bit)

I am aware that there are two portions needed to be flashed but this is the first time I read about user bin 1 & 2, can you tell me where can
I find this information? My main problem with all this is the scattered pieces of information here and there and the lack of an official -up to date- source
to get it from. I have spent the past several days just reading and reading, getting confused at times, then getting the "Aha" moment only to get confused
again :)

My modules should arrive in a couple of days, so hopefully that will take some of the guess work out.

Thanks
FK

Re: Cloud update documentation

PostPosted: Tue Nov 11, 2014 4:02 pm
by Bananis
There are some more information in this thread: http://www.esp8266.com/viewtopic.php?f=5&t=9&start=50

The information is taken from the SDK user manual. It used to be available on Tinheads really excellent OneDrive (https://onedrive.live.com/?cid=C4DDF72E6EEA3826&id=C4DDF72E6EEA3826!631), but the document section seems to have disappeared, so i attach the document here.

/Bananis