Page 1 of 1

Initial definition saved in Flash

Posted: Mon Sep 04, 2017 8:32 pm
by Jan Kijonka
Hello,

I would like to have station mode and enabled DHCP by default saved in flash (initial condition).

Is it possible to set initial condition for "AT+CWMODE_DEF=1" and "AT+CWDHCP_DEF=0,1" in flash download tool ?

Thank you,
Jan

Re: Initial definition saved in Flash

Posted: Tue Sep 05, 2017 4:31 pm
by pratik
This is not possible right away using a standard method.
But there is a way, which will take some experimentation. Everything stored in the flash by the firmware is in the last 16kB of the memory. You can see the flash map from Getting Started Guide.
So what you can try is, send the commands you want to your ESP with AT commands. The firmware will then save the data to the flash. Then copy the last 16kB of the flash and flash it to the new devices along with AT firmware (make sure version is the same).
Then you should have the exact clone of the flash settings on first module.

Re: Initial definition saved in Flash

Posted: Tue Sep 05, 2017 9:36 pm
by Jan Kijonka
It sounds well, I will try it.

Re: Initial definition saved in Flash

Posted: Thu Sep 07, 2017 10:11 pm
by Jan Kijonka
I found some changes in the last 16KB flash area when I changed the initial definition. However, after change of the "esp_init_data_default" to user defined "esp_init_data_user" downloaded from a correctly set ESP flash on the address 0x3FC000 and upload the copy to the new ESP flash, there was no change -> the ESP started as in the default initial condition. I have decided to copy the entire 4MB flash instead of the last 16KB and.. it works. Is that correct ? MAC addresses stayed unchanged so it might not be a problem.