Hello,
About the excellent “Firebase: Control ESP32 GPIOs from Anywhere ” project from here at randomnerdtutorials.
In practice it is working correctly. The only problem is that eventually the board resets and prints the following error code: “error code: -3, reason: not connected“.
Could you guys tell me what could be causing the board to reset. (DOIT ESP32 DEVKIT V1).
Hi.
Does it print anything else before it resets? Or that’s the only message you get?
Regards,
Sara
Hi!
The ESP32 prints a message on reboot and another on return.
From what I understand, the board loses the wifi connection and when connecting again, it reboots.
But why does this happen?
Message before reboot:
” E (150682) wifi:sta is connecting, return error
[137843][E][WiFiSTA.cpp:317] begin(): connect failed! 0x3007
stream timeout, resuming…”
Message after reboot:
“error code: -3, reason: not connected”
Hi.
From those errors, the issue seems to be a lost Wi-Fi connection.
It seems the board cannot reconnect.
Did you have connection issues with the Wi-Fi before?
Are you using a Wi-Fi repeater?
Does the issue happen frequently at the same time? Or is it just random?
Regards,
Sara
Have you had problems connecting to Wi-Fi before? I did not have. It even has a 24h online camera on the same router and it has no defects. The problem also occurred on another network that I tested.
Are you using a WiFi repeater? no. Even the internet is public IP.
Does the problem occur frequently at the same time? Or is it just random? it’s random. In a one hour test following the operation of the board, the reset occurs once or twice.
One correction:
The two boards tested, reboot and immediately manage to reconnect with wifi.
To be honest, I’m not sure what might be causing the issue.
I found a similar issue on the library github issues page, and the author mentions that it is related to the Wi-Fi network…
https://github.com/mobizt/Firebase-ESP-Client/issues/468
However, if the board reconnects right after restart, that’s a good workaround.
Regards,
Sara
Thank you very much for your effort to help me.
Sorry to insist, but if the board didn’t reboot it would be better for my application.
I ran some more tests and noticed that the board randomly prints error codes similar to the github link you posted. Here’s the before and after reboot.
Before reboot:
Token info: type = id token (GITKit token), status = on refreshing
Token info: type = id token (GITKit token), status = ready
Refresh token
stream timeout, resuming…
After reboot:
error code: -3, reason: not connected
At the bottom of the github page you posted there is a link to update the Firebase Client.
Today I installed the following update in VS CODE\PlatformIO: mobizt/Firebase Arduino Client Library for ESP8266 and ESP32@^4.3.8.
I’ll test with 4.3.8 and check how it works. Then post here.