User mini profile

- Wed Oct 29, 2014 1:07 am#2024
HiI 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 documentationto 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.

User mini profile

- Wed Oct 29, 2014 4:23 am#2028
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 available3. 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 server4. When receiving the binary, the module will flash it to either 0x40101000 (user bin 1) or 0x401410005. 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

User mini profile

- Wed Oct 29, 2014 9:05 am#2032
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 canI 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- sourceto 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 confusedagain

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