Initial definition saved in Flash

Jan Kijonka
Posts: 28
Joined: Fri Jun 09, 2017 10:17 pm

Initial definition saved in Flash

Postby Jan Kijonka » Mon Sep 04, 2017 8:32 pm

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

pratik

Re: Initial definition saved in Flash

Postby pratik » Tue Sep 05, 2017 4:31 pm

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.

Jan Kijonka
Posts: 28
Joined: Fri Jun 09, 2017 10:17 pm

Re: Initial definition saved in Flash

Postby Jan Kijonka » Tue Sep 05, 2017 9:36 pm

It sounds well, I will try it.

Jan Kijonka
Posts: 28
Joined: Fri Jun 09, 2017 10:17 pm

Re: Initial definition saved in Flash

Postby Jan Kijonka » Thu Sep 07, 2017 10:11 pm

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.

Who is online

Users browsing this forum: No registered users and 157 guests