esp8266-react icon indicating copy to clipboard operation
esp8266-react copied to clipboard

esp32 bootloop with platform=espressif32

Open MichaelDvP opened this issue 1 year ago • 5 comments

With the new espressif 6.4.0 / framework-arduinoespressif32 3.20011 the esp32 bootloops with this message

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13232
load:0x40080400,len:3028
entry 0x400805e4

I've tested with the plain code from here, set all features.ini to zero and also removed the LightStateSevice and LightMqttSettingsService, but still bootloop. -D CORE_DEBUG_LEVEL=5 does not give any other message. I think it's something at initialisation so i moved the esp8266React to the setup funcion and it works.

This bootloops:

main.cpp:
#include <ESP8266React.h>
AsyncWebServer server(80);
ESP8266React esp8266React(&server);
ESP8266React * espReact;
void setup() {
  espReact->begin();
  server.begin();
}
void loop() {
  esp8266React.loop();
}

This works:

main.cpp:
#include <ESP8266React.h>
AsyncWebServer server(80);
ESP8266React * espReact;
void setup() {
  espReact = new ESP8266React(&server);
  espReact->begin();
  server.begin();
}
void loop() {
  espReact->loop();
}

Any idea what causes the bootloop?

MichaelDvP avatar Sep 05 '23 13:09 MichaelDvP

I've found the cause: In WifiSettingsService move all WIFI.xxx to the begin() function and it works. Should i make a PR?

MichaelDvP avatar Sep 06 '23 05:09 MichaelDvP

@MichaelDvP I would love to see an example of this - as a PR to this repo doesn't seem very realistic.

larsskj avatar Feb 17 '24 17:02 larsskj

Another workaround could be to downgrade the Espressif Arduino library.

I tried with

[email protected]

in platform.ini and everything worked again.

larsskj avatar Feb 17 '24 17:02 larsskj

Another workaround could be to downgrade the Espressif Arduino library.

I tried with

[email protected]

in platform.ini and everything worked again.

Changing the Espressif library version fixed the issue, Thanks.

kadharsh avatar Apr 10 '24 10:04 kadharsh

I've found the cause: In WifiSettingsService move all WIFI.xxx to the begin() function and it works. Should i make a PR?

This worked, such an easy an important PR. Thanks @MichaelDvP you saved my day! Regards

SergioArrighi avatar Jun 25 '24 20:06 SergioArrighi