Left here for archival purposes.

User avatar
By Mondo90
#25599 Hello,

I noticed that init.lua once edited and flashed again apply only part of script changes. For example, ssid never changes in my case and still is "mywifi" the same with password. Fortunately baudrate changes but I am not sure other variables and since something doesnt work as it should this bug makes it very very hard to debug !

I use ESP-01 moudle and installed all folowing this tut -> http://www.roboremo.com/esp8266-tcp-to-serial.html

What's wrong ?
User avatar
By devsaurus
#25804
Mondo90 wrote:I noticed that init.lua once edited and flashed again apply only part of script changes. For example, ssid never changes in my case and still is "mywifi" the same with password.


You don't need to run the WIFI configuration each time. The ESP8266 stores the settings in flash and will recall them after boot. Thus I'd propose you remove these commands from init.lua and apply them semi-manually when you need to change the configuration (or after flashing the firmware).

Start with downloading the firmware again together with blank.bin and esp_init_data_default.bin (INTERNAL://BLANK and INTERNAL://DEFAULT for the nodemcu flash utility). Then execute the configuration commands and see how your init.lua script behaves now.
I'd also recommend to increase the delay in your init.lua to >1 s in case you need to delete it due to bugs.