ESP8266 starting INIT=>WAIT CONFIG after every RESET

Hi All,
I am nearly to give up trials… After many double checkings I did not found what is the problem and what for.

I have six tempmeters with ESP-01 and different tempsensors (LM75, 18B20, DHT). These worked well with old and new (2.0) Blynk. Three of them now running with Blynk Edgent without any problem.
Today I would like to add one more from rests. Same hardware, same software, same configuration procedure.
After config, the device is online, working well. Till restart…
What I don’t understand: why goes to CONFIG mode again and again after RESET?

Everything seems fine, no any error message.
I have tried another ESP too with same result.


[388] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v1.1.0 on ESP8266

 #StandWithUkraine    https://bit.ly/swua


[396] --------------------------
[399] Product:  TempSensB04
[401] Hardware: 1.0.0
[403] Firmware: 0.1.0 (build Jan  2 2023 16:45:09)
[408] Device:   ESP8266 @ 80MHz
[411] MAC:      EC:FA:BC:93:C0:02
[414] Flash:    1024K
[416] ESP core: 3.0.2
[418] ESP SDK:  2.2.2-dev(38a443e)
[421] Boot Ver: 31
[423] Boot Mode:1
[424] FW info:  469056/2674688, MD5:c7cb58cd3f618ac2d92c9446b7d81960
[638] Free mem: 32560
[638] --------------------------
[639] INIT => WAIT_CONFIG
[1749] AP SSID: Blynk TempSensB04-8E17E
[1750] AP IP:   192.168.4.1
[1751] AP URL:  blynk.setup
[27956] WAIT_CONFIG => CONFIGURING
[31500] Sending board info...
[34151] Applying configuration...
[34151] WiFi SSID: XXXXX Pass: XXXXX
[34152] Blynk cloud: QcS8leMqMtcCBZVTaq-M4fnGB3av6BLS @ blynk.cloud:443
[34156] CONFIGURING => SWITCH_TO_STA
+[34157] Switching to STA...
[35262] SWITCH_TO_STA => CONNECTING_NET
+[35262] Connecting to WiFi: XXXXX
[39236] Using Dynamic IP: 192.168.0.108
[39237] CONNECTING_NET => CONNECTING_CLOUD
+[39348] Current time: Mon Jan  2 15:47:06 2023
[39349] Connecting to blynk.cloud:443
[40492] Ready (ping: 12ms).
[44675] CONNECTING_CLOUD => RUNNING
[44675] Configuration stored to flash
Blynk: Connected

Go to sleep

****NOW I PUSHED RESET BUTTON****

rl��r��c�n������p�<����8��ǒ��p�nn��;�nĒ��e�b�$�rrp�n�������l�����b�n��n�䎐���b��>~�n�����l`e���#�n��;nr���;��?r�;p�n��܀�r��b���8�b�n��n���b��>~�n���r��#�n��{nr���;��l`e�8���;��?l`eĞ�����r��nĒ`e�[387] Using default config.
[387] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v1.1.0 on ESP8266

 #StandWithUkraine    https://bit.ly/swua


[395] --------------------------
[398] Product:  TempSensB04
[401] Hardware: 1.0.0
[403] Firmware: 0.1.0 (build Jan  2 2023 16:45:09)
[407] Device:   ESP8266 @ 80MHz
[410] MAC:      EC:FA:BC:93:C0:02
[413] Flash:    1024K
[415] ESP core: 3.0.2
[417] ESP SDK:  2.2.2-dev(38a443e)
[420] Boot Ver: 31
[422] Boot Mode:1
[424] FW info:  469056/2674688, MD5:c7cb58cd3f618ac2d92c9446b7d81960
[638] Free mem: 32560
[638] --------------------------
[638] INIT => WAIT_CONFIG

BLYNK_TEMPLATE_ID and BLYNK_DEVICE_NAME and BLYNK_AUTH_TOKEN double x double checked. It is interesting because this is my 11th device, 10 devices config were more or less quicky and without any configuration issue.

May I missed something… Guess what?

Thank you.
aquarius

Are you saying that you are adding hard-coding the Auth token to an Edgent sketch?

You shouldn’t actually have an Auth token when you stet-up a new device in Edgent, as the device is added to Blynk as part of the provisioning process, and the Auth token is only accessible when the device has been created.

Also, using an ESP-01 with Edgent is quite difficult, as Edgent requires two GPIO pins for the LED and provisioning reset button, and the ESP-01 only has two spare GPIOs.

Pete.

BLYNK_AUTH_TOKEN used only for manual provisioning (when I connected manually to ESP wifi and make connection through my mobile web browser and SSID, wifipass, auth token typing manually) anyway it commented out in my sketch.

I have tried the easyer two way too: first in mobile Blynk IOT app “add new device” and later “reconfigure”. All methods finished succesful connection directed after I am done but RESET my device caused WAIT_CONFIG again.

My earlier coded ESPs working fine. I have made a little modification on original ESP-01 PCBs because of deepsleep function (like this: ESP8266 ESP-01 Low Power Mode - run it for months | QuadMeUp) and add one more GPIO. Here is my modified ESP-01 with added GPIO4:

I also modified BOARD_BUTTON_PIN to 9 and BOARD_LED_PIN to 10 in Settings.h before uplode my code so there is no pin collision.

I feel that the answer is simple just I did not find yet. I am trying compare everything with my previous tempmeters which are working with Edgent without any problem.

One thing is interesting in Serial monitor data what I am noticed after sending my first post: see that part after my “NOW I PUSHED RESET BUTTON” comment
[387] Using default config. Is it normal or is it the answer my question?
Why is using default config instead of saved config? May this caused that I have to start config from beginning?

Pins 9 and 10 are reserved pins and will cause you significant problems if you use them for anything…

and the effect of this can be seen if you assign digital datastreams to these pins too…

Probably because of what you’re doing with pin 9, but it’s difficult to say because you’re providing disjointed information and not providing your sketch or details of your Settings.h file.

Pete.

Thank you for searching related infos. It seemed logical trully, but…
there was no problem with my previuos uploads with same hardware configuration and sketch and
I have tried some minutes ago upload my code again with another Settings.h settings, first was BUTTON 12, LED 13, then BUTTON 0, LED 5. Both cases with same results - WAIT_CONFIG again after RESET.

aquarius

Insufficient detail to be able to comment further.

Pete.

Oh my god! I found it!
As I wrote, I felt it is simple. Yes, it was my mistake. I was naiv a little, when I have seen:

Sketch uses 464897 bytes (48%) of program storage space. Maximum is 958448 bytes.
Global variables use 36484 bytes (44%) of dynamic memory, leaving 45436 bytes for local variables. Maximum is 81920 bytes.
esptool.py v3.0
Serial port COM4
Connecting........_
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: ec:fa:bc:93:bc:02
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 1MB
Erasing flash (this may take a while)...
Chip erase completed successfully in 0.7s
Compressed 469056 bytes to 340131...

Auto-detected Flash size: 1MB
It is correct, but not enough to be happy. When I have seen it, I believed my new Arduino IDE 2.0.3 able to recognize flash size automatically and not neccessary to set it manually. I was wrong.
So I missed set to flash size (Arduino IDE/Tools/Flash size) 1MB. This information is neccessary to compiler. My last device was an ESP8266 ESP-12 which has 4MB flash size and this setting remain on 4MB.

This topic can be marked as solved.

aquarius