Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By Reza Naima
#15322 I'm convinced that some background processing is happening that prevents the esp from connecting to the router for a period of exactly 20 minutes. I managed to get it to connect right away a couple times, but then it went back to taking 20 minutes. I'm not sure what the problem is. With debug enabled it just prints out (using the included example code). It seems to reliably connect after 20 minutes. It has no problems connecting right away outside of the arduino environment. Still trying to debug but any help would be greatly appreciated.

..reconnect
.scandone
..reconnect
.scandone
..reconnect
.scandone
User avatar
By Reza Naima
#15327 Ok, I found the culprit. In the user_init() it calls init(). When I commented it out it connected right away. I'm not sure what function this calls or in what file.

void user_init(void)
{
uart_div_modify(0, UART_CLK_FREQ / (115200));

// init();

initVariant();

cont_init(&g_cont);

system_os_task( loop_task,
LOOP_TASK_PRIORITY,
g_loop_queue,
LOOP_QUEUE_SIZE);

system_init_done_cb(&init_done);
}
User avatar
By Reza Naima
#15446 There is something strange going on. I further narrowed it down to gpio_init(). Commenting this out allowed it to work, but after some fiddling, it started working as with the call to gpio_init(). I noticed that there is some other configuration data in the flash -- wondering if something was stored there that was giving me grief. Still testing.

Reza
User avatar
By Skeen
#15545 Hi Reza.

I'm able to duplicate you're results.

I've been trying to connect an ESP module via the Arduino IDE all night with no consistent luck.
- More or less random connects, if I leave the module on it's own for quite a while.

I can confirm that commenting out 'init()' does make the module connect almost instantly.
- As I was able to using nodemcu, and it does seems the issue is in 'gpio_init()'

Have you been able to track down the issue in calling 'gpio_init()'?
- Possibly checking how the Arduino IDE does it, compared to nodemcu? :)